diff options
author | Nick Kossifidis <mickflemm@gmail.com> | 2010-11-23 14:44:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-30 13:53:44 -0500 |
commit | b02f5d1a17c652a74098f2a04db7fb8e6220057e (patch) | |
tree | 2a03c482ec3a7d79fa87be93feb5fa81dd625141 /drivers | |
parent | c2b0ebef262e0a9b64f7ea8ec837cfc29605bef7 (diff) |
ath5k: Tweak phy activate to rx start delay based on bwmode
* Tweak phy activation -> rx delay for different bwmodes
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 1b6fcf9e097b..8790f0ab1983 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -3356,8 +3356,6 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
3356 | /* | 3356 | /* |
3357 | * On 5211+ read activation -> rx delay | 3357 | * On 5211+ read activation -> rx delay |
3358 | * and use it. | 3358 | * and use it. |
3359 | * | ||
3360 | * TODO: Half/quarter rate support | ||
3361 | */ | 3359 | */ |
3362 | if (ah->ah_version != AR5K_AR5210) { | 3360 | if (ah->ah_version != AR5K_AR5210) { |
3363 | u32 delay; | 3361 | u32 delay; |
@@ -3365,8 +3363,13 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
3365 | AR5K_PHY_RX_DELAY_M; | 3363 | AR5K_PHY_RX_DELAY_M; |
3366 | delay = (channel->hw_value & CHANNEL_CCK) ? | 3364 | delay = (channel->hw_value & CHANNEL_CCK) ? |
3367 | ((delay << 2) / 22) : (delay / 10); | 3365 | ((delay << 2) / 22) : (delay / 10); |
3368 | 3366 | if (ah->ah_bwmode == AR5K_BWMODE_10MHZ) | |
3369 | udelay(100 + (2 * delay)); | 3367 | delay = delay << 1; |
3368 | if (ah->ah_bwmode == AR5K_BWMODE_5MHZ) | ||
3369 | delay = delay << 2; | ||
3370 | /* XXX: /2 on turbo ? Let's be safe | ||
3371 | * for now */ | ||
3372 | udelay(100 + delay); | ||
3370 | } else { | 3373 | } else { |
3371 | mdelay(1); | 3374 | mdelay(1); |
3372 | } | 3375 | } |