diff options
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192cu/hw.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index 468bf73cc883..68b5c7e92cfb 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -394,7 +394,7 @@ static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw) | |||
394 | if (rtlefuse->eeprom_did == 0x8176) { | 394 | if (rtlefuse->eeprom_did == 0x8176) { |
395 | if ((rtlefuse->eeprom_svid == 0x103C && | 395 | if ((rtlefuse->eeprom_svid == 0x103C && |
396 | rtlefuse->eeprom_smid == 0x1629)) | 396 | rtlefuse->eeprom_smid == 0x1629)) |
397 | rtlhal->oem_id = RT_CID_819x_HP; | 397 | rtlhal->oem_id = RT_CID_819X_HP; |
398 | else | 398 | else |
399 | rtlhal->oem_id = RT_CID_DEFAULT; | 399 | rtlhal->oem_id = RT_CID_DEFAULT; |
400 | } else { | 400 | } else { |
@@ -405,7 +405,7 @@ static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw) | |||
405 | rtlhal->oem_id = RT_CID_TOSHIBA; | 405 | rtlhal->oem_id = RT_CID_TOSHIBA; |
406 | break; | 406 | break; |
407 | case EEPROM_CID_QMI: | 407 | case EEPROM_CID_QMI: |
408 | rtlhal->oem_id = RT_CID_819x_QMI; | 408 | rtlhal->oem_id = RT_CID_819X_QMI; |
409 | break; | 409 | break; |
410 | case EEPROM_CID_WHQL: | 410 | case EEPROM_CID_WHQL: |
411 | default: | 411 | default: |
@@ -423,14 +423,14 @@ static void _rtl92cu_hal_customized_behavior(struct ieee80211_hw *hw) | |||
423 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 423 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
424 | 424 | ||
425 | switch (rtlhal->oem_id) { | 425 | switch (rtlhal->oem_id) { |
426 | case RT_CID_819x_HP: | 426 | case RT_CID_819X_HP: |
427 | usb_priv->ledctl.led_opendrain = true; | 427 | usb_priv->ledctl.led_opendrain = true; |
428 | break; | 428 | break; |
429 | case RT_CID_819x_Lenovo: | 429 | case RT_CID_819X_LENOVO: |
430 | case RT_CID_DEFAULT: | 430 | case RT_CID_DEFAULT: |
431 | case RT_CID_TOSHIBA: | 431 | case RT_CID_TOSHIBA: |
432 | case RT_CID_CCX: | 432 | case RT_CID_CCX: |
433 | case RT_CID_819x_Acer: | 433 | case RT_CID_819X_ACER: |
434 | case RT_CID_WHQL: | 434 | case RT_CID_WHQL: |
435 | default: | 435 | default: |
436 | break; | 436 | break; |
@@ -985,6 +985,17 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) | |||
985 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 985 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
986 | int err = 0; | 986 | int err = 0; |
987 | static bool iqk_initialized; | 987 | static bool iqk_initialized; |
988 | unsigned long flags; | ||
989 | |||
990 | /* As this function can take a very long time (up to 350 ms) | ||
991 | * and can be called with irqs disabled, reenable the irqs | ||
992 | * to let the other devices continue being serviced. | ||
993 | * | ||
994 | * It is safe doing so since our own interrupts will only be enabled | ||
995 | * in a subsequent step. | ||
996 | */ | ||
997 | local_save_flags(flags); | ||
998 | local_irq_enable(); | ||
988 | 999 | ||
989 | rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU; | 1000 | rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU; |
990 | err = _rtl92cu_init_mac(hw); | 1001 | err = _rtl92cu_init_mac(hw); |
@@ -997,7 +1008,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) | |||
997 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 1008 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
998 | "Failed to download FW. Init HW without FW now..\n"); | 1009 | "Failed to download FW. Init HW without FW now..\n"); |
999 | err = 1; | 1010 | err = 1; |
1000 | return err; | 1011 | goto exit; |
1001 | } | 1012 | } |
1002 | rtlhal->last_hmeboxnum = 0; /* h2c */ | 1013 | rtlhal->last_hmeboxnum = 0; /* h2c */ |
1003 | _rtl92cu_phy_param_tab_init(hw); | 1014 | _rtl92cu_phy_param_tab_init(hw); |
@@ -1034,6 +1045,8 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) | |||
1034 | _InitPABias(hw); | 1045 | _InitPABias(hw); |
1035 | _update_mac_setting(hw); | 1046 | _update_mac_setting(hw); |
1036 | rtl92c_dm_init(hw); | 1047 | rtl92c_dm_init(hw); |
1048 | exit: | ||
1049 | local_irq_restore(flags); | ||
1037 | return err; | 1050 | return err; |
1038 | } | 1051 | } |
1039 | 1052 | ||
@@ -1379,11 +1392,13 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) | |||
1379 | { | 1392 | { |
1380 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1393 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1381 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); | 1394 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); |
1382 | u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR); | 1395 | u32 reg_rcr; |
1383 | 1396 | ||
1384 | if (rtlpriv->psc.rfpwr_state != ERFON) | 1397 | if (rtlpriv->psc.rfpwr_state != ERFON) |
1385 | return; | 1398 | return; |
1386 | 1399 | ||
1400 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); | ||
1401 | |||
1387 | if (check_bssid) { | 1402 | if (check_bssid) { |
1388 | u8 tmp; | 1403 | u8 tmp; |
1389 | if (IS_NORMAL_CHIP(rtlhal->version)) { | 1404 | if (IS_NORMAL_CHIP(rtlhal->version)) { |
@@ -1795,7 +1810,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
1795 | e_aci); | 1810 | e_aci); |
1796 | break; | 1811 | break; |
1797 | } | 1812 | } |
1798 | if (rtlusb->acm_method != eAcmWay2_SW) | 1813 | if (rtlusb->acm_method != EACMWAY2_SW) |
1799 | rtlpriv->cfg->ops->set_hw_reg(hw, | 1814 | rtlpriv->cfg->ops->set_hw_reg(hw, |
1800 | HW_VAR_ACM_CTRL, &e_aci); | 1815 | HW_VAR_ACM_CTRL, &e_aci); |
1801 | break; | 1816 | break; |