aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-12-23 18:58:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:33 -0500
commit38b33707a1ec77f7b4c92ae41cfe93318014f5bf (patch)
treef8a93a73d2ad86cbb0061aae62c50492b858ccf0 /drivers
parent285256a59d790c6a9afe8ec82804a369d956ac06 (diff)
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: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/ani.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath9k/ani.c b/drivers/net/wireless/ath9k/ani.c
index 251e2d9a7a4a..4dd086073ad9 100644
--- a/drivers/net/wireless/ath9k/ani.c
+++ b/drivers/net/wireless/ath9k/ani.c
@@ -279,9 +279,8 @@ static void ath9k_ani_restart(struct ath_hal *ah)
279static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah) 279static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
280{ 280{
281 struct ath_hal_5416 *ahp = AH5416(ah); 281 struct ath_hal_5416 *ahp = AH5416(ah);
282 struct ath9k_channel *chan = ah->ah_curchan; 282 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
283 struct ar5416AniState *aniState; 283 struct ar5416AniState *aniState;
284 enum wireless_mode mode;
285 int32_t rssi; 284 int32_t rssi;
286 285
287 if (!DO_ANI(ah)) 286 if (!DO_ANI(ah))
@@ -336,8 +335,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
336 aniState->firstepLevel + 1); 335 aniState->firstepLevel + 1);
337 return; 336 return;
338 } else { 337 } else {
339 mode = ath9k_hw_chan2wmode(ah, chan); 338 if (conf->channel->band == IEEE80211_BAND_2GHZ) {
340 if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
341 if (!aniState->ofdmWeakSigDetectOff) 339 if (!aniState->ofdmWeakSigDetectOff)
342 ath9k_hw_ani_control(ah, 340 ath9k_hw_ani_control(ah,
343 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, 341 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
@@ -353,9 +351,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hal *ah)
353static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah) 351static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
354{ 352{
355 struct ath_hal_5416 *ahp = AH5416(ah); 353 struct ath_hal_5416 *ahp = AH5416(ah);
356 struct ath9k_channel *chan = ah->ah_curchan; 354 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
357 struct ar5416AniState *aniState; 355 struct ar5416AniState *aniState;
358 enum wireless_mode mode;
359 int32_t rssi; 356 int32_t rssi;
360 357
361 if (!DO_ANI(ah)) 358 if (!DO_ANI(ah))
@@ -381,8 +378,7 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hal *ah)
381 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 378 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
382 aniState->firstepLevel + 1); 379 aniState->firstepLevel + 1);
383 } else { 380 } else {
384 mode = ath9k_hw_chan2wmode(ah, chan); 381 if (conf->channel->band == IEEE80211_BAND_2GHZ) {
385 if (mode == ATH9K_MODE_11G || mode == ATH9K_MODE_11B) {
386 if (aniState->firstepLevel > 0) 382 if (aniState->firstepLevel > 0)
387 ath9k_hw_ani_control(ah, 383 ath9k_hw_ani_control(ah,
388 ATH9K_ANI_FIRSTEP_LEVEL, 0); 384 ATH9K_ANI_FIRSTEP_LEVEL, 0);