Commit 38b33707 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath9k: Make ANI CCK and OFDM error triggers band specific

The CCK and OFDM ANI error triggers are not mode specific but rather
band specific so just make use of the already available band from
ieee80211_conf.
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 285256a5
...@@ -279,9 +279,8 @@ static void ath9k_ani_restart(struct ath_hal *ah) ...@@ -279,9 +279,8 @@ static void ath9k_ani_restart(struct ath_hal *ah)
static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah) static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
{ {
struct ath_hal_5416 *ahp = AH5416(ah); struct ath_hal_5416 *ahp = AH5416(ah);
struct ath9k_channel *chan = ah->ah_curchan; struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
struct ar5416AniState *aniState; struct ar5416AniState *aniState;
enum wireless_mode mode;
int32_t rssi; int32_t rssi;
if (!DO_ANI(ah)) if (!DO_ANI(ah))
...@@ -336,8 +335,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah) ...@@ -336,8 +335,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
aniState->firstepLevel + 1); aniState->firstepLevel + 1);
return; return;
} else { } else {
mode = ath9k_hw_chan2wmode(ah, chan); if (conf->channel->band == IEEE80211_BAND_2GHZ) {
if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
if (!aniState->ofdmWeakSigDetectOff) if (!aniState->ofdmWeakSigDetectOff)
ath9k_hw_ani_control(ah, ath9k_hw_ani_control(ah,
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
...@@ -353,9 +351,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah) ...@@ -353,9 +351,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah) static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
{ {
struct ath_hal_5416 *ahp = AH5416(ah); struct ath_hal_5416 *ahp = AH5416(ah);
struct ath9k_channel *chan = ah->ah_curchan; struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
struct ar5416AniState *aniState; struct ar5416AniState *aniState;
enum wireless_mode mode;
int32_t rssi; int32_t rssi;
if (!DO_ANI(ah)) if (!DO_ANI(ah))
...@@ -381,8 +378,7 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah) ...@@ -381,8 +378,7 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
aniState->firstepLevel + 1); aniState->firstepLevel + 1);
} else { } else {
mode = ath9k_hw_chan2wmode(ah, chan); if (conf->channel->band == IEEE80211_BAND_2GHZ) {
if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
if (aniState->firstepLevel > 0) if (aniState->firstepLevel > 0)
ath9k_hw_ani_control(ah, ath9k_hw_ani_control(ah,
ATH9K_ANI_FIRSTEP_LEVEL, 0); ATH9K_ANI_FIRSTEP_LEVEL, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment