aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 04:21:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:28 -0400
commita93e364430de7f7a5f4eedd604ad1ab3d825dde5 (patch)
tree441f0f69dc5b08d79c5f5f4e7adae88ad18dbd86 /net/mac80211/ht.c
parentf955ebb44798e0058c987a0817810d2542e87349 (diff)
mac80211: change RX aggregation locking
To prepare for allowing drivers to sleep in ampdu_action, change the locking in the RX aggregation code to use a mutex, so that it would already allow drivers to sleep. But explicitly disable BHs around the callback for now since the TX part cannot yet sleep, and drivers' locking might require it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r--net/mac80211/ht.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 730f8089678e..e29be64083c3 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -130,13 +130,17 @@ void ieee80211_ba_session_work(struct work_struct *work)
130 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) 130 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA))
131 return; 131 return;
132 132
133 spin_lock_bh(&sta->lock); 133 mutex_lock(&sta->ampdu_mlme.mtx);
134 for (tid = 0; tid < STA_TID_NUM; tid++) { 134 for (tid = 0; tid < STA_TID_NUM; tid++) {
135 if (test_and_clear_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired)) 135 if (test_and_clear_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired))
136 ___ieee80211_stop_rx_ba_session( 136 ___ieee80211_stop_rx_ba_session(
137 sta, tid, WLAN_BACK_RECIPIENT, 137 sta, tid, WLAN_BACK_RECIPIENT,
138 WLAN_REASON_QSTA_TIMEOUT); 138 WLAN_REASON_QSTA_TIMEOUT);
139 }
140 mutex_unlock(&sta->ampdu_mlme.mtx);
139 141
142 spin_lock_bh(&sta->lock);
143 for (tid = 0; tid < STA_TID_NUM; tid++) {
140 tid_tx = sta->ampdu_mlme.tid_tx[tid]; 144 tid_tx = sta->ampdu_mlme.tid_tx[tid];
141 if (!tid_tx) 145 if (!tid_tx)
142 continue; 146 continue;