diff options
author | Nick Kossifidis <mickflemm@gmail.com> | 2008-02-28 14:50:50 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-07 16:02:58 -0500 |
commit | 903b474efabab6a4ce697063c367afd8e2ad83f3 (patch) | |
tree | d7a7ab944a519122fcb958c01ed42cd2d8d91096 /drivers/net | |
parent | 0af2256319959aaca95959a493ed2282edaaae3e (diff) |
ath5k: more RF2413 stuff
* Add AR5K_RF2413 to radio check during hw_reset so it doesn't complain
* Write ah_phy_spending value we set during attach instead of checking
each time for radio revision
* Skip txpower setup for RF2413 because it can't transmit with it
(weird thing is that RF5413 has no problem with it).
Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath5k/hw.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/phy.c | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index f4d383e956a0..bd1513d1460b 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c | |||
@@ -640,7 +640,8 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, | |||
640 | if (ah->ah_version != AR5K_AR5210) { | 640 | if (ah->ah_version != AR5K_AR5210) { |
641 | if (ah->ah_radio != AR5K_RF5111 && | 641 | if (ah->ah_radio != AR5K_RF5111 && |
642 | ah->ah_radio != AR5K_RF5112 && | 642 | ah->ah_radio != AR5K_RF5112 && |
643 | ah->ah_radio != AR5K_RF5413) { | 643 | ah->ah_radio != AR5K_RF5413 && |
644 | ah->ah_radio != AR5K_RF2413) { | ||
644 | ATH5K_ERR(ah->ah_sc, | 645 | ATH5K_ERR(ah->ah_sc, |
645 | "invalid phy radio: %u\n", ah->ah_radio); | 646 | "invalid phy radio: %u\n", ah->ah_radio); |
646 | return -EINVAL; | 647 | return -EINVAL; |
@@ -1002,9 +1003,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, | |||
1002 | ath5k_hw_reg_write(ah, AR5K_PHY_SCAL_32MHZ, AR5K_PHY_SCAL); | 1003 | ath5k_hw_reg_write(ah, AR5K_PHY_SCAL_32MHZ, AR5K_PHY_SCAL); |
1003 | ath5k_hw_reg_write(ah, AR5K_PHY_SCLOCK_32MHZ, AR5K_PHY_SCLOCK); | 1004 | ath5k_hw_reg_write(ah, AR5K_PHY_SCLOCK_32MHZ, AR5K_PHY_SCLOCK); |
1004 | ath5k_hw_reg_write(ah, AR5K_PHY_SDELAY_32MHZ, AR5K_PHY_SDELAY); | 1005 | ath5k_hw_reg_write(ah, AR5K_PHY_SDELAY_32MHZ, AR5K_PHY_SDELAY); |
1005 | ath5k_hw_reg_write(ah, ah->ah_radio == AR5K_RF5111 ? | 1006 | ath5k_hw_reg_write(ah, ah->ah_phy_spending, AR5K_PHY_SPENDING); |
1006 | AR5K_PHY_SPENDING_RF5111 : AR5K_PHY_SPENDING_RF5112, | ||
1007 | AR5K_PHY_SPENDING); | ||
1008 | } | 1007 | } |
1009 | 1008 | ||
1010 | /* | 1009 | /* |
diff --git a/drivers/net/wireless/ath5k/phy.c b/drivers/net/wireless/ath5k/phy.c index f108b08ff4af..40efd4d3b54c 100644 --- a/drivers/net/wireless/ath5k/phy.c +++ b/drivers/net/wireless/ath5k/phy.c | |||
@@ -2178,6 +2178,15 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
2178 | return -EINVAL; | 2178 | return -EINVAL; |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | /* | ||
2182 | * RF2413 for some reason can't | ||
2183 | * transmit anything if we call | ||
2184 | * this funtion, so we skip it | ||
2185 | * until we fix txpower. | ||
2186 | */ | ||
2187 | if (ah->ah_radio == AR5K_RF2413) | ||
2188 | return 0; | ||
2189 | |||
2181 | /* Reset TX power values */ | 2190 | /* Reset TX power values */ |
2182 | memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); | 2191 | memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); |
2183 | ah->ah_txpower.txp_tpc = tpc; | 2192 | ah->ah_txpower.txp_tpc = tpc; |