ath9k: add additional checks for the baseband hang detection
authorFelix Fietkau <nbd@openwrt.org>
Fri, 4 Feb 2011 19:09:25 +0000 (20:09 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Feb 2011 21:29:52 +0000 (16:29 -0500)
commitcb8d61de2d7f074654057b2b924da1efbf625ad4
tree345dc16e6c995b2e49da4a66f4bade6a345d4a21
parentb1f93314bfc4d5753391616735f6b8df96db901d
ath9k: add additional checks for the baseband hang detection

Since even with the latest changes the false positive issue of the baseband
hang check is not fully solved yet, additional checks are needed.
If the baseband hang occurs, the rx_clear signal will be stuck to high, so
we can use the cycle counters to confirm it.
With this patch, a hardware reset is only triggered if the baseband hang
check returned true three times in a row, with a beacon interval between
each check and if the busy time was also 99% or more during the check
intervals.

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