diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-02-05 20:14:59 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-02-05 11:33:00 -0800 |
commit | f48b6dd4bd56ad6dd307a507074663445ea61a41 (patch) | |
tree | 3f162091d6b7f13d7e78aeea5cb3b7daffdfc5f1 /plugins/wifi.c | |
parent | bdb78fd00c65854a4f08e9887257d3a4d0d65913 (diff) | |
download | connman-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/wifi.c')
-rw-r--r-- | plugins/wifi.c | 3 |
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"); } } |