Skip to content

Commit

Permalink
mac80211: fix dialog token allocator
Browse files Browse the repository at this point in the history
The dialog token allocator has apparently been broken
since b83f4e1 ("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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 1, 2010
1 parent 8ae5977 commit 51a0d38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mac80211/agg-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,16 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
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,
Expand Down

0 comments on commit 51a0d38

Please sign in to comment.