* [PATCH] mac80211: fix dialog token allocator
@ 2010-05-31 10:00 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2010-05-31 10:00 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
The dialog token allocator has apparently been broken
since b83f4e15 ("mac80211: fix deadlock in sta->lock")
because it got moved out under the spinlock. Fix it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Seems like a low-impact change ... could be backported to almost every
stable tree out there I guess since it was broken almost exactly three
years ago ... but does it matter? I guess not.
net/mac80211/agg-tx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2010-05-31 11:50:54.000000000 +0200
+++ wireless-testing/net/mac80211/agg-tx.c 2010-05-31 11:53:53.000000000 +0200
@@ -332,14 +332,16 @@ int ieee80211_start_tx_ba_session(struct
IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
spin_unlock(&local->ampdu_lock);
- spin_unlock_bh(&sta->lock);
- /* send an addBA request */
+ /* prepare tid data */
sta->ampdu_mlme.dialog_token_allocator++;
sta->ampdu_mlme.tid_tx[tid]->dialog_token =
sta->ampdu_mlme.dialog_token_allocator;
sta->ampdu_mlme.tid_tx[tid]->ssn = start_seq_num;
+ spin_unlock_bh(&sta->lock);
+
+ /* send AddBA request */
ieee80211_send_addba_request(sdata, pubsta->addr, tid,
sta->ampdu_mlme.tid_tx[tid]->dialog_token,
sta->ampdu_mlme.tid_tx[tid]->ssn,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-31 10:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 10:00 [PATCH] mac80211: fix dialog token allocator Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).