Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236789
b: refs/heads/master
c: 62362de
h: refs/heads/master
i:
  236787: 95f5b15
v: v3
  • Loading branch information
John W. Linville committed Jan 26, 2011
1 parent 30a975d commit 563fc07
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 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: f35c0c560994226847fa33f0021046a44ab1460f
refs/heads/master: 62362dee83c2a50465cc64ba701ebd741996ec80
11 changes: 3 additions & 8 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,16 @@ static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
}

static unsigned int
ath5k_setup_channels(struct ath5k_hw *ah,
struct ieee80211_channel *channels,
unsigned int mode,
unsigned int max)
ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
unsigned int mode, unsigned int max)
{
unsigned int count, size, chfreq, freq, ch;
enum ieee80211_band band;

if (!test_bit(mode, ah->ah_modes))
return 0;

switch (mode) {
case AR5K_MODE_11A:
/* 1..220, but 2GHz frequencies are filtered by check_channel */
size = 220 ;
size = 220;
chfreq = CHANNEL_5GHZ;
band = IEEE80211_BAND_5GHZ;
break;
Expand Down
21 changes: 11 additions & 10 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,17 @@ static int __ath9k_hw_init(struct ath_hw *ah)
if (ah->hw_version.devid == AR5416_AR9100_DEVID)
ah->hw_version.macVersion = AR_SREV_VERSION_9100;

ath9k_hw_read_revisions(ah);

/*
* Read back AR_WA into a permanent copy and set bits 14 and 17.
* We need to do this to avoid RMW of this register. We cannot
* read the reg when chip is asleep.
*/
ah->WARegVal = REG_READ(ah, AR_WA);
ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
AR_WA_ASPM_TIMER_BASED_DISABLE);

if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
ath_err(common, "Couldn't reset chip\n");
return -EIO;
Expand Down Expand Up @@ -560,14 +571,6 @@ static int __ath9k_hw_init(struct ath_hw *ah)

ath9k_hw_init_mode_regs(ah);

/*
* Read back AR_WA into a permanent copy and set bits 14 and 17.
* We need to do this to avoid RMW of this register. We cannot
* read the reg when chip is asleep.
*/
ah->WARegVal = REG_READ(ah, AR_WA);
ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
AR_WA_ASPM_TIMER_BASED_DISABLE);

if (ah->is_pciexpress)
ath9k_hw_configpcipowersave(ah, 0, 0);
Expand Down Expand Up @@ -1079,8 +1082,6 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
return false;
}

ath9k_hw_read_revisions(ah);

return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
}

Expand Down

0 comments on commit 563fc07

Please sign in to comment.