aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-03-04 17:53:53 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-06 14:29:57 -0500
commitbfc1010c418a22cbebd8b1bd1e75dad6a527a609 (patch)
treed826f6eb6a07df38a8568eebbe311950fdcaa2cc /drivers/net/wireless/rtlwifi
parent6b6392715856d563719991e9ce95e773491a8983 (diff)
rtlwifi: rtl8723ae: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 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 rtl8723ae. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/hw.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
index b47167c96b58..f4c9852d1e1e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
@@ -881,14 +881,25 @@ int rtl8723ae_hw_init(struct ieee80211_hw *hw)
881 bool rtstatus = true; 881 bool rtstatus = true;
882 int err; 882 int err;
883 u8 tmp_u1b; 883 u8 tmp_u1b;
884 unsigned long flags;
884 885
885 rtlpriv->rtlhal.being_init_adapter = true; 886 rtlpriv->rtlhal.being_init_adapter = true;
887 /* As this function can take a very long time (up to 350 ms)
888 * and can be called with irqs disabled, reenable the irqs
889 * to let the other devices continue being serviced.
890 *
891 * It is safe doing so since our own interrupts will only be enabled
892 * in a subsequent step.
893 */
894 local_save_flags(flags);
895 local_irq_enable();
896
886 rtlpriv->intf_ops->disable_aspm(hw); 897 rtlpriv->intf_ops->disable_aspm(hw);
887 rtstatus = _rtl8712e_init_mac(hw); 898 rtstatus = _rtl8712e_init_mac(hw);
888 if (rtstatus != true) { 899 if (rtstatus != true) {
889 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); 900 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
890 err = 1; 901 err = 1;
891 return err; 902 goto exit;
892 } 903 }
893 904
894 err = rtl8723_download_fw(hw, false); 905 err = rtl8723_download_fw(hw, false);
@@ -896,8 +907,7 @@ int rtl8723ae_hw_init(struct ieee80211_hw *hw)
896 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, 907 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
897 "Failed to download FW. Init HW without FW now..\n"); 908 "Failed to download FW. Init HW without FW now..\n");
898 err = 1; 909 err = 1;
899 rtlhal->fw_ready = false; 910 goto exit;
900 return err;
901 } else { 911 } else {
902 rtlhal->fw_ready = true; 912 rtlhal->fw_ready = true;
903 } 913 }
@@ -972,6 +982,8 @@ int rtl8723ae_hw_init(struct ieee80211_hw *hw)
972 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n"); 982 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n");
973 } 983 }
974 rtl8723ae_dm_init(hw); 984 rtl8723ae_dm_init(hw);
985exit:
986 local_irq_restore(flags);
975 rtlpriv->rtlhal.being_init_adapter = false; 987 rtlpriv->rtlhal.being_init_adapter = false;
976 return err; 988 return err;
977} 989}