ath9k: properly preserve TSF across reset
authorFelix Fietkau <nbd@openwrt.org>
Sat, 14 Dec 2013 17:03:45 +0000 (18:03 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 18 Dec 2013 20:23:34 +0000 (15:23 -0500)
commita35051ce1733f524c12a8246641ded5d0409817d
tree4a6f3b71e6a4f63191ef6b8c277f119900f44d7f
parent4ed15762dce67192d4662860470a8be1f6d5fd53
ath9k: properly preserve TSF across reset

The beacon code previously reset TSF on every configuration call, as
some of the code was not prepared to properly calculate nexttbtt based
on current TSF.

This patch adds a common function for calculating nexttbtt and moves the
TSF reset to driver start.

This should improve AP mode compatibility with various stations that
expect the TSF to not randomly jump due to hardware resets.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c