Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/mt76.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2022-08-30 01:57:44 +0300
committerFelix Fietkau <nbd@nbd.name>2022-09-15 14:15:49 +0300
commit0c0bda4aea05493f04993f68d62bf7de937ace59 (patch)
tree42fa255608a31101239ae90fa44b488a8b719571
parente06376af21dd6cdce0a9bbbcd8ae9d9704073ce4 (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.c1
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);