diff options
author | Ilan peer <ilan.peer@intel.com> | 2017-09-06 17:18:33 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-09-21 12:42:01 +0300 |
commit | 1281103770e909e064edbb22a1115a0c14eca081 (patch) | |
tree | 5fae1d834a01bbeae0c17a2f20c58a45eb7b7b9a /net/mac80211 | |
parent | 1272c5d89b597995cb10db87dd4a1adc91d36006 (diff) | |
download | linux-1281103770e909e064edbb22a1115a0c14eca081.tar.xz |
mac80211: Simplify locking in ieee80211_sta_tear_down_BA_sessions()
Simplify the locking in ieee80211_sta_tear_down_BA_sessions() and
lock sta->ampdu_mlme.mtx over the entire function instead of
locking/unlocking it for each TID etc.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ht.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index d6d0b4201e40..41f5e48f8021 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -290,13 +290,15 @@ void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, { int i; + mutex_lock(&sta->ampdu_mlme.mtx); for (i = 0; i < IEEE80211_NUM_TIDS; i++) { - __ieee80211_stop_tx_ba_session(sta, i, reason); - __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, - WLAN_REASON_QSTA_LEAVE_QBSS, - reason != AGG_STOP_DESTROY_STA && - reason != AGG_STOP_PEER_REQUEST); + ___ieee80211_stop_tx_ba_session(sta, i, reason); + ___ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, + WLAN_REASON_QSTA_LEAVE_QBSS, + reason != AGG_STOP_DESTROY_STA && + reason != AGG_STOP_PEER_REQUEST); } + mutex_unlock(&sta->ampdu_mlme.mtx); /* stopping might queue the work again - so cancel only afterwards */ cancel_work_sync(&sta->ampdu_mlme.work); |