From 7999a1fc4c6f695674d9510e9c18790748f5e4e5 Mon Sep 17 00:00:00 2001 From: Yu A Wang Date: Thu, 8 Dec 2011 02:31:15 -0500 Subject: wifi: Set wifi device powered FALSE when removed In interface_removed function, connman_device_set_powered may not be called due to wifi->device is freed before supplicant callback. This happens when we remove the second wifi device. This may lead technology refcount inbalance, which could potentially prevent the wifi technology to be enabled again. --- plugins/wifi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/wifi.c') diff --git a/plugins/wifi.c b/plugins/wifi.c index a9059801..5f41b25b 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -196,6 +196,7 @@ static void wifi_remove(struct connman_device *device) remove_networks(device, wifi); + connman_device_set_powered(device, FALSE); connman_device_set_data(device, NULL); connman_device_unref(wifi->device); connman_rtnl_remove_watch(wifi->watch); -- cgit v1.2.3