]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
ath9k: Fix bug in ANI channel handling
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 11 Sep 2009 03:00:03 +0000 (08:30 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Sep 2009 18:36:03 +0000 (14:36 -0400)
When processing MIB interrupts, OFDM and CCK error
handling routines for low RSSI values have to be invoked
only when the channel mode is 11G/11B. Since HT channels
will also fall under the bands 2Ghz/5Ghz, check appropriately.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ani.c

index a7cbb07988cf3e00d90673163312c3fc1096481a..2b493742ef10c16b4a69cc96c06a3e3f3a9c6a2b 100644 (file)
@@ -327,7 +327,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
                                             aniState->firstepLevel + 1);
                return;
        } else {
                                             aniState->firstepLevel + 1);
                return;
        } else {
-               if (conf->channel->band == IEEE80211_BAND_2GHZ) {
+               if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
+                   !conf_is_ht(conf)) {
                        if (!aniState->ofdmWeakSigDetectOff)
                                ath9k_hw_ani_control(ah,
                                     ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
                        if (!aniState->ofdmWeakSigDetectOff)
                                ath9k_hw_ani_control(ah,
                                     ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
@@ -369,7 +370,8 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
                        ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
                                             aniState->firstepLevel + 1);
        } else {
                        ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
                                             aniState->firstepLevel + 1);
        } else {
-               if (conf->channel->band == IEEE80211_BAND_2GHZ) {
+               if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
+                   !conf_is_ht(conf)) {
                        if (aniState->firstepLevel > 0)
                                ath9k_hw_ani_control(ah,
                                             ATH9K_ANI_FIRSTEP_LEVEL, 0);
                        if (aniState->firstepLevel > 0)
                                ath9k_hw_ani_control(ah,
                                             ATH9K_ANI_FIRSTEP_LEVEL, 0);