Skip to content

Commit

Permalink
ath9k: fix spur mitigation no-spur case for AR9002
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian Prodoehl authored and John W. Linville committed Jan 4, 2011
1 parent ad9082a commit 44cefea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath9k/ar9002_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ static void ar9002_hw_spur_mitigate(struct ath_hw *ah,
for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz);

if (AR_NO_SPUR == cur_bb_spur)
break;

if (is2GHz)
cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ;
else
cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ;

if (AR_NO_SPUR == cur_bb_spur)
break;
cur_bb_spur = cur_bb_spur - freq;

if (IS_CHAN_HT40(chan)) {
Expand Down

0 comments on commit 44cefea

Please sign in to comment.