diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-07-01 09:50:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-05 15:26:55 -0400 |
commit | eb8b27ada953f8de182e628d71feff797707768a (patch) | |
tree | 793e511e2dc5ca9dc109aa40365ffa4551049171 /drivers/net/wireless/rtlwifi/rtl8192de | |
parent | c2a7965f528244bc35f41ca64592132c7b3c2515 (diff) |
rtlwifi: rtl8192de: Replace loops calling udelay with single mdelay
There are a number of loops to implement delays. These are replaced with
single calls to mdelay().
The need for a fix was noted by Andrew Morton <akpm@linux-foundation.org>.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 53f622150057..3ac7af1c5509 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -932,7 +932,7 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | |||
932 | enum rf_content content, | 932 | enum rf_content content, |
933 | enum radio_path rfpath) | 933 | enum radio_path rfpath) |
934 | { | 934 | { |
935 | int i, j; | 935 | int i; |
936 | u32 *radioa_array_table; | 936 | u32 *radioa_array_table; |
937 | u32 *radiob_array_table; | 937 | u32 *radiob_array_table; |
938 | u16 radioa_arraylen, radiob_arraylen; | 938 | u16 radioa_arraylen, radiob_arraylen; |
@@ -974,13 +974,10 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | |||
974 | mdelay(50); | 974 | mdelay(50); |
975 | } else if (radioa_array_table[i] == 0xfd) { | 975 | } else if (radioa_array_table[i] == 0xfd) { |
976 | /* delay_ms(5); */ | 976 | /* delay_ms(5); */ |
977 | for (j = 0; j < 100; j++) | 977 | mdelay(5); |
978 | udelay(MAX_STALL_TIME); | ||
979 | } else if (radioa_array_table[i] == 0xfc) { | 978 | } else if (radioa_array_table[i] == 0xfc) { |
980 | /* delay_ms(1); */ | 979 | /* delay_ms(1); */ |
981 | for (j = 0; j < 20; j++) | 980 | mdelay(1); |
982 | udelay(MAX_STALL_TIME); | ||
983 | |||
984 | } else if (radioa_array_table[i] == 0xfb) { | 981 | } else if (radioa_array_table[i] == 0xfb) { |
985 | udelay(50); | 982 | udelay(50); |
986 | } else if (radioa_array_table[i] == 0xfa) { | 983 | } else if (radioa_array_table[i] == 0xfa) { |
@@ -1004,12 +1001,10 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | |||
1004 | mdelay(50); | 1001 | mdelay(50); |
1005 | } else if (radiob_array_table[i] == 0xfd) { | 1002 | } else if (radiob_array_table[i] == 0xfd) { |
1006 | /* delay_ms(5); */ | 1003 | /* delay_ms(5); */ |
1007 | for (j = 0; j < 100; j++) | 1004 | mdelay(5); |
1008 | udelay(MAX_STALL_TIME); | ||
1009 | } else if (radiob_array_table[i] == 0xfc) { | 1005 | } else if (radiob_array_table[i] == 0xfc) { |
1010 | /* delay_ms(1); */ | 1006 | /* delay_ms(1); */ |
1011 | for (j = 0; j < 20; j++) | 1007 | mdelay(1); |
1012 | udelay(MAX_STALL_TIME); | ||
1013 | } else if (radiob_array_table[i] == 0xfb) { | 1008 | } else if (radiob_array_table[i] == 0xfb) { |
1014 | udelay(50); | 1009 | udelay(50); |
1015 | } else if (radiob_array_table[i] == 0xfa) { | 1010 | } else if (radiob_array_table[i] == 0xfa) { |
@@ -1276,7 +1271,7 @@ static void rtl92d_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) | |||
1276 | { | 1271 | { |
1277 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1272 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1278 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 1273 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
1279 | u8 i, value8; | 1274 | u8 value8; |
1280 | 1275 | ||
1281 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("==>\n")); | 1276 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("==>\n")); |
1282 | rtlhal->bandset = band; | 1277 | rtlhal->bandset = band; |
@@ -1321,8 +1316,7 @@ static void rtl92d_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) | |||
1321 | rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == | 1316 | rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == |
1322 | 0 ? REG_MAC0 : REG_MAC1), value8); | 1317 | 0 ? REG_MAC0 : REG_MAC1), value8); |
1323 | } | 1318 | } |
1324 | for (i = 0; i < 20; i++) | 1319 | mdelay(1); |
1325 | udelay(MAX_STALL_TIME); | ||
1326 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("<==Switch Band OK.\n")); | 1320 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("<==Switch Band OK.\n")); |
1327 | } | 1321 | } |
1328 | 1322 | ||