OSDN Git Service

mt76: fix beacon timer drift
authorFelix Fietkau <nbd@nbd.name>
Thu, 21 Jun 2018 09:17:53 +0000 (11:17 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Jun 2018 16:14:46 +0000 (19:14 +0300)
commitaea38272920c227865af25c7d7710f1ab0d8a1ce
tree398b82928ba99e6d68bd9ce18caee8bf6265f549
parent81454b8405f24df8b24984698d62c5f560d01fe3
mt76: fix beacon timer drift

The beacon timer drifts by 1 microsecond every TBTT. After 20 minutes
with a beacon interval of 100, the drift will be almost 12 ms, enough to
cause weird issues for devices in powersave mode.

Since the beacon timer is configured in units of 1/16 TU (64 us), we
need to adjust it once every 64 beacons and only for one beacon.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x2.h
drivers/net/wireless/mediatek/mt76/mt76x2_main.c
drivers/net/wireless/mediatek/mt76/mt76x2_tx.c