ath9k: fix beacon timer restart after a card reset
commit9ba155b84391989fb97ddb210c741d6abc44a613
authorFelix Fietkau <nbd@openwrt.org>
Fri, 19 Feb 2010 17:21:42 +0000 (19 18:21 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:49:59 +0000 (15 08:49 -0700)
tree63cce19b971efdd80d8beabf81c92532e79c8fab
parentc6476d517ed62121444df6e3cbf7a494a463a74d
ath9k: fix beacon timer restart after a card reset

commit d8728ee919282c7b01b65cd479ec1e2a9c5d3ba8 upstream.

In AP mode, ath_beacon_config_ap only restarts the timer if a TSF
restart is requested. Apparently this was added, because this function
unconditionally sets the flag for TSF reset.

The problem with this is, that ath9k_hw_reset() clobbers the timer
registers (specified in the initvals), thus effectively disabling the
SWBA interrupt whenever a card reset without TSF reset is issued
(happens in a few places in the code).

This patch fixes ath_beacon_config_ap to only issue the TSF reset flag
when necessary, but reinitialize the timer unconditionally. Tests show,
that this is enough to keep the SWBA interrupt going after a call to
ath_reset()

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