306-mac80211-remove-STA-txq-pending-airtime-underflow-wa.patch 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. From: Felix Fietkau <[email protected]>
  2. Date: Sat, 25 Jul 2020 10:42:30 +0200
  3. Subject: [PATCH] mac80211: remove STA txq pending airtime underflow
  4. warning
  5. This warning can trigger if there is a mismatch between frames that were
  6. sent with the sta pointer set vs tx status frames reported for the sta address.
  7. This can happen due to race conditions on re-creating stations, or even
  8. in the case of .sta_add/remove being used instead of .sta_state, which can cause
  9. frames to be sent to a station that has not been uploaded yet.
  10. If there is an actual underflow issue, it should show up in the device airtime
  11. warning below, so it is better to remove this one.
  12. Signed-off-by: Felix Fietkau <[email protected]>
  13. ---
  14. --- a/net/mac80211/sta_info.c
  15. +++ b/net/mac80211/sta_info.c
  16. @@ -1924,9 +1924,7 @@ void ieee80211_sta_update_pending_airtim
  17. if (sta) {
  18. tx_pending = atomic_sub_return(tx_airtime,
  19. &sta->airtime[ac].aql_tx_pending);
  20. - if (WARN_ONCE(tx_pending < 0,
  21. - "STA %pM AC %d txq pending airtime underflow: %u, %u",
  22. - sta->addr, ac, tx_pending, tx_airtime))
  23. + if (tx_pending < 0)
  24. atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending,
  25. tx_pending, 0);
  26. }