提交 a53268be 编写于 作者: L Larry Finger 提交者: John W. Linville

rtlwifi: rtl8192cu: Fix too long disable of IRQs

In commit f78bccd7 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192cu.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1bae2ae3
...@@ -985,6 +985,17 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) ...@@ -985,6 +985,17 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
int err = 0; int err = 0;
static bool iqk_initialized; static bool iqk_initialized;
unsigned long flags;
/* As this function can take a very long time (up to 350 ms)
* and can be called with irqs disabled, reenable the irqs
* to let the other devices continue being serviced.
*
* It is safe doing so since our own interrupts will only be enabled
* in a subsequent step.
*/
local_save_flags(flags);
local_irq_enable();
rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU; rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU;
err = _rtl92cu_init_mac(hw); err = _rtl92cu_init_mac(hw);
...@@ -997,7 +1008,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) ...@@ -997,7 +1008,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
"Failed to download FW. Init HW without FW now..\n"); "Failed to download FW. Init HW without FW now..\n");
err = 1; err = 1;
return err; goto exit;
} }
rtlhal->last_hmeboxnum = 0; /* h2c */ rtlhal->last_hmeboxnum = 0; /* h2c */
_rtl92cu_phy_param_tab_init(hw); _rtl92cu_phy_param_tab_init(hw);
...@@ -1034,6 +1045,8 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) ...@@ -1034,6 +1045,8 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
_InitPABias(hw); _InitPABias(hw);
_update_mac_setting(hw); _update_mac_setting(hw);
rtl92c_dm_init(hw); rtl92c_dm_init(hw);
exit:
local_irq_restore(flags);
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册