diff options
author | Sean Wang <sean.wang@mediatek.com> | 2022-08-30 01:57:44 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-09-15 14:15:49 +0300 |
commit | 0c0bda4aea05493f04993f68d62bf7de937ace59 (patch) | |
tree | 42fa255608a31101239ae90fa44b488a8b719571 | |
parent | e06376af21dd6cdce0a9bbbcd8ae9d9704073ce4 (diff) |
wifi: mt76: mt7921: reset msta->airtime_ac while clearing up hw value
We should reset mstat->airtime_ac along with clear up the entries in the
hardware WLAN table for the Rx and Rx accumulative airtime. Otherwsie, the
value msta->airtime_ac - [tx, rx]_last may be a negative and that is not
the actual airtime the device took in the last run.
Reported-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | mt7921/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mt7921/main.c b/mt7921/main.c index bb7c986f..b4eac59c 100644 --- a/mt7921/main.c +++ b/mt7921/main.c @@ -750,6 +750,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, mt7921_mac_wtbl_update(dev, msta->wcid.idx, MT_WTBL_UPDATE_ADM_COUNT_CLEAR); + memset(msta->airtime_ac, 0, sizeof(msta->airtime_ac)); mt7921_mcu_sta_update(dev, sta, vif, true, MT76_STA_INFO_STATE_ASSOC); |