summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-13 15:24:44 +0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 23:05:13 +0400
commit6682588a08b8be34649348051bc0204f7ab401a2 (patch)
tree2f4f31afc7ba25e8fe82b6783ec9e8ce59acb257 /net/wireless/core.c
parent0e2b6286805c419d28a4c1e19e3a121af7449b20 (diff)
downloadlinux-6682588a08b8be34649348051bc0204f7ab401a2.tar.xz
cfg80211: fix unregistration
The work that we cancel there requires the cfg80211_mutex, so we can't cancel it under the mutex, which is fine, we can just move it to after the locked section. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 97cc5968b7d6..6891cd0e38d5 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -548,11 +548,6 @@ void wiphy_unregister(struct wiphy *wiphy)
/* unlock again before freeing */
mutex_unlock(&rdev->mtx);
- cancel_work_sync(&rdev->conn_work);
- cancel_work_sync(&rdev->scan_done_wk);
- kfree(rdev->scan_req);
- flush_work(&rdev->event_work);
-
cfg80211_debugfs_rdev_del(rdev);
/* If this device got a regulatory hint tell core its
@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy)
debugfs_remove(rdev->wiphy.debugfsdir);
mutex_unlock(&cfg80211_mutex);
+
+ cancel_work_sync(&rdev->conn_work);
+ cancel_work_sync(&rdev->scan_done_wk);
+ kfree(rdev->scan_req);
+ flush_work(&rdev->event_work);
}
EXPORT_SYMBOL(wiphy_unregister);