Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194382
b: refs/heads/master
c: 7152451
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 16, 2010
1 parent 288564a commit 6d5cc53
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da6f1d7f5f46d71f85d69a6521a16b83ad00e7e3
refs/heads/master: 7152451aa12558ab032f319a119ceb928396b905
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/ar9002_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
bMode = 1;
fracMode = 1;
aModeRefSel = 0;
channelSel = (freq * 0x10000) / 15;
channelSel = CHANSEL_2G(freq);

if (AR_SREV_9287_11_OR_LATER(ah)) {
if (freq == 2484) {
Expand Down Expand Up @@ -126,7 +126,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
*/
fracMode = 1;
refDivA = 1;
channelSel = (freq * 0x8000) / 15;
channelSel = CHANSEL_5G(freq);

/* RefDivA setting */
REG_RMW_FIELD(ah, AR_AN_SYNTH9,
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef PHY_H
#define PHY_H

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

#define AR_PHY_BASE 0x9800
#define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2))

Expand Down

0 comments on commit 6d5cc53

Please sign in to comment.