summaryrefslogtreecommitdiff
path: root/plugins/ethernet.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-03-19 13:50:35 +0100
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-03-20 12:01:42 +0200
commit44930407218d5e6c21392dadb8686f6c376aeb06 (patch)
tree83943219235151678c4e52af953dfa3146e812a8 /plugins/ethernet.c
parent8a9d36de069ce0cd1a73ccbb1c1971ef42d8d1d8 (diff)
downloadconnman-44930407218d5e6c21392dadb8686f6c376aeb06.tar.gz
connman-44930407218d5e6c21392dadb8686f6c376aeb06.tar.bz2
connman-44930407218d5e6c21392dadb8686f6c376aeb06.zip
ethernet: Do not connect network on LOWER_UP
Ethernet networks should honor the AutoConnect feature as the rest of the network types. Just register the network object at the core when we get LOWER_UP. Then the core can decide when to connect to the network. There is no behavior change when AutoConnect is enabled, So if the user plugs the cable the ethernet network will automatically connect as it was before. If AutoConnect is disabled, the core will not connect to the network automatically.
Diffstat (limited to 'plugins/ethernet.c')
-rw-r--r--plugins/ethernet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/ethernet.c b/plugins/ethernet.c
index 0cbaf24e..9821a4a7 100644
--- a/plugins/ethernet.c
+++ b/plugins/ethernet.c
@@ -63,6 +63,8 @@ static int cable_connect(struct connman_network *network)
{
DBG("network %p", network);
+ connman_network_set_connected(network, TRUE);
+
return 0;
}
@@ -70,6 +72,8 @@ static int cable_disconnect(struct connman_network *network)
{
DBG("network %p", network);
+ connman_network_set_connected(network, FALSE);
+
return 0;
}
@@ -107,8 +111,6 @@ static void add_network(struct connman_device *device,
connman_network_set_group(network, "cable");
- connman_network_set_connected(network, TRUE);
-
ethernet->network = network;
}