summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorYu A Wang <arron.wang@intel.com>2011-12-08 02:31:15 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-12-16 19:51:53 +0100
commit7999a1fc4c6f695674d9510e9c18790748f5e4e5 (patch)
tree46b4ae695e2be5c9a132491692e1ab02181b556e /plugins/wifi.c
parent83a6923af0156de7575fac4bfb0ad2ee5023b361 (diff)
downloadconnman-7999a1fc4c6f695674d9510e9c18790748f5e4e5.tar.gz
connman-7999a1fc4c6f695674d9510e9c18790748f5e4e5.tar.bz2
connman-7999a1fc4c6f695674d9510e9c18790748f5e4e5.zip
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.
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r--plugins/wifi.c1
1 files changed, 1 insertions, 0 deletions
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);