mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
rtlwifi: rtl8188ee: Fix too long disable of IRQs
commit6b63927158upstream. In commitf78bccd79bentitled "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 rtl8188ee. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8adfa292b5
commit
3151d41031
|
|
@ -1025,9 +1025,20 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
|
|||
bool rtstatus = true;
|
||||
int err = 0;
|
||||
u8 tmp_u1b, u1byte;
|
||||
unsigned long flags;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Rtl8188EE hw init\n");
|
||||
rtlpriv->rtlhal.being_init_adapter = true;
|
||||
/* 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();
|
||||
|
||||
rtlpriv->intf_ops->disable_aspm(hw);
|
||||
|
||||
tmp_u1b = rtl_read_byte(rtlpriv, REG_SYS_CLKR+1);
|
||||
|
|
@ -1043,7 +1054,7 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
|
|||
if (rtstatus != true) {
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
|
||||
err = 1;
|
||||
return err;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err = rtl88e_download_fw(hw, false);
|
||||
|
|
@ -1051,8 +1062,7 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
|
|||
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
|
||||
"Failed to download FW. Init HW without FW now..\n");
|
||||
err = 1;
|
||||
rtlhal->fw_ready = false;
|
||||
return err;
|
||||
goto exit;
|
||||
} else {
|
||||
rtlhal->fw_ready = true;
|
||||
}
|
||||
|
|
@ -1135,10 +1145,12 @@ int rtl88ee_hw_init(struct ieee80211_hw *hw)
|
|||
}
|
||||
rtl_write_byte(rtlpriv, REG_NAV_CTRL+2, ((30000+127)/128));
|
||||
rtl88e_dm_init(hw);
|
||||
exit:
|
||||
local_irq_restore(flags);
|
||||
rtlpriv->rtlhal.being_init_adapter = false;
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "end of Rtl8188EE hw init %x\n",
|
||||
err);
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
static enum version_8188e _rtl88ee_read_chip_version(struct ieee80211_hw *hw)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user