diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-09-11 18:00:27 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-09-26 21:13:46 +0200 |
commit | 1e516ca7c9ceeeec4ed87f549a14bc3b73427f83 (patch) | |
tree | b5d5744a4e834e6d580c4254e84f290eef93827e /drivers/net/wireless/ath/ath9k/hw.c | |
parent | ath9k: Fix issue with parsing malformed CFP IE (diff) | |
download | linux-1e516ca7c9ceeeec4ed87f549a14bc3b73427f83.tar.xz linux-1e516ca7c9ceeeec4ed87f549a14bc3b73427f83.zip |
ath9k: Handle abnormal NAV in AP mode
Beacon transmission would get stuck if the NAV is
an invalid value for some reason. Check and correct
the NAV value in the HW when this happens.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 525ac984eafd..d3206ab40297 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1656,6 +1656,19 @@ hang_check_iter: return true; } +void ath9k_hw_check_nav(struct ath_hw *ah) +{ + struct ath_common *common = ath9k_hw_common(ah); + u32 val; + + val = REG_READ(ah, AR_NAV); + if (val != 0xdeadbeef && val > 0x7fff) { + ath_dbg(common, BSTUCK, "Abnormal NAV: 0x%x\n", val); + REG_WRITE(ah, AR_NAV, 0); + } +} +EXPORT_SYMBOL(ath9k_hw_check_nav); + bool ath9k_hw_check_alive(struct ath_hw *ah) { int count = 50; |