diff options
author | Brian Prodoehl <bprodoehl@gmail.com> | 2010-12-25 14:34:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-04 14:35:12 -0500 |
commit | 44cefead807daf96d0f43eb494b1eb5edb5454bf (patch) | |
tree | 1b6ade8ff5fb31a67e99070db8878f37dfdb3992 /drivers | |
parent | ad9082adfc0a6bdcef1bad2f22485575479d7a9d (diff) |
ath9k: fix spur mitigation no-spur case for AR9002
For the AR9002, the spur frequency read from the EEPROM is mangled
before being compared against AR_NO_SPUR. This results in the driver
trying to set up the spur mitigation for bogus spurs, rather than
cleanly breaking out.
Signed-off-by: Brian Prodoehl <bprodoehl@nomadio.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_phy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c index 7ae66a889f5a..7d68d61e406b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c | |||
@@ -203,13 +203,14 @@ static void ar9002_hw_spur_mitigate(struct ath_hw *ah, | |||
203 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { | 203 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { |
204 | cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz); | 204 | cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz); |
205 | 205 | ||
206 | if (AR_NO_SPUR == cur_bb_spur) | ||
207 | break; | ||
208 | |||
206 | if (is2GHz) | 209 | if (is2GHz) |
207 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ; | 210 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ; |
208 | else | 211 | else |
209 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ; | 212 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ; |
210 | 213 | ||
211 | if (AR_NO_SPUR == cur_bb_spur) | ||
212 | break; | ||
213 | cur_bb_spur = cur_bb_spur - freq; | 214 | cur_bb_spur = cur_bb_spur - freq; |
214 | 215 | ||
215 | if (IS_CHAN_HT40(chan)) { | 216 | if (IS_CHAN_HT40(chan)) { |