ath9k_hw: do not lower ANI setting below default on AR913x
authorFelix Fietkau <nbd@openwrt.org>
Sun, 27 Apr 2014 14:37:39 +0000 (16:37 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Apr 2014 15:39:54 +0000 (11:39 -0400)
commitae9c25a1826ca9602e89fe9c11700c63ce16d077
treec803c2ee9131afb5935de3cc91256041fc35fe04
parent38f3106a9b987c227ef79c7f194f728f4db36136
ath9k_hw: do not lower ANI setting below default on AR913x

When the amount of noise fluctuates strongly, low immunity settings
can sometimes disrupt signal detection on AR913x chips. When that
happens, no OFDM/CCK errors are reported anymore, and ANI tunes the
radio to the lowest immunity settings.
Usually rx/tx fails as well in that case.

To fix this, keep noise immunity settings at or above ANI default level,
which will keep radio parameters at or above INI values.

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