305-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From: Felix Fietkau <[email protected]>
  2. Date: Wed, 24 Nov 2021 10:30:41 +0100
  3. Subject: [PATCH] mac80211: fix regression in SSN handling of addba tx
  4. Some drivers that do their own sequence number allocation (e.g. ath9k) rely
  5. on being able to modify params->ssn on starting tx ampdu sessions.
  6. This was broken by a change that modified it to use sta->tid_seq[tid] instead.
  7. Cc: [email protected]
  8. Fixes: 31d8bb4e07f8 ("mac80211: agg-tx: refactor sending addba")
  9. Reported-by: Eneas U de Queiroz <[email protected]>
  10. Signed-off-by: Felix Fietkau <[email protected]>
  11. ---
  12. --- a/net/mac80211/agg-tx.c
  13. +++ b/net/mac80211/agg-tx.c
  14. @@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_ti
  15. /* send AddBA request */
  16. ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
  17. - tid_tx->dialog_token,
  18. - sta->tid_seq[tid] >> 4,
  19. + tid_tx->dialog_token, tid_tx->ssn,
  20. buf_size, tid_tx->timeout);
  21. WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
  22. @@ -523,6 +522,7 @@ void ieee80211_tx_ba_session_handle_star
  23. params.ssn = sta->tid_seq[tid] >> 4;
  24. ret = drv_ampdu_action(local, sdata, &params);
  25. + tid_tx->ssn = params.ssn;
  26. if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
  27. return;
  28. } else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
  29. --- a/net/mac80211/sta_info.h
  30. +++ b/net/mac80211/sta_info.h
  31. @@ -199,6 +199,7 @@ struct tid_ampdu_tx {
  32. u8 stop_initiator;
  33. bool tx_stop;
  34. u16 buf_size;
  35. + u16 ssn;
  36. u16 failed_bar_ssn;
  37. bool bar_pending;