|
@@ -881,14 +881,25 @@ int rtl8723ae_hw_init(struct ieee80211_hw *hw)
|
|
|
bool rtstatus = true;
|
|
|
int err;
|
|
|
u8 tmp_u1b;
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
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);
|
|
|
rtstatus = _rtl8712e_init_mac(hw);
|
|
|
if (rtstatus != true) {
|
|
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
|
|
|
err = 1;
|
|
|
- return err;
|
|
|
+ goto exit;
|
|
|
}
|
|
|
|
|
|
err = rtl8723_download_fw(hw, false);
|
|
@@ -896,8 +907,7 @@ int rtl8723ae_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;
|
|
|
}
|
|
@@ -972,6 +982,8 @@ int rtl8723ae_hw_init(struct ieee80211_hw *hw)
|
|
|
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n");
|
|
|
}
|
|
|
rtl8723ae_dm_init(hw);
|
|
|
+exit:
|
|
|
+ local_irq_restore(flags);
|
|
|
rtlpriv->rtlhal.being_init_adapter = false;
|
|
|
return err;
|
|
|
}
|