summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-02-05 20:14:59 +0100
committerMarcel Holtmann <marcel@holtmann.org>2010-02-05 11:33:00 -0800
commitf48b6dd4bd56ad6dd307a507074663445ea61a41 (patch)
tree3f162091d6b7f13d7e78aeea5cb3b7daffdfc5f1 /plugins
parentbdb78fd00c65854a4f08e9887257d3a4d0d65913 (diff)
downloadconnman-f48b6dd4bd56ad6dd307a507074663445ea61a41.tar.gz
connman-f48b6dd4bd56ad6dd307a507074663445ea61a41.tar.bz2
connman-f48b6dd4bd56ad6dd307a507074663445ea61a41.zip
Toggle WiFi device powered field
When receiving an RTNL message for a WiFI NEWLINK, the powered device field should be toggled accordingly.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wifi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index b115c847..5fd82b0f 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -97,9 +97,10 @@ static void wifi_newlink(unsigned flags, unsigned change, void *user_data)
if ((wifi->flags & IFF_UP) != (flags & IFF_UP)) {
if (flags & IFF_UP) {
DBG("power on");
-
+ connman_device_set_powered(device, TRUE);
supplicant_scan(device);
} else {
+ connman_device_set_powered(device, FALSE);
DBG("power off");
}
}