aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 04:21:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:28 -0400
commit83a5cbf73a13d0c8be019b22afec4407e4285aed (patch)
tree3ac77e38aa5dd7891b101f45e963df7b9a5b9d38 /net/mac80211
parenta93e364430de7f7a5f4eedd604ad1ab3d825dde5 (diff)
mac80211: defer TX agg session teardown to work
Since we want the code to be able to sleep in the future, it must not be called from the timer directly. To achieve that, simply call the function drivers would call, and also use RCU in the timer to get the struct so we don't need to rely on the spinlock in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/agg-tx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 9a00a79a868b..0026604cfe30 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -200,11 +200,11 @@ static void sta_addba_resp_timer_expired(unsigned long data)
200 struct tid_ampdu_tx *tid_tx; 200 struct tid_ampdu_tx *tid_tx;
201 201
202 /* check if the TID waits for addBA response */ 202 /* check if the TID waits for addBA response */
203 spin_lock_bh(&sta->lock); 203 rcu_read_lock();
204 tid_tx = sta->ampdu_mlme.tid_tx[tid]; 204 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
205 if (!tid_tx || 205 if (!tid_tx ||
206 test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { 206 test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) {
207 spin_unlock_bh(&sta->lock); 207 rcu_read_unlock();
208#ifdef CONFIG_MAC80211_HT_DEBUG 208#ifdef CONFIG_MAC80211_HT_DEBUG
209 printk(KERN_DEBUG "timer expired on tid %d but we are not " 209 printk(KERN_DEBUG "timer expired on tid %d but we are not "
210 "(or no longer) expecting addBA response there\n", 210 "(or no longer) expecting addBA response there\n",
@@ -217,8 +217,8 @@ static void sta_addba_resp_timer_expired(unsigned long data)
217 printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid); 217 printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid);
218#endif 218#endif
219 219
220 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); 220 ieee80211_stop_tx_ba_session(&sta->sta, tid);
221 spin_unlock_bh(&sta->lock); 221 rcu_read_unlock();
222} 222}
223 223
224static inline int ieee80211_ac_from_tid(int tid) 224static inline int ieee80211_ac_from_tid(int tid)