wifi: mt76: mt7921: reset msta->airtime_ac while clearing up hw value
authorSean Wang <sean.wang@mediatek.com>
Mon, 29 Aug 2022 22:57:44 +0000 (06:57 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 15 Sep 2022 11:21:39 +0000 (13:21 +0200)
commit1bf66dc31032ff5292f4d5b76436653f269fcfbd
tree64d0afd5fbfb52f098c483b9a3bb1eab9cd2011c
parentd2b5bb6dfab29fe32bedefaade88dcd182c03a00
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>
drivers/net/wireless/mediatek/mt76/mt7921/main.c