aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r--net/wireless/sme.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index a9dc5c736df0..3ed35c345cae 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -231,6 +231,9 @@ void cfg80211_conn_work(struct work_struct *work)
231 mutex_lock(&rdev->sched_scan_mtx); 231 mutex_lock(&rdev->sched_scan_mtx);
232 232
233 list_for_each_entry(wdev, &rdev->wdev_list, list) { 233 list_for_each_entry(wdev, &rdev->wdev_list, list) {
234 if (!wdev->netdev)
235 continue;
236
234 wdev_lock(wdev); 237 wdev_lock(wdev);
235 if (!netif_running(wdev->netdev)) { 238 if (!netif_running(wdev->netdev)) {
236 wdev_unlock(wdev); 239 wdev_unlock(wdev);
@@ -961,7 +964,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev,
961 /* was it connected by userspace SME? */ 964 /* was it connected by userspace SME? */
962 if (!wdev->conn) { 965 if (!wdev->conn) {
963 cfg80211_mlme_down(rdev, dev); 966 cfg80211_mlme_down(rdev, dev);
964 return 0; 967 goto disconnect;
965 } 968 }
966 969
967 if (wdev->sme_state == CFG80211_SME_CONNECTING && 970 if (wdev->sme_state == CFG80211_SME_CONNECTING &&
@@ -987,6 +990,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev,
987 return err; 990 return err;
988 } 991 }
989 992
993 disconnect:
990 if (wdev->sme_state == CFG80211_SME_CONNECTED) 994 if (wdev->sme_state == CFG80211_SME_CONNECTED)
991 __cfg80211_disconnected(dev, NULL, 0, 0, false); 995 __cfg80211_disconnected(dev, NULL, 0, 0, false);
992 else if (wdev->sme_state == CFG80211_SME_CONNECTING) 996 else if (wdev->sme_state == CFG80211_SME_CONNECTING)