When we receive an rtnl message for a wifi new link, we should toggle the
powered device field accordingly.
---
 plugins/wifi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index b115c84..5fd82b0 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");
                }
        }
-- 
1.6.3.3

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to