|
@@ -937,14 +937,26 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
|
|
bool is92c;
|
|
bool is92c;
|
|
int err;
|
|
int err;
|
|
u8 tmp_u1b;
|
|
u8 tmp_u1b;
|
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
rtlpci->being_init_adapter = true;
|
|
rtlpci->being_init_adapter = true;
|
|
|
|
+
|
|
|
|
+ /* Since 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);
|
|
rtlpriv->intf_ops->disable_aspm(hw);
|
|
rtstatus = _rtl92ce_init_mac(hw);
|
|
rtstatus = _rtl92ce_init_mac(hw);
|
|
if (!rtstatus) {
|
|
if (!rtstatus) {
|
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
|
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
|
|
err = 1;
|
|
err = 1;
|
|
- return err;
|
|
|
|
|
|
+ goto exit;
|
|
}
|
|
}
|
|
|
|
|
|
err = rtl92c_download_fw(hw);
|
|
err = rtl92c_download_fw(hw);
|
|
@@ -952,7 +964,7 @@ int rtl92ce_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;
|
|
rtlhal->last_hmeboxnum = 0;
|
|
@@ -1032,6 +1044,8 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
|
|
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n");
|
|
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n");
|
|
}
|
|
}
|
|
rtl92c_dm_init(hw);
|
|
rtl92c_dm_init(hw);
|
|
|
|
+exit:
|
|
|
|
+ local_irq_restore(flags);
|
|
rtlpci->being_init_adapter = false;
|
|
rtlpci->being_init_adapter = false;
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|