Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171335
b: refs/heads/master
c: 574d6b1
h: refs/heads/master
i:
  171333: b8592f5
  171331: 3b366ad
  171327: f0bd9d3
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Oct 30, 2009
1 parent 9c528e8 commit 951edaf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 33 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: b67b4397cfbfca8f5c4fff2a36e00d81ef6a28c2
refs/heads/master: 574d6b122d37549bc2817a4939d238f3d8b41da4
27 changes: 9 additions & 18 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,21 +454,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
ah->power_mode = ATH9K_PM_UNDEFINED;
}

static int ath9k_hw_rfattach(struct ath_hw *ah)
{
bool rfStatus = false;
int ecode = 0;

rfStatus = ath9k_hw_init_rf(ah, &ecode);
if (!rfStatus) {
ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
"RF setup failed, status: %u\n", ecode);
return ecode;
}

return 0;
}

static int ath9k_hw_rf_claim(struct ath_hw *ah)
{
u32 val;
Expand Down Expand Up @@ -585,9 +570,15 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
ah->eep_ops->get_eeprom_ver(ah),
ah->eep_ops->get_eeprom_rev(ah));

ecode = ath9k_hw_rfattach(ah);
if (ecode != 0)
return ecode;
if (!AR_SREV_9280_10_OR_LATER(ah)) {
ecode = ath9k_hw_rf_alloc_ext_banks(ah);
if (ecode) {
ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
"Failed allocating banks for "
"external radio\n");
return ecode;
}
}

if (!AR_SREV_9100(ah)) {
ath9k_hw_ani_setup(ah);
Expand Down
19 changes: 7 additions & 12 deletions trunk/drivers/net/wireless/ath/ath9k/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,18 +409,16 @@ ath9k_hw_rf_free(struct ath_hw *ah)
}

/**
* ath9k_hw_init_rf - initialize external radio structures
* ath9k_hw_rf_alloc_ext_banks - allocates banks for external radio programming
* @ah: atheros hardware structure
* @status:
*
* Only required for older devices with external AR2133/AR5133 radios.
*/
bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
int ath9k_hw_rf_alloc_ext_banks(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);

if (AR_SREV_9280_10_OR_LATER(ah))
return true;
BUG_ON(AR_SREV_9280_10_OR_LATER(ah));

ah->analogBank0Data =
kzalloc((sizeof(u32) *
Expand Down Expand Up @@ -453,8 +451,7 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
|| ah->analogBank7Data == NULL) {
ath_print(common, ATH_DBG_FATAL,
"Cannot allocate RF banks\n");
*status = -ENOMEM;
return false;
return -ENOMEM;
}

ah->addac5416_21 =
Expand All @@ -464,8 +461,7 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
if (ah->addac5416_21 == NULL) {
ath_print(common, ATH_DBG_FATAL,
"Cannot allocate addac5416_21\n");
*status = -ENOMEM;
return false;
return -ENOMEM;
}

ah->bank6Temp =
Expand All @@ -474,11 +470,10 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
if (ah->bank6Temp == NULL) {
ath_print(common, ATH_DBG_FATAL,
"Cannot allocate bank6Temp\n");
*status = -ENOMEM;
return false;
return -ENOMEM;
}

return true;
return 0;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ath9k/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ bool ath9k_hw_set_rf_regs(struct ath_hw *ah,
u16 modesIndex);
void ath9k_hw_decrease_chain_power(struct ath_hw *ah,
struct ath9k_channel *chan);
bool ath9k_hw_init_rf(struct ath_hw *ah,
int *status);
int ath9k_hw_rf_alloc_ext_banks(struct ath_hw *ah);

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

0 comments on commit 951edaf

Please sign in to comment.