Commit 83a5cbf7 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a93e3644
...@@ -200,11 +200,11 @@ static void sta_addba_resp_timer_expired(unsigned long data) ...@@ -200,11 +200,11 @@ static void sta_addba_resp_timer_expired(unsigned long data)
struct tid_ampdu_tx *tid_tx; struct tid_ampdu_tx *tid_tx;
/* check if the TID waits for addBA response */ /* check if the TID waits for addBA response */
spin_lock_bh(&sta->lock); rcu_read_lock();
tid_tx = sta->ampdu_mlme.tid_tx[tid]; tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
if (!tid_tx || if (!tid_tx ||
test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) {
spin_unlock_bh(&sta->lock); rcu_read_unlock();
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "timer expired on tid %d but we are not " printk(KERN_DEBUG "timer expired on tid %d but we are not "
"(or no longer) expecting addBA response there\n", "(or no longer) expecting addBA response there\n",
...@@ -217,8 +217,8 @@ static void sta_addba_resp_timer_expired(unsigned long data) ...@@ -217,8 +217,8 @@ static void sta_addba_resp_timer_expired(unsigned long data)
printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid); printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid);
#endif #endif
___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); ieee80211_stop_tx_ba_session(&sta->sta, tid);
spin_unlock_bh(&sta->lock); rcu_read_unlock();
} }
static inline int ieee80211_ac_from_tid(int tid) static inline int ieee80211_ac_from_tid(int tid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment