Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 598919 Details for
Bug 797709
RTL8192CE randomly drops signal when used as access point, kernel generates WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0xc2/0x100() when re-starting hostapd
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch 2 of 6 to update driver to 12/30/2011 vendor version
0002-rtlwifi-Replace-long-delays-with-shorter-steps.patch (text/plain), 21.57 KB, created by
Larry Finger
on 2012-07-18 15:19:57 UTC
(
hide
)
Description:
Patch 2 of 6 to update driver to 12/30/2011 vendor version
Filename:
MIME Type:
Creator:
Larry Finger
Created:
2012-07-18 15:19:57 UTC
Size:
21.57 KB
patch
obsolete
>From 870806d504da103706e9591d09c33792cb832927 Mon Sep 17 00:00:00 2001 >From: Larry Finger <Larry.Finger@lwfinger.net> >Date: Tue, 17 Jul 2012 21:08:37 -0500 >Subject: [PATCH 2/6] rtlwifi: Replace long delays with shorter steps > >There are a number of millisecond delays in all the drivers where >a sleep is not allowed. These are broken into a series of short >delays so that other processes can interrupt. > >Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> >--- > drivers/net/wireless/rtlwifi/core.c | 4 +- > drivers/net/wireless/rtlwifi/pci.c | 2 +- > drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 +- > drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 16 ++++---- > drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h | 1 - > drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 26 ++++++------ > drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 1 - > drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 26 ++++++------ > drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 42 ++++++++++---------- > drivers/net/wireless/rtlwifi/rtl8192de/phy.h | 1 - > drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 40 +++++++++---------- > drivers/net/wireless/rtlwifi/wifi.h | 11 +++++ > 12 files changed, 90 insertions(+), 82 deletions(-) > >diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c >index 278e9f9..83bd127 100644 >--- a/drivers/net/wireless/rtlwifi/core.c >+++ b/drivers/net/wireless/rtlwifi/core.c >@@ -106,7 +106,7 @@ static void rtl_op_stop(struct ieee80211_hw *hw) > > if (unlikely(ppsc->rfpwr_state == ERFOFF)) { > rtl_ips_nic_on(hw); >- mdelay(1); >+ rtl_mdelay(1); > } > > mutex_lock(&rtlpriv->locks.conf_mutex); >@@ -381,7 +381,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed) > */ > if (rtlpriv->mac80211.offchan_delay) { > rtlpriv->mac80211.offchan_delay = false; >- mdelay(50); >+ rtl_mdelay(50); > } > rtlphy->current_channel = wide_chan; > >diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c >index 2c6eb9e..ccb4d9b 100644 >--- a/drivers/net/wireless/rtlwifi/pci.c >+++ b/drivers/net/wireless/rtlwifi/pci.c >@@ -1566,7 +1566,7 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) > spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flags); > break; > } >- mdelay(1); >+ rtl_mdelay(1); > RFInProgressTimeOut++; > spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flags); > } >diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c >index 692c8ef..60cf5c6 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c >@@ -240,7 +240,7 @@ static int _rtl92c_fw_free_to_go(struct ieee80211_hw *hw) > return 0; > } > >- mdelay(FW_8192C_POLLING_DELAY); >+ rtl_mdelay(FW_8192C_POLLING_DELAY); > > } while (counter++ < FW_8192C_POLLING_TIMEOUT_COUNT); > >diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c >index cdcad7d..01a191c 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c >@@ -125,12 +125,12 @@ u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw, > (newoffset << 23) | BLSSIREADEDGE; > rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD, > tmplong & (~BLSSIREADEDGE)); >- mdelay(1); >+ rtl_mdelay(1); > rtl_set_bbreg(hw, pphyreg->rfhssi_para2, MASKDWORD, tmplong2); >- mdelay(1); >+ rtl_mdelay(1); > rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD, > tmplong | BLSSIREADEDGE); >- mdelay(1); >+ rtl_mdelay(1); > if (rfpath == RF90_PATH_A) > rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER1, > BIT(8)); >@@ -683,7 +683,7 @@ void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw) > (hw, rtlphy->current_channel, &rtlphy->sw_chnl_stage, > &rtlphy->sw_chnl_step, &delay)) { > if (delay > 0) >- mdelay(delay); >+ rtl_mdelay(delay); > else > continue; > } else { >@@ -881,7 +881,7 @@ static u8 _rtl92c_phy_path_a_iqk(struct ieee80211_hw *hw, bool config_pathb) > rtl_set_bbreg(hw, 0xe48, MASKDWORD, 0xf9000000); > rtl_set_bbreg(hw, 0xe48, MASKDWORD, 0xf8000000); > >- mdelay(IQK_DELAY_TIME); >+ rtl_mdelay(IQK_DELAY_TIME); > > reg_eac = rtl_get_bbreg(hw, 0xeac, MASKDWORD); > reg_e94 = rtl_get_bbreg(hw, 0xe94, MASKDWORD); >@@ -909,7 +909,7 @@ static u8 _rtl92c_phy_path_b_iqk(struct ieee80211_hw *hw) > > rtl_set_bbreg(hw, 0xe60, MASKDWORD, 0x00000002); > rtl_set_bbreg(hw, 0xe60, MASKDWORD, 0x00000000); >- mdelay(IQK_DELAY_TIME); >+ rtl_mdelay(IQK_DELAY_TIME); > reg_eac = rtl_get_bbreg(hw, 0xeac, MASKDWORD); > reg_eb4 = rtl_get_bbreg(hw, 0xeb4, MASKDWORD); > reg_ebc = rtl_get_bbreg(hw, 0xebc, MASKDWORD); >@@ -1563,7 +1563,7 @@ static void _rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, > rtl_get_bbreg(hw, apk_offset[path], > MASKDWORD))); > >- mdelay(3); >+ rtl_mdelay(3); > > rtl_set_bbreg(hw, apk_offset[path], > MASKDWORD, apk_value[1]); >@@ -1574,7 +1574,7 @@ static void _rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, > rtl_get_bbreg(hw, apk_offset[path], > MASKDWORD))); > >- mdelay(20); >+ rtl_mdelay(20); > > rtl_set_bbreg(hw, 0xe28, MASKDWORD, 0x00000000); > >diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h >index cec10d6..ed6b69d 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h >+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h >@@ -49,7 +49,6 @@ > #define PATH_NUM 2 > > #define LOOP_LIMIT 5 >-#define MAX_STALL_TIME 50 > #define AntennaDiversityValue 0x80 > #define MAX_TXPWR_IDX_NMODE_92S 63 > #define Reset_Cnt_Limit 3 >diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c >index 88deae6..3e601f4 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c >@@ -197,11 +197,11 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_reg_arraylen; i = i + 2) { > if (phy_regarray_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table[i] == 0xfb) > udelay(50); > else if (phy_regarray_table[i] == 0xfa) >@@ -244,11 +244,11 @@ bool _rtl92ce_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_regarray_pg_len; i = i + 3) { > if (phy_regarray_table_pg[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table_pg[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table_pg[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table_pg[i] == 0xfb) > udelay(50); > else if (phy_regarray_table_pg[i] == 0xfa) >@@ -304,11 +304,11 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > case RF90_PATH_A: > for (i = 0; i < radioa_arraylen; i = i + 2) { > if (radioa_array_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (radioa_array_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radioa_array_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radioa_array_table[i] == 0xfb) > udelay(50); > else if (radioa_array_table[i] == 0xfa) >@@ -326,11 +326,11 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > case RF90_PATH_B: > for (i = 0; i < radiob_arraylen; i = i + 2) { > if (radiob_array_table[i] == 0xfe) { >- mdelay(50); >+ rtl_mdelay(50); > } else if (radiob_array_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radiob_array_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radiob_array_table[i] == 0xfb) > udelay(50); > else if (radiob_array_table[i] == 0xfa) >@@ -456,7 +456,7 @@ void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t) > > rtl_set_rfreg(hw, RF90_PATH_A, 0x18, MASK12BITS, lc_cal | 0x08000); > >- mdelay(100); >+ rtl_mdelay(100); > > if ((tmpreg & 0x70) != 0) { > rtl_write_byte(rtlpriv, 0xd03, tmpreg); >diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h >index d5e3b70..9a11bad 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h >+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h >@@ -49,7 +49,6 @@ > #define PATH_NUM 2 > > #define LOOP_LIMIT 5 >-#define MAX_STALL_TIME 50 > #define AntennaDiversityValue 0x80 > #define MAX_TXPWR_IDX_NMODE_92S 63 > #define Reset_Cnt_Limit 3 >diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c >index 34e5630..3c13393 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c >@@ -185,11 +185,11 @@ bool _rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_reg_arraylen; i = i + 2) { > if (phy_regarray_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table[i] == 0xfb) > udelay(50); > else if (phy_regarray_table[i] == 0xfa) >@@ -233,11 +233,11 @@ bool _rtl92cu_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_regarray_pg_len; i = i + 3) { > if (phy_regarray_table_pg[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table_pg[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table_pg[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table_pg[i] == 0xfb) > udelay(50); > else if (phy_regarray_table_pg[i] == 0xfa) >@@ -291,11 +291,11 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > case RF90_PATH_A: > for (i = 0; i < radioa_arraylen; i = i + 2) { > if (radioa_array_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (radioa_array_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radioa_array_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radioa_array_table[i] == 0xfb) > udelay(50); > else if (radioa_array_table[i] == 0xfa) >@@ -313,11 +313,11 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > case RF90_PATH_B: > for (i = 0; i < radiob_arraylen; i = i + 2) { > if (radiob_array_table[i] == 0xfe) { >- mdelay(50); >+ rtl_mdelay(50); > } else if (radiob_array_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radiob_array_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radiob_array_table[i] == 0xfb) > udelay(50); > else if (radiob_array_table[i] == 0xfa) >@@ -442,7 +442,7 @@ void _rtl92cu_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t) > } > lc_cal = rtl_get_rfreg(hw, RF90_PATH_A, 0x18, MASK12BITS); > rtl_set_rfreg(hw, RF90_PATH_A, 0x18, MASK12BITS, lc_cal | 0x08000); >- mdelay(100); >+ rtl_mdelay(100); > if ((tmpreg & 0x70) != 0) { > rtl_write_byte(rtlpriv, 0xd03, tmpreg); > rtl_set_rfreg(hw, RF90_PATH_A, 0x00, MASK12BITS, rf_a_mode); >diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c >index 4420312..c913572 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c >@@ -586,11 +586,11 @@ static bool _rtl92d_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_reg_arraylen; i = i + 2) { > if (phy_regarray_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table[i] == 0xfb) > udelay(50); > else if (phy_regarray_table[i] == 0xfa) >@@ -725,11 +725,11 @@ static bool _rtl92d_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_regarray_pg_len; i = i + 3) { > if (phy_regarray_table_pg[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray_table_pg[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray_table_pg[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray_table_pg[i] == 0xfb) > udelay(50); > else if (phy_regarray_table_pg[i] == 0xfa) >@@ -863,13 +863,13 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > case RF90_PATH_A: > for (i = 0; i < radioa_arraylen; i = i + 2) { > if (radioa_array_table[i] == 0xfe) { >- mdelay(50); >+ rtl_mdelay(50); > } else if (radioa_array_table[i] == 0xfd) { > /* delay_ms(5); */ >- mdelay(5); >+ rtl_mdelay(5); > } else if (radioa_array_table[i] == 0xfc) { > /* delay_ms(1); */ >- mdelay(1); >+ rtl_mdelay(1); > } else if (radioa_array_table[i] == 0xfb) { > udelay(50); > } else if (radioa_array_table[i] == 0xfa) { >@@ -890,13 +890,13 @@ bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, > if (radiob_array_table[i] == 0xfe) { > /* Delay specific ms. Only RF configuration > * requires delay. */ >- mdelay(50); >+ rtl_mdelay(50); > } else if (radiob_array_table[i] == 0xfd) { > /* delay_ms(5); */ >- mdelay(5); >+ rtl_mdelay(5); > } else if (radiob_array_table[i] == 0xfc) { > /* delay_ms(1); */ >- mdelay(1); >+ rtl_mdelay(1); > } else if (radiob_array_table[i] == 0xfb) { > udelay(50); > } else if (radiob_array_table[i] == 0xfa) { >@@ -1206,7 +1206,7 @@ static void rtl92d_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) > rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == > 0 ? REG_MAC0 : REG_MAC1), value8); > } >- mdelay(1); >+ rtl_mdelay(1); > RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "<==Switch Band OK\n"); > } > >@@ -1566,7 +1566,7 @@ static u8 _rtl92d_phy_patha_iqk(struct ieee80211_hw *hw, bool configpathb) > RTPRINT(rtlpriv, FINIT, INIT_IQK, > "Delay %d ms for One shot, path A LOK & IQK\n", > IQK_DELAY_TIME); >- mdelay(IQK_DELAY_TIME); >+ rtl_mdelay(IQK_DELAY_TIME); > /* Check failed */ > regeac = rtl_get_bbreg(hw, 0xeac, BMASKDWORD); > RTPRINT(rtlpriv, FINIT, INIT_IQK, "0xeac = 0x%x\n", regeac); >@@ -1637,7 +1637,7 @@ static u8 _rtl92d_phy_patha_iqk_5g_normal(struct ieee80211_hw *hw, > RTPRINT(rtlpriv, FINIT, INIT_IQK, > "Delay %d ms for One shot, path A LOK & IQK.\n", > IQK_DELAY_TIME); >- mdelay(IQK_DELAY_TIME * 10); >+ rtl_mdelay(IQK_DELAY_TIME * 10); > /* Check failed */ > regeac = rtl_get_bbreg(hw, 0xeac, BMASKDWORD); > RTPRINT(rtlpriv, FINIT, INIT_IQK, "0xeac = 0x%x\n", regeac); >@@ -1689,7 +1689,7 @@ static u8 _rtl92d_phy_pathb_iqk(struct ieee80211_hw *hw) > /* delay x ms */ > RTPRINT(rtlpriv, FINIT, INIT_IQK, > "Delay %d ms for One shot, path B LOK & IQK\n", IQK_DELAY_TIME); >- mdelay(IQK_DELAY_TIME); >+ rtl_mdelay(IQK_DELAY_TIME); > /* Check failed */ > regeac = rtl_get_bbreg(hw, 0xeac, BMASKDWORD); > RTPRINT(rtlpriv, FINIT, INIT_IQK, "0xeac = 0x%x\n", regeac); >@@ -1756,7 +1756,7 @@ static u8 _rtl92d_phy_pathb_iqk_5g_normal(struct ieee80211_hw *hw) > /* delay x ms */ > RTPRINT(rtlpriv, FINIT, INIT_IQK, > "Delay %d ms for One shot, path B LOK & IQK.\n", 10); >- mdelay(IQK_DELAY_TIME * 10); >+ rtl_mdelay(IQK_DELAY_TIME * 10); > > /* Check failed */ > regeac = rtl_get_bbreg(hw, 0xeac, BMASKDWORD); >@@ -2087,7 +2087,7 @@ static void _rtl92d_phy_iq_calibrate_5g_normal(struct ieee80211_hw *hw, > * PHY_REG.txt , and radio_a, radio_b.txt */ > > RTPRINT(rtlpriv, FINIT, INIT_IQK, "IQK for 5G NORMAL:Start!!!\n"); >- mdelay(IQK_DELAY_TIME * 20); >+ rtl_mdelay(IQK_DELAY_TIME * 20); > if (t == 0) { > bbvalue = rtl_get_bbreg(hw, RFPGA0_RFMOD, BMASKDWORD); > RTPRINT(rtlpriv, FINIT, INIT_IQK, "==>0x%08x\n", bbvalue); >@@ -2716,7 +2716,7 @@ static void _rtl92d_phy_lc_calibrate_sw(struct ieee80211_hw *hw, bool is2t) > u4tmp = rtl_get_rfreg(hw, (enum radio_path)index, RF_SYN_G6, > BRFREGOFFSETMASK); > while ((!(u4tmp & BIT(11))) && timecount <= timeout) { >- mdelay(50); >+ rtl_mdelay(50); > timecount += 50; > u4tmp = rtl_get_rfreg(hw, (enum radio_path)index, > RF_SYN_G6, BRFREGOFFSETMASK); >@@ -3001,7 +3001,7 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw) > return 0; > } > while (rtlphy->lck_inprogress && timecount < timeout) { >- mdelay(50); >+ rtl_mdelay(50); > timecount += 50; > } > if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY && >@@ -3048,7 +3048,7 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw) > rtlphy->current_channel, > &rtlphy->sw_chnl_stage, &rtlphy->sw_chnl_step, &delay)) { > if (delay > 0) >- mdelay(delay); >+ rtl_mdelay(delay); > else > continue; > } else { >diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h >index f074952..6c1deba 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h >+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h >@@ -49,7 +49,6 @@ > #define PATH_NUM 2 > > #define LOOP_LIMIT 5 >-#define MAX_STALL_TIME 50 > #define ANTENNA_DIVERSITY_VALUE 0x80 > #define MAX_TXPWR_IDX_NMODE_92S 63 > #define RESET_CNT_LIMIT 3 >diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c >index b917a2a..dffe7e7 100644 >--- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c >+++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c >@@ -122,14 +122,14 @@ static u32 _rtl92s_phy_rf_serial_read(struct ieee80211_hw *hw, > rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD, > tmplong & (~BLSSI_READEDGE)); > >- mdelay(1); >+ rtl_mdelay(1); > > rtl_set_bbreg(hw, pphyreg->rfhssi_para2, MASKDWORD, tmplong2); >- mdelay(1); >+ rtl_mdelay(1); > > rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD, tmplong | > BLSSI_READEDGE); >- mdelay(1); >+ rtl_mdelay(1); > > if (rfpath == RF90_PATH_A) > rfpi_enable = (u8)rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER1, >@@ -485,7 +485,7 @@ u8 rtl92s_phy_sw_chnl(struct ieee80211_hw *hw) > &rtlphy->sw_chnl_step, &delay); > if (!ret) { > if (delay > 0) >- mdelay(delay); >+ rtl_mdelay(delay); > else > continue; > } else { >@@ -852,11 +852,11 @@ static bool _rtl92s_phy_config_bb(struct ieee80211_hw *hw, u8 configtype) > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_reg_len; i = i + 2) { > if (phy_reg_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_reg_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_reg_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_reg_table[i] == 0xfb) > udelay(50); > else if (phy_reg_table[i] == 0xfa) >@@ -905,11 +905,11 @@ static bool _rtl92s_phy_set_bb_to_diff_rf(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_regarray2xtxr_len; i = i + 3) { > if (phy_regarray2xtxr_table[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_regarray2xtxr_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_regarray2xtxr_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_regarray2xtxr_table[i] == 0xfb) > udelay(50); > else if (phy_regarray2xtxr_table[i] == 0xfa) >@@ -939,11 +939,11 @@ static bool _rtl92s_phy_config_bb_with_pg(struct ieee80211_hw *hw, > if (configtype == BASEBAND_CONFIG_PHY_REG) { > for (i = 0; i < phy_pg_len; i = i + 3) { > if (phy_table_pg[i] == 0xfe) >- mdelay(50); >+ rtl_mdelay(50); > else if (phy_table_pg[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (phy_table_pg[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (phy_table_pg[i] == 0xfb) > udelay(50); > else if (phy_table_pg[i] == 0xfa) >@@ -1055,11 +1055,11 @@ u8 rtl92s_phy_config_rf(struct ieee80211_hw *hw, enum radio_path rfpath) > if (radio_a_table[i] == 0xfe) > /* Delay specific ms. Only RF configuration > * requires delay. */ >- mdelay(50); >+ rtl_mdelay(50); > else if (radio_a_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radio_a_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radio_a_table[i] == 0xfb) > udelay(50); > else if (radio_a_table[i] == 0xfa) >@@ -1084,11 +1084,11 @@ u8 rtl92s_phy_config_rf(struct ieee80211_hw *hw, enum radio_path rfpath) > if (radio_b_table[i] == 0xfe) > /* Delay specific ms. Only RF configuration > * requires delay.*/ >- mdelay(50); >+ rtl_mdelay(50); > else if (radio_b_table[i] == 0xfd) >- mdelay(5); >+ rtl_mdelay(5); > else if (radio_b_table[i] == 0xfc) >- mdelay(1); >+ rtl_mdelay(1); > else if (radio_b_table[i] == 0xfb) > udelay(50); > else if (radio_b_table[i] == 0xfa) >@@ -1153,7 +1153,7 @@ bool rtl92s_phy_bb_config(struct ieee80211_hw *hw) > /* Check BB/RF confiuration setting. */ > /* We only need to configure RF which is turned on. */ > path1 = (u8)(rtl92s_phy_query_bb_reg(hw, RFPGA0_TXINFO, 0xf)); >- mdelay(10); >+ rtl_mdelay(10); > path2 = (u8)(rtl92s_phy_query_bb_reg(hw, ROFDM0_TRXPATHENABLE, 0xf)); > pathmap = path1 | path2; > >diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h >index 3ae43f9..378bafb 100644 >--- a/drivers/net/wireless/rtlwifi/wifi.h >+++ b/drivers/net/wireless/rtlwifi/wifi.h >@@ -175,6 +175,17 @@ enum hardware_type { > _pdesc->rxmcs == DESC92_RATE5_5M || \ > _pdesc->rxmcs == DESC92_RATE11M) > >+ >+#define MAX_STALL_TIME 50 >+ >+static inline void rtl_mdelay(int count) >+{ >+ int j; >+ >+ for (j = 0; j < 20 * count; j++) >+ udelay(MAX_STALL_TIME); >+} >+ > enum scan_operation_backup_opt { > SCAN_OPT_BACKUP = 0, > SCAN_OPT_RESTORE, >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 797709
:
565954
|
592503
|
593847
|
593848
|
597390
|
597641
|
598918
| 598919 |
598920
|
598921
|
598922
|
598924