From f48b6dd4bd56ad6dd307a507074663445ea61a41 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 5 Feb 2010 20:14:59 +0100 Subject: [PATCH] Toggle WiFi device powered field When receiving an RTNL message for a WiFI NEWLINK, the powered device field should be toggled accordingly. --- plugins/wifi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); } } -- 2.7.4