Skip to content

Commit

Permalink
ath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485
Browse files Browse the repository at this point in the history
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Dec 7, 2010
1 parent d09b17f commit 85dd092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/ath/ath9k/ar9003_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
freq = centers.synth_center;

if (freq < 4800) { /* 2 GHz, fractional mode */
channelSel = CHANSEL_2G(freq);
if (AR_SREV_9485(ah))
channelSel = CHANSEL_2G_9485(freq);
else
channelSel = CHANSEL_2G(freq);
/* Set to 2G mode */
bMode = 1;
} else {
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath9k/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#define CHANSEL_DIV 15
#define CHANSEL_2G(_freq) (((_freq) * 0x10000) / CHANSEL_DIV)
#define CHANSEL_2G_9485(_freq) ((((_freq) * 0x10000) - 215) / CHANSEL_DIV)
#define CHANSEL_5G(_freq) (((_freq) * 0x8000) / CHANSEL_DIV)

#define AR_PHY_BASE 0x9800
Expand Down

0 comments on commit 85dd092

Please sign in to comment.