diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-13 07:24:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:13 -0400 |
commit | 6682588a08b8be34649348051bc0204f7ab401a2 (patch) | |
tree | 2f4f31afc7ba25e8fe82b6783ec9e8ce59acb257 /net/wireless | |
parent | 0e2b6286805c419d28a4c1e19e3a121af7449b20 (diff) |
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')
-rw-r--r-- | net/wireless/core.c | 10 |
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) | |||
548 | /* unlock again before freeing */ | 548 | /* unlock again before freeing */ |
549 | mutex_unlock(&rdev->mtx); | 549 | mutex_unlock(&rdev->mtx); |
550 | 550 | ||
551 | cancel_work_sync(&rdev->conn_work); | ||
552 | cancel_work_sync(&rdev->scan_done_wk); | ||
553 | kfree(rdev->scan_req); | ||
554 | flush_work(&rdev->event_work); | ||
555 | |||
556 | cfg80211_debugfs_rdev_del(rdev); | 551 | cfg80211_debugfs_rdev_del(rdev); |
557 | 552 | ||
558 | /* If this device got a regulatory hint tell core its | 553 | /* If this device got a regulatory hint tell core its |
@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
564 | debugfs_remove(rdev->wiphy.debugfsdir); | 559 | debugfs_remove(rdev->wiphy.debugfsdir); |
565 | 560 | ||
566 | mutex_unlock(&cfg80211_mutex); | 561 | mutex_unlock(&cfg80211_mutex); |
562 | |||
563 | cancel_work_sync(&rdev->conn_work); | ||
564 | cancel_work_sync(&rdev->scan_done_wk); | ||
565 | kfree(rdev->scan_req); | ||
566 | flush_work(&rdev->event_work); | ||
567 | } | 567 | } |
568 | EXPORT_SYMBOL(wiphy_unregister); | 568 | EXPORT_SYMBOL(wiphy_unregister); |
569 | 569 | ||