aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
index 52ee713d50f5..56cc3bc30860 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
@@ -747,6 +747,7 @@ static void _rtl92cu_init_queue_priority(struct ieee80211_hw *hw,
747 u8 queue_sel) 747 u8 queue_sel)
748{ 748{
749 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 749 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
750
750 if (IS_NORMAL_CHIP(rtlhal->version)) 751 if (IS_NORMAL_CHIP(rtlhal->version))
751 _rtl92cu_init_chipn_queue_priority(hw, wmm_enable, out_ep_num, 752 _rtl92cu_init_chipn_queue_priority(hw, wmm_enable, out_ep_num,
752 queue_sel); 753 queue_sel);
@@ -813,6 +814,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw)
813 u8 wmm_enable = false; /* TODO */ 814 u8 wmm_enable = false; /* TODO */
814 u8 out_ep_nums = rtlusb->out_ep_nums; 815 u8 out_ep_nums = rtlusb->out_ep_nums;
815 u8 queue_sel = rtlusb->out_queue_sel; 816 u8 queue_sel = rtlusb->out_queue_sel;
817
816 err = _rtl92cu_init_power_on(hw); 818 err = _rtl92cu_init_power_on(hw);
817 819
818 if (err) { 820 if (err) {
@@ -1013,6 +1015,7 @@ d. SYS_FUNC_EN 0x02[7:0] = 0x16 reset BB state machine
1013e. SYS_FUNC_EN 0x02[7:0] = 0x14 reset BB state machine 1015e. SYS_FUNC_EN 0x02[7:0] = 0x14 reset BB state machine
1014***************************************/ 1016***************************************/
1015 u8 erfpath = 0, value8 = 0; 1017 u8 erfpath = 0, value8 = 0;
1018
1016 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF); 1019 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF);
1017 rtl_set_rfreg(hw, (enum radio_path)erfpath, 0x0, MASKBYTE0, 0x0); 1020 rtl_set_rfreg(hw, (enum radio_path)erfpath, 0x0, MASKBYTE0, 0x0);
1018 1021
@@ -1204,6 +1207,7 @@ static void _rtl92cu_stop_tx_beacon(struct ieee80211_hw *hw)
1204 struct rtl_priv *rtlpriv = rtl_priv(hw); 1207 struct rtl_priv *rtlpriv = rtl_priv(hw);
1205 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); 1208 struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
1206 u8 tmp1byte = 0; 1209 u8 tmp1byte = 0;
1210
1207 if (IS_NORMAL_CHIP(rtlhal->version)) { 1211 if (IS_NORMAL_CHIP(rtlhal->version)) {
1208 tmp1byte = rtl_read_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2); 1212 tmp1byte = rtl_read_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2);
1209 rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2, 1213 rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2,
@@ -1353,6 +1357,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
1353 1357
1354 if (check_bssid) { 1358 if (check_bssid) {
1355 u8 tmp; 1359 u8 tmp;
1360
1356 if (IS_NORMAL_CHIP(rtlhal->version)) { 1361 if (IS_NORMAL_CHIP(rtlhal->version)) {
1357 reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); 1362 reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
1358 tmp = BIT(4); 1363 tmp = BIT(4);
@@ -1365,6 +1370,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
1365 _rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp); 1370 _rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp);
1366 } else { 1371 } else {
1367 u8 tmp; 1372 u8 tmp;
1373
1368 if (IS_NORMAL_CHIP(rtlhal->version)) { 1374 if (IS_NORMAL_CHIP(rtlhal->version)) {
1369 reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN); 1375 reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
1370 tmp = BIT(4); 1376 tmp = BIT(4);
@@ -1631,6 +1637,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
1631 case HW_VAR_ACK_PREAMBLE:{ 1637 case HW_VAR_ACK_PREAMBLE:{
1632 u8 reg_tmp; 1638 u8 reg_tmp;
1633 u8 short_preamble = (bool)*val; 1639 u8 short_preamble = (bool)*val;
1640
1634 reg_tmp = 0; 1641 reg_tmp = 0;
1635 if (short_preamble) 1642 if (short_preamble)
1636 reg_tmp |= 0x80; 1643 reg_tmp |= 0x80;
@@ -1881,6 +1888,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
1881 break; 1888 break;
1882 case HW_VAR_KEEP_ALIVE:{ 1889 case HW_VAR_KEEP_ALIVE:{
1883 u8 array[2]; 1890 u8 array[2];
1891
1884 array[0] = 0xff; 1892 array[0] = 0xff;
1885 array[1] = *((u8 *)val); 1893 array[1] = *((u8 *)val);
1886 rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2, 1894 rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2,
@@ -1963,7 +1971,6 @@ static void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
1963 if (nmode && ((curtxbw_40mhz && 1971 if (nmode && ((curtxbw_40mhz &&
1964 curshortgi_40mhz) || (!curtxbw_40mhz && 1972 curshortgi_40mhz) || (!curtxbw_40mhz &&
1965 curshortgi_20mhz))) { 1973 curshortgi_20mhz))) {
1966
1967 ratr_value |= 0x10000000; 1974 ratr_value |= 0x10000000;
1968 tmp_ratr_value = (ratr_value >> 12); 1975 tmp_ratr_value = (ratr_value >> 12);
1969 1976