From: Nick Kossifidis Date: Tue, 23 Nov 2010 19:44:02 +0000 (+0200) Subject: ath5k: Tweak phy activate to rx start delay based on bwmode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b02f5d1a17c652a74098f2a04db7fb8e6220057e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ath5k: Tweak phy activate to rx start delay based on bwmode * Tweak phy activation -> rx delay for different bwmodes Signed-off-by: Nick Kossifidis Signed-off-by: John W. Linville --- 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, /* * On 5211+ read activation -> rx delay * and use it. - * - * TODO: Half/quarter rate support */ if (ah->ah_version != AR5K_AR5210) { u32 delay; @@ -3365,8 +3363,13 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, AR5K_PHY_RX_DELAY_M; delay = (channel->hw_value & CHANNEL_CCK) ? ((delay << 2) / 22) : (delay / 10); - - udelay(100 + (2 * delay)); + if (ah->ah_bwmode == AR5K_BWMODE_10MHZ) + delay = delay << 1; + if (ah->ah_bwmode == AR5K_BWMODE_5MHZ) + delay = delay << 2; + /* XXX: /2 on turbo ? Let's be safe + * for now */ + udelay(100 + delay); } else { mdelay(1); }