aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index c21e32f9549c..68b40f21bc38 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -313,14 +313,14 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
313{ 313{
314 int err; 314 int err;
315 315
316 mutex_lock(&rdev->devlist_mtx); 316 ASSERT_RTNL();
317
317 wdev_lock(dev->ieee80211_ptr); 318 wdev_lock(dev->ieee80211_ptr);
318 err = __cfg80211_mlme_auth(rdev, dev, chan, auth_type, bssid, 319 err = __cfg80211_mlme_auth(rdev, dev, chan, auth_type, bssid,
319 ssid, ssid_len, ie, ie_len, 320 ssid, ssid_len, ie, ie_len,
320 key, key_len, key_idx, 321 key, key_len, key_idx,
321 sae_data, sae_data_len); 322 sae_data, sae_data_len);
322 wdev_unlock(dev->ieee80211_ptr); 323 wdev_unlock(dev->ieee80211_ptr);
323 mutex_unlock(&rdev->devlist_mtx);
324 324
325 return err; 325 return err;
326} 326}
@@ -424,12 +424,12 @@ int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
424 struct wireless_dev *wdev = dev->ieee80211_ptr; 424 struct wireless_dev *wdev = dev->ieee80211_ptr;
425 int err; 425 int err;
426 426
427 mutex_lock(&rdev->devlist_mtx); 427 ASSERT_RTNL();
428
428 wdev_lock(wdev); 429 wdev_lock(wdev);
429 err = __cfg80211_mlme_assoc(rdev, dev, chan, bssid, 430 err = __cfg80211_mlme_assoc(rdev, dev, chan, bssid,
430 ssid, ssid_len, req); 431 ssid, ssid_len, req);
431 wdev_unlock(wdev); 432 wdev_unlock(wdev);
432 mutex_unlock(&rdev->devlist_mtx);
433 433
434 return err; 434 return err;
435} 435}
@@ -844,7 +844,7 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
844 dfs_update_channels_wk); 844 dfs_update_channels_wk);
845 wiphy = &rdev->wiphy; 845 wiphy = &rdev->wiphy;
846 846
847 mutex_lock(&cfg80211_mutex); 847 rtnl_lock();
848 for (bandid = 0; bandid < IEEE80211_NUM_BANDS; bandid++) { 848 for (bandid = 0; bandid < IEEE80211_NUM_BANDS; bandid++) {
849 sband = wiphy->bands[bandid]; 849 sband = wiphy->bands[bandid];
850 if (!sband) 850 if (!sband)
@@ -877,7 +877,7 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
877 check_again = true; 877 check_again = true;
878 } 878 }
879 } 879 }
880 mutex_unlock(&cfg80211_mutex); 880 rtnl_unlock();
881 881
882 /* reschedule if there are other channels waiting to be cleared again */ 882 /* reschedule if there are other channels waiting to be cleared again */
883 if (check_again) 883 if (check_again)