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