aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorSimon Wunderlich <sw@simonwunderlich.de>2013-12-05 13:54:43 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-05 14:15:19 -0500
commitbafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (patch)
tree4b0d14116017f33ddeffe2aee7a92cd3e4508fe8 /net/mac80211/ibss.c
parent4a58e7c38443154fce1b47910e1a9184f65c5d72 (diff)
mac80211: fix nested sdata lock for IBSS/CSA
This fixes a regression introduced by my patch "mac80211: don't cancel csa finalize work within stop_ap", which added sdata locks to ieee80211_csa_finalize_work() without removing the locking for ieee80211_ibss_finish_csa(), which is called by the former, resulting in a deadlock due to nested locking. Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r--net/mac80211/ibss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 0f1fb5db4bdb..df21e4f79df8 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -534,7 +534,8 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata)
534 int err; 534 int err;
535 u16 capability; 535 u16 capability;
536 536
537 sdata_lock(sdata); 537 sdata_assert_lock(sdata);
538
538 /* update cfg80211 bss information with the new channel */ 539 /* update cfg80211 bss information with the new channel */
539 if (!is_zero_ether_addr(ifibss->bssid)) { 540 if (!is_zero_ether_addr(ifibss->bssid)) {
540 capability = WLAN_CAPABILITY_IBSS; 541 capability = WLAN_CAPABILITY_IBSS;
@@ -559,7 +560,6 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata)
559 560
560 /* generate the beacon */ 561 /* generate the beacon */
561 err = ieee80211_ibss_csa_beacon(sdata, NULL); 562 err = ieee80211_ibss_csa_beacon(sdata, NULL);
562 sdata_unlock(sdata);
563 if (err < 0) 563 if (err < 0)
564 return err; 564 return err;
565 565