aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index cf2fb3425a63..cf4386fade8a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2382,34 +2382,29 @@ void regulatory_exit(void)
2382 cancel_work_sync(&reg_work); 2382 cancel_work_sync(&reg_work);
2383 cancel_delayed_work_sync(&reg_timeout); 2383 cancel_delayed_work_sync(&reg_timeout);
2384 2384
2385 /* Lock to suppress warnings */
2385 mutex_lock(&cfg80211_mutex); 2386 mutex_lock(&cfg80211_mutex);
2386 mutex_lock(&reg_mutex); 2387 mutex_lock(&reg_mutex);
2387
2388 reset_regdomains(true); 2388 reset_regdomains(true);
2389 mutex_unlock(&cfg80211_mutex);
2390 mutex_unlock(&reg_mutex);
2389 2391
2390 dev_set_uevent_suppress(&reg_pdev->dev, true); 2392 dev_set_uevent_suppress(&reg_pdev->dev, true);
2391 2393
2392 platform_device_unregister(reg_pdev); 2394 platform_device_unregister(reg_pdev);
2393 2395
2394 spin_lock_bh(&reg_pending_beacons_lock);
2395 list_for_each_entry_safe(reg_beacon, btmp, &reg_pending_beacons, list) { 2396 list_for_each_entry_safe(reg_beacon, btmp, &reg_pending_beacons, list) {
2396 list_del(&reg_beacon->list); 2397 list_del(&reg_beacon->list);
2397 kfree(reg_beacon); 2398 kfree(reg_beacon);
2398 } 2399 }
2399 spin_unlock_bh(&reg_pending_beacons_lock);
2400 2400
2401 list_for_each_entry_safe(reg_beacon, btmp, &reg_beacon_list, list) { 2401 list_for_each_entry_safe(reg_beacon, btmp, &reg_beacon_list, list) {
2402 list_del(&reg_beacon->list); 2402 list_del(&reg_beacon->list);
2403 kfree(reg_beacon); 2403 kfree(reg_beacon);
2404 } 2404 }
2405 2405
2406 spin_lock(&reg_requests_lock);
2407 list_for_each_entry_safe(reg_request, tmp, &reg_requests_list, list) { 2406 list_for_each_entry_safe(reg_request, tmp, &reg_requests_list, list) {
2408 list_del(&reg_request->list); 2407 list_del(&reg_request->list);
2409 kfree(reg_request); 2408 kfree(reg_request);
2410 } 2409 }
2411 spin_unlock(&reg_requests_lock);
2412
2413 mutex_unlock(&reg_mutex);
2414 mutex_unlock(&cfg80211_mutex);
2415} 2410}