diff options
22 files changed, 219 insertions, 142 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index f8a2d9f28e46..cac1fa912e8c 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
@@ -473,6 +473,7 @@ int rtl_init_core(struct ieee80211_hw *hw) | |||
473 | spin_lock_init(&rtlpriv->locks.rf_lock); | 473 | spin_lock_init(&rtlpriv->locks.rf_lock); |
474 | spin_lock_init(&rtlpriv->locks.waitq_lock); | 474 | spin_lock_init(&rtlpriv->locks.waitq_lock); |
475 | spin_lock_init(&rtlpriv->locks.entry_list_lock); | 475 | spin_lock_init(&rtlpriv->locks.entry_list_lock); |
476 | spin_lock_init(&rtlpriv->locks.fw_ps_lock); | ||
476 | spin_lock_init(&rtlpriv->locks.cck_and_rw_pagea_lock); | 477 | spin_lock_init(&rtlpriv->locks.cck_and_rw_pagea_lock); |
477 | spin_lock_init(&rtlpriv->locks.check_sendpkt_lock); | 478 | spin_lock_init(&rtlpriv->locks.check_sendpkt_lock); |
478 | spin_lock_init(&rtlpriv->locks.fw_ps_lock); | 479 | spin_lock_init(&rtlpriv->locks.fw_ps_lock); |
diff --git a/drivers/net/wireless/rtlwifi/debug.h b/drivers/net/wireless/rtlwifi/debug.h index 60119a666da7..6d669364e3d9 100644 --- a/drivers/net/wireless/rtlwifi/debug.h +++ b/drivers/net/wireless/rtlwifi/debug.h | |||
@@ -115,11 +115,11 @@ | |||
115 | /* Define EEPROM and EFUSE check module bit*/ | 115 | /* Define EEPROM and EFUSE check module bit*/ |
116 | #define EEPROM_W BIT(0) | 116 | #define EEPROM_W BIT(0) |
117 | #define EFUSE_PG BIT(1) | 117 | #define EFUSE_PG BIT(1) |
118 | #define EFUSE_READ_ALL BIT(2) | 118 | #define EFUSE_READ_ALL BIT(2) |
119 | 119 | ||
120 | /* Define init check for module bit*/ | 120 | /* Define init check for module bit*/ |
121 | #define INIT_EEPROM BIT(0) | 121 | #define INIT_EEPROM BIT(0) |
122 | #define INIT_TxPower BIT(1) | 122 | #define INIT_TXPOWER BIT(1) |
123 | #define INIT_IQK BIT(2) | 123 | #define INIT_IQK BIT(2) |
124 | #define INIT_RF BIT(3) | 124 | #define INIT_RF BIT(3) |
125 | 125 | ||
@@ -142,6 +142,8 @@ | |||
142 | #define DM_DIG BIT(3) | 142 | #define DM_DIG BIT(3) |
143 | #define DM_EDCA_TURBO BIT(4) | 143 | #define DM_EDCA_TURBO BIT(4) |
144 | 144 | ||
145 | #define DM_PWDB BIT(1) | ||
146 | |||
145 | enum dbgp_flag_e { | 147 | enum dbgp_flag_e { |
146 | FQOS = 0, | 148 | FQOS = 0, |
147 | FTX = 1, | 149 | FTX = 1, |
diff --git a/drivers/net/wireless/rtlwifi/efuse.h b/drivers/net/wireless/rtlwifi/efuse.h index 2bdea9a8699e..395a326acfb4 100644 --- a/drivers/net/wireless/rtlwifi/efuse.h +++ b/drivers/net/wireless/rtlwifi/efuse.h | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #define EFUSE_IC_ID_OFFSET 506 | 33 | #define EFUSE_IC_ID_OFFSET 506 |
34 | 34 | ||
35 | #define EFUSE_REAL_CONTENT_LEN 512 | ||
36 | #define EFUSE_MAP_LEN 128 | 35 | #define EFUSE_MAP_LEN 128 |
37 | #define EFUSE_MAX_WORD_UNIT 4 | 36 | #define EFUSE_MAX_WORD_UNIT 4 |
38 | 37 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index b449d41a3084..eab449222ce0 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -861,7 +861,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) | |||
861 | RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "beacon interrupt!\n"); | 861 | RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "beacon interrupt!\n"); |
862 | } | 862 | } |
863 | 863 | ||
864 | if (inta & rtlpriv->cfg->maps[RTL_IMR_BcnInt]) { | 864 | if (inta & rtlpriv->cfg->maps[RTL_IMR_BCNINT]) { |
865 | RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, | 865 | RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, |
866 | "prepare beacon for interrupt!\n"); | 866 | "prepare beacon for interrupt!\n"); |
867 | tasklet_schedule(&rtlpriv->works.irq_prepare_bcn_tasklet); | 867 | tasklet_schedule(&rtlpriv->works.irq_prepare_bcn_tasklet); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c index b0b9f905848e..926e2a34c766 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | |||
@@ -174,8 +174,8 @@ static void rtl92c_dm_diginit(struct ieee80211_hw *hw) | |||
174 | dm_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; | 174 | dm_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; |
175 | dm_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; | 175 | dm_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; |
176 | dm_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; | 176 | dm_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; |
177 | dm_digtable->rx_gain_range_max = DM_DIG_MAX; | 177 | dm_digtable->rx_gain_max = DM_DIG_MAX; |
178 | dm_digtable->rx_gain_range_min = DM_DIG_MIN; | 178 | dm_digtable->rx_gain_min = DM_DIG_MIN; |
179 | dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; | 179 | dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; |
180 | dm_digtable->back_range_max = DM_DIG_BACKOFF_MAX; | 180 | dm_digtable->back_range_max = DM_DIG_BACKOFF_MAX; |
181 | dm_digtable->back_range_min = DM_DIG_BACKOFF_MIN; | 181 | dm_digtable->back_range_min = DM_DIG_BACKOFF_MIN; |
@@ -300,11 +300,11 @@ static void rtl92c_dm_ctrl_initgain_by_rssi(struct ieee80211_hw *hw) | |||
300 | } | 300 | } |
301 | 301 | ||
302 | if ((digtable->rssi_val_min + 10 - digtable->back_val) > | 302 | if ((digtable->rssi_val_min + 10 - digtable->back_val) > |
303 | digtable->rx_gain_range_max) | 303 | digtable->rx_gain_max) |
304 | digtable->cur_igvalue = digtable->rx_gain_range_max; | 304 | digtable->cur_igvalue = digtable->rx_gain_max; |
305 | else if ((digtable->rssi_val_min + 10 - | 305 | else if ((digtable->rssi_val_min + 10 - |
306 | digtable->back_val) < digtable->rx_gain_range_min) | 306 | digtable->back_val) < digtable->rx_gain_min) |
307 | digtable->cur_igvalue = digtable->rx_gain_range_min; | 307 | digtable->cur_igvalue = digtable->rx_gain_min; |
308 | else | 308 | else |
309 | digtable->cur_igvalue = digtable->rssi_val_min + 10 - | 309 | digtable->cur_igvalue = digtable->rssi_val_min + 10 - |
310 | digtable->back_val; | 310 | digtable->back_val; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 3da9a785ab62..a82b30a1996c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -1503,7 +1503,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1503 | } | 1503 | } |
1504 | 1504 | ||
1505 | for (i = 0; i < 14; i++) { | 1505 | for (i = 0; i < 14; i++) { |
1506 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1506 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1507 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", | 1507 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", |
1508 | rf_path, i, | 1508 | rf_path, i, |
1509 | rtlefuse->txpwrlevel_cck[rf_path][i], | 1509 | rtlefuse->txpwrlevel_cck[rf_path][i], |
@@ -1544,11 +1544,11 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1544 | & 0xf0) >> 4); | 1544 | & 0xf0) >> 4); |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1547 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1548 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", | 1548 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", |
1549 | rf_path, i, | 1549 | rf_path, i, |
1550 | rtlefuse->pwrgroup_ht20[rf_path][i]); | 1550 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
1551 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1551 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1552 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", | 1552 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", |
1553 | rf_path, i, | 1553 | rf_path, i, |
1554 | rtlefuse->pwrgroup_ht40[rf_path][i]); | 1554 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
@@ -1589,19 +1589,19 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1589 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; | 1589 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; |
1590 | 1590 | ||
1591 | for (i = 0; i < 14; i++) | 1591 | for (i = 0; i < 14; i++) |
1592 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1592 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1593 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", | 1593 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", |
1594 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); | 1594 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
1595 | for (i = 0; i < 14; i++) | 1595 | for (i = 0; i < 14; i++) |
1596 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1596 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1597 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", | 1597 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", |
1598 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); | 1598 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
1599 | for (i = 0; i < 14; i++) | 1599 | for (i = 0; i < 14; i++) |
1600 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1600 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1601 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", | 1601 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", |
1602 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); | 1602 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
1603 | for (i = 0; i < 14; i++) | 1603 | for (i = 0; i < 14; i++) |
1604 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1604 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1605 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", | 1605 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", |
1606 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); | 1606 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
1607 | 1607 | ||
@@ -1609,7 +1609,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1609 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); | 1609 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); |
1610 | else | 1610 | else |
1611 | rtlefuse->eeprom_regulatory = 0; | 1611 | rtlefuse->eeprom_regulatory = 0; |
1612 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1612 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1613 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); | 1613 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
1614 | 1614 | ||
1615 | if (!autoload_fail) { | 1615 | if (!autoload_fail) { |
@@ -1619,7 +1619,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1619 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; | 1619 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; |
1620 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; | 1620 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; |
1621 | } | 1621 | } |
1622 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 1622 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
1623 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 1623 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
1624 | rtlefuse->eeprom_tssi[RF90_PATH_B]); | 1624 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
1625 | 1625 | ||
@@ -1633,7 +1633,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1633 | rtlefuse->apk_thermalmeterignore = true; | 1633 | rtlefuse->apk_thermalmeterignore = true; |
1634 | 1634 | ||
1635 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; | 1635 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; |
1636 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1636 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1637 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); | 1637 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
1638 | } | 1638 | } |
1639 | 1639 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c index 7347f5931319..14203561b6ee 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | |||
@@ -311,7 +311,7 @@ static struct rtl_hal_cfg rtl92ce_hal_cfg = { | |||
311 | 311 | ||
312 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, | 312 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, |
313 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, | 313 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, |
314 | .maps[RTL_IMR_BcnInt] = IMR_BCNINT, | 314 | .maps[RTL_IMR_BCNINT] = IMR_BCNINT, |
315 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, | 315 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, |
316 | .maps[RTL_IMR_RDU] = IMR_RDU, | 316 | .maps[RTL_IMR_RDU] = IMR_RDU, |
317 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, | 317 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index c08d0f4c5f3d..3d0498e69c8c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -202,7 +202,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | for (i = 0; i < 14; i++) { | 204 | for (i = 0; i < 14; i++) { |
205 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 205 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
206 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", rf_path, i, | 206 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", rf_path, i, |
207 | rtlefuse->txpwrlevel_cck[rf_path][i], | 207 | rtlefuse->txpwrlevel_cck[rf_path][i], |
208 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], | 208 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], |
@@ -238,11 +238,11 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
238 | ((rtlefuse->eeprom_pwrlimit_ht40[index] | 238 | ((rtlefuse->eeprom_pwrlimit_ht40[index] |
239 | & 0xf0) >> 4); | 239 | & 0xf0) >> 4); |
240 | } | 240 | } |
241 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 241 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
242 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", | 242 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", |
243 | rf_path, i, | 243 | rf_path, i, |
244 | rtlefuse->pwrgroup_ht20[rf_path][i]); | 244 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
245 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 245 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
246 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", | 246 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", |
247 | rf_path, i, | 247 | rf_path, i, |
248 | rtlefuse->pwrgroup_ht40[rf_path][i]); | 248 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
@@ -273,26 +273,26 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
273 | rtlefuse->legacy_ht_txpowerdiff = | 273 | rtlefuse->legacy_ht_txpowerdiff = |
274 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; | 274 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; |
275 | for (i = 0; i < 14; i++) | 275 | for (i = 0; i < 14; i++) |
276 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 276 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
277 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", | 277 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", |
278 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); | 278 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
279 | for (i = 0; i < 14; i++) | 279 | for (i = 0; i < 14; i++) |
280 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 280 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
281 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", | 281 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", |
282 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); | 282 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
283 | for (i = 0; i < 14; i++) | 283 | for (i = 0; i < 14; i++) |
284 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 284 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
285 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", | 285 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", |
286 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); | 286 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
287 | for (i = 0; i < 14; i++) | 287 | for (i = 0; i < 14; i++) |
288 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 288 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
289 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", | 289 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", |
290 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); | 290 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
291 | if (!autoload_fail) | 291 | if (!autoload_fail) |
292 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); | 292 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); |
293 | else | 293 | else |
294 | rtlefuse->eeprom_regulatory = 0; | 294 | rtlefuse->eeprom_regulatory = 0; |
295 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 295 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
296 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); | 296 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
297 | if (!autoload_fail) { | 297 | if (!autoload_fail) { |
298 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; | 298 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; |
@@ -301,7 +301,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
301 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; | 301 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; |
302 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; | 302 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; |
303 | } | 303 | } |
304 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 304 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
305 | "TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 305 | "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
306 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 306 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
307 | rtlefuse->eeprom_tssi[RF90_PATH_B]); | 307 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
@@ -316,7 +316,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
316 | if (rtlefuse->eeprom_thermalmeter == 0x1f || autoload_fail) | 316 | if (rtlefuse->eeprom_thermalmeter == 0x1f || autoload_fail) |
317 | rtlefuse->apk_thermalmeterignore = true; | 317 | rtlefuse->apk_thermalmeterignore = true; |
318 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; | 318 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; |
319 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 319 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
320 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); | 320 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
321 | } | 321 | } |
322 | 322 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c index a73a17bc56dd..23d640a4debd 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | |||
@@ -223,7 +223,7 @@ static struct rtl_hal_cfg rtl92cu_hal_cfg = { | |||
223 | 223 | ||
224 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, | 224 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, |
225 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, | 225 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, |
226 | .maps[RTL_IMR_BcnInt] = IMR_BCNINT, | 226 | .maps[RTL_IMR_BCNINT] = IMR_BCNINT, |
227 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, | 227 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, |
228 | .maps[RTL_IMR_RDU] = IMR_RDU, | 228 | .maps[RTL_IMR_RDU] = IMR_RDU, |
229 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, | 229 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c index 5251fb8a111e..19a765532603 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c | |||
@@ -171,8 +171,8 @@ static void rtl92d_dm_diginit(struct ieee80211_hw *hw) | |||
171 | de_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; | 171 | de_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; |
172 | de_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; | 172 | de_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; |
173 | de_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; | 173 | de_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; |
174 | de_digtable->rx_gain_range_max = DM_DIG_FA_UPPER; | 174 | de_digtable->rx_gain_max = DM_DIG_FA_UPPER; |
175 | de_digtable->rx_gain_range_min = DM_DIG_FA_LOWER; | 175 | de_digtable->rx_gain_min = DM_DIG_FA_LOWER; |
176 | de_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; | 176 | de_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; |
177 | de_digtable->back_range_max = DM_DIG_BACKOFF_MAX; | 177 | de_digtable->back_range_max = DM_DIG_BACKOFF_MAX; |
178 | de_digtable->back_range_min = DM_DIG_BACKOFF_MIN; | 178 | de_digtable->back_range_min = DM_DIG_BACKOFF_MIN; |
@@ -444,8 +444,8 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
444 | "dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n", | 444 | "dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n", |
445 | de_digtable->large_fa_hit, de_digtable->forbidden_igi); | 445 | de_digtable->large_fa_hit, de_digtable->forbidden_igi); |
446 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 446 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
447 | "dm_DIG() Before: Recover_cnt=%d, rx_gain_range_min=%x\n", | 447 | "dm_DIG() Before: Recover_cnt=%d, rx_gain_min=%x\n", |
448 | de_digtable->recover_cnt, de_digtable->rx_gain_range_min); | 448 | de_digtable->recover_cnt, de_digtable->rx_gain_min); |
449 | 449 | ||
450 | /* deal with abnorally large false alarm */ | 450 | /* deal with abnorally large false alarm */ |
451 | if (falsealm_cnt->cnt_all > 10000) { | 451 | if (falsealm_cnt->cnt_all > 10000) { |
@@ -459,9 +459,9 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
459 | } | 459 | } |
460 | if (de_digtable->large_fa_hit >= 3) { | 460 | if (de_digtable->large_fa_hit >= 3) { |
461 | if ((de_digtable->forbidden_igi + 1) > DM_DIG_MAX) | 461 | if ((de_digtable->forbidden_igi + 1) > DM_DIG_MAX) |
462 | de_digtable->rx_gain_range_min = DM_DIG_MAX; | 462 | de_digtable->rx_gain_min = DM_DIG_MAX; |
463 | else | 463 | else |
464 | de_digtable->rx_gain_range_min = | 464 | de_digtable->rx_gain_min = |
465 | (de_digtable->forbidden_igi + 1); | 465 | (de_digtable->forbidden_igi + 1); |
466 | de_digtable->recover_cnt = 3600; /* 3600=2hr */ | 466 | de_digtable->recover_cnt = 3600; /* 3600=2hr */ |
467 | } | 467 | } |
@@ -475,12 +475,12 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
475 | DM_DIG_FA_LOWER) { | 475 | DM_DIG_FA_LOWER) { |
476 | de_digtable->forbidden_igi = | 476 | de_digtable->forbidden_igi = |
477 | DM_DIG_FA_LOWER; | 477 | DM_DIG_FA_LOWER; |
478 | de_digtable->rx_gain_range_min = | 478 | de_digtable->rx_gain_min = |
479 | DM_DIG_FA_LOWER; | 479 | DM_DIG_FA_LOWER; |
480 | 480 | ||
481 | } else { | 481 | } else { |
482 | de_digtable->forbidden_igi--; | 482 | de_digtable->forbidden_igi--; |
483 | de_digtable->rx_gain_range_min = | 483 | de_digtable->rx_gain_min = |
484 | (de_digtable->forbidden_igi + 1); | 484 | (de_digtable->forbidden_igi + 1); |
485 | } | 485 | } |
486 | } else if (de_digtable->large_fa_hit == 3) { | 486 | } else if (de_digtable->large_fa_hit == 3) { |
@@ -492,13 +492,13 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
492 | "dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n", | 492 | "dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n", |
493 | de_digtable->large_fa_hit, de_digtable->forbidden_igi); | 493 | de_digtable->large_fa_hit, de_digtable->forbidden_igi); |
494 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 494 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
495 | "dm_DIG() After: recover_cnt=%d, rx_gain_range_min=%x\n", | 495 | "dm_DIG() After: recover_cnt=%d, rx_gain_min=%x\n", |
496 | de_digtable->recover_cnt, de_digtable->rx_gain_range_min); | 496 | de_digtable->recover_cnt, de_digtable->rx_gain_min); |
497 | 497 | ||
498 | if (value_igi > DM_DIG_MAX) | 498 | if (value_igi > DM_DIG_MAX) |
499 | value_igi = DM_DIG_MAX; | 499 | value_igi = DM_DIG_MAX; |
500 | else if (value_igi < de_digtable->rx_gain_range_min) | 500 | else if (value_igi < de_digtable->rx_gain_min) |
501 | value_igi = de_digtable->rx_gain_range_min; | 501 | value_igi = de_digtable->rx_gain_min; |
502 | de_digtable->cur_igvalue = value_igi; | 502 | de_digtable->cur_igvalue = value_igi; |
503 | rtl92d_dm_write_dig(hw); | 503 | rtl92d_dm_write_dig(hw); |
504 | if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G) | 504 | if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G) |
@@ -1071,9 +1071,9 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter( | |||
1071 | } | 1071 | } |
1072 | ele_d = (ofdmswing_table[(u8) ofdm_index[0]] & | 1072 | ele_d = (ofdmswing_table[(u8) ofdm_index[0]] & |
1073 | 0xFFC00000) >> 22; | 1073 | 0xFFC00000) >> 22; |
1074 | val_x = rtlphy->iqk_matrix_regsetting | 1074 | val_x = rtlphy->iqk_matrix |
1075 | [indexforchannel].value[0][0]; | 1075 | [indexforchannel].value[0][0]; |
1076 | val_y = rtlphy->iqk_matrix_regsetting | 1076 | val_y = rtlphy->iqk_matrix |
1077 | [indexforchannel].value[0][1]; | 1077 | [indexforchannel].value[0][1]; |
1078 | if (val_x != 0) { | 1078 | if (val_x != 0) { |
1079 | if ((val_x & 0x00000200) != 0) | 1079 | if ((val_x & 0x00000200) != 0) |
@@ -1175,9 +1175,9 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter( | |||
1175 | if (is2t) { | 1175 | if (is2t) { |
1176 | ele_d = (ofdmswing_table[(u8) ofdm_index[1]] & | 1176 | ele_d = (ofdmswing_table[(u8) ofdm_index[1]] & |
1177 | 0xFFC00000) >> 22; | 1177 | 0xFFC00000) >> 22; |
1178 | val_x = rtlphy->iqk_matrix_regsetting | 1178 | val_x = rtlphy->iqk_matrix |
1179 | [indexforchannel].value[0][4]; | 1179 | [indexforchannel].value[0][4]; |
1180 | val_y = rtlphy->iqk_matrix_regsetting | 1180 | val_y = rtlphy->iqk_matrix |
1181 | [indexforchannel].value[0][5]; | 1181 | [indexforchannel].value[0][5]; |
1182 | if (val_x != 0) { | 1182 | if (val_x != 0) { |
1183 | if ((val_x & 0x00000200) != 0) | 1183 | if ((val_x & 0x00000200) != 0) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index aa5b42521bb4..7dd8f6de0550 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -1183,7 +1183,7 @@ void rtl92d_linked_set_reg(struct ieee80211_hw *hw) | |||
1183 | u8 channel = rtlphy->current_channel; | 1183 | u8 channel = rtlphy->current_channel; |
1184 | 1184 | ||
1185 | indexforchannel = rtl92d_get_rightchnlplace_for_iqk(channel); | 1185 | indexforchannel = rtl92d_get_rightchnlplace_for_iqk(channel); |
1186 | if (!rtlphy->iqk_matrix_regsetting[indexforchannel].iqk_done) { | 1186 | if (!rtlphy->iqk_matrix[indexforchannel].iqk_done) { |
1187 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_INIT, DBG_DMESG, | 1187 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_INIT, DBG_DMESG, |
1188 | "Do IQK for channel:%d\n", channel); | 1188 | "Do IQK for channel:%d\n", channel); |
1189 | rtl92d_phy_iq_calibrate(hw); | 1189 | rtl92d_phy_iq_calibrate(hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 33041bd4da81..840bac5fa2f8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -2479,9 +2479,9 @@ void rtl92d_phy_iq_calibrate(struct ieee80211_hw *hw) | |||
2479 | rtlphy->current_channel); | 2479 | rtlphy->current_channel); |
2480 | 2480 | ||
2481 | for (i = 0; i < IQK_MATRIX_REG_NUM; i++) | 2481 | for (i = 0; i < IQK_MATRIX_REG_NUM; i++) |
2482 | rtlphy->iqk_matrix_regsetting[indexforchannel]. | 2482 | rtlphy->iqk_matrix[indexforchannel]. |
2483 | value[0][i] = result[final_candidate][i]; | 2483 | value[0][i] = result[final_candidate][i]; |
2484 | rtlphy->iqk_matrix_regsetting[indexforchannel].iqk_done = | 2484 | rtlphy->iqk_matrix[indexforchannel].iqk_done = |
2485 | true; | 2485 | true; |
2486 | 2486 | ||
2487 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_MLME, DBG_LOUD, | 2487 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_MLME, DBG_LOUD, |
@@ -2501,8 +2501,8 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) | |||
2501 | indexforchannel = rtl92d_get_rightchnlplace_for_iqk(channel); | 2501 | indexforchannel = rtl92d_get_rightchnlplace_for_iqk(channel); |
2502 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "indexforchannel %d done %d\n", | 2502 | RT_TRACE(rtlpriv, COMP_CMD, DBG_LOUD, "indexforchannel %d done %d\n", |
2503 | indexforchannel, | 2503 | indexforchannel, |
2504 | rtlphy->iqk_matrix_regsetting[indexforchannel].iqk_done); | 2504 | rtlphy->iqk_matrix[indexforchannel].iqk_done); |
2505 | if (0 && !rtlphy->iqk_matrix_regsetting[indexforchannel].iqk_done && | 2505 | if (0 && !rtlphy->iqk_matrix[indexforchannel].iqk_done && |
2506 | rtlphy->need_iqk) { | 2506 | rtlphy->need_iqk) { |
2507 | /* Re Do IQK. */ | 2507 | /* Re Do IQK. */ |
2508 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_INIT, DBG_LOUD, | 2508 | RT_TRACE(rtlpriv, COMP_SCAN | COMP_INIT, DBG_LOUD, |
@@ -2516,23 +2516,23 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) | |||
2516 | RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, | 2516 | RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, |
2517 | "Just Read IQK Matrix reg for channel:%d....\n", | 2517 | "Just Read IQK Matrix reg for channel:%d....\n", |
2518 | channel); | 2518 | channel); |
2519 | if ((rtlphy->iqk_matrix_regsetting[indexforchannel]. | 2519 | if ((rtlphy->iqk_matrix[indexforchannel]. |
2520 | value[0] != NULL) | 2520 | value[0] != NULL) |
2521 | /*&&(regea4 != 0) */) | 2521 | /*&&(regea4 != 0) */) |
2522 | _rtl92d_phy_patha_fill_iqk_matrix(hw, true, | 2522 | _rtl92d_phy_patha_fill_iqk_matrix(hw, true, |
2523 | rtlphy->iqk_matrix_regsetting[ | 2523 | rtlphy->iqk_matrix[ |
2524 | indexforchannel].value, 0, | 2524 | indexforchannel].value, 0, |
2525 | (rtlphy->iqk_matrix_regsetting[ | 2525 | (rtlphy->iqk_matrix[ |
2526 | indexforchannel].value[0][2] == 0)); | 2526 | indexforchannel].value[0][2] == 0)); |
2527 | if (IS_92D_SINGLEPHY(rtlhal->version)) { | 2527 | if (IS_92D_SINGLEPHY(rtlhal->version)) { |
2528 | if ((rtlphy->iqk_matrix_regsetting[ | 2528 | if ((rtlphy->iqk_matrix[ |
2529 | indexforchannel].value[0][4] != 0) | 2529 | indexforchannel].value[0][4] != 0) |
2530 | /*&&(regec4 != 0) */) | 2530 | /*&&(regec4 != 0) */) |
2531 | _rtl92d_phy_pathb_fill_iqk_matrix(hw, | 2531 | _rtl92d_phy_pathb_fill_iqk_matrix(hw, |
2532 | true, | 2532 | true, |
2533 | rtlphy->iqk_matrix_regsetting[ | 2533 | rtlphy->iqk_matrix[ |
2534 | indexforchannel].value, 0, | 2534 | indexforchannel].value, 0, |
2535 | (rtlphy->iqk_matrix_regsetting[ | 2535 | (rtlphy->iqk_matrix[ |
2536 | indexforchannel].value[0][6] | 2536 | indexforchannel].value[0][6] |
2537 | == 0)); | 2537 | == 0)); |
2538 | } | 2538 | } |
@@ -2830,20 +2830,20 @@ void rtl92d_phy_reset_iqk_result(struct ieee80211_hw *hw) | |||
2830 | 2830 | ||
2831 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, | 2831 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, |
2832 | "settings regs %d default regs %d\n", | 2832 | "settings regs %d default regs %d\n", |
2833 | (int)(sizeof(rtlphy->iqk_matrix_regsetting) / | 2833 | (int)(sizeof(rtlphy->iqk_matrix) / |
2834 | sizeof(struct iqk_matrix_regs)), | 2834 | sizeof(struct iqk_matrix_regs)), |
2835 | IQK_MATRIX_REG_NUM); | 2835 | IQK_MATRIX_REG_NUM); |
2836 | /* 0xe94, 0xe9c, 0xea4, 0xeac, 0xeb4, 0xebc, 0xec4, 0xecc */ | 2836 | /* 0xe94, 0xe9c, 0xea4, 0xeac, 0xeb4, 0xebc, 0xec4, 0xecc */ |
2837 | for (i = 0; i < IQK_MATRIX_SETTINGS_NUM; i++) { | 2837 | for (i = 0; i < IQK_MATRIX_SETTINGS_NUM; i++) { |
2838 | rtlphy->iqk_matrix_regsetting[i].value[0][0] = 0x100; | 2838 | rtlphy->iqk_matrix[i].value[0][0] = 0x100; |
2839 | rtlphy->iqk_matrix_regsetting[i].value[0][2] = 0x100; | 2839 | rtlphy->iqk_matrix[i].value[0][2] = 0x100; |
2840 | rtlphy->iqk_matrix_regsetting[i].value[0][4] = 0x100; | 2840 | rtlphy->iqk_matrix[i].value[0][4] = 0x100; |
2841 | rtlphy->iqk_matrix_regsetting[i].value[0][6] = 0x100; | 2841 | rtlphy->iqk_matrix[i].value[0][6] = 0x100; |
2842 | rtlphy->iqk_matrix_regsetting[i].value[0][1] = 0x0; | 2842 | rtlphy->iqk_matrix[i].value[0][1] = 0x0; |
2843 | rtlphy->iqk_matrix_regsetting[i].value[0][3] = 0x0; | 2843 | rtlphy->iqk_matrix[i].value[0][3] = 0x0; |
2844 | rtlphy->iqk_matrix_regsetting[i].value[0][5] = 0x0; | 2844 | rtlphy->iqk_matrix[i].value[0][5] = 0x0; |
2845 | rtlphy->iqk_matrix_regsetting[i].value[0][7] = 0x0; | 2845 | rtlphy->iqk_matrix[i].value[0][7] = 0x0; |
2846 | rtlphy->iqk_matrix_regsetting[i].iqk_done = false; | 2846 | rtlphy->iqk_matrix[i].iqk_done = false; |
2847 | } | 2847 | } |
2848 | } | 2848 | } |
2849 | 2849 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/reg.h b/drivers/net/wireless/rtlwifi/rtl8192de/reg.h index ebb1d5f5e7b5..b7498c5bafc5 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/reg.h +++ b/drivers/net/wireless/rtlwifi/rtl8192de/reg.h | |||
@@ -543,7 +543,7 @@ | |||
543 | #define IMR_TIMEOUT1 BIT(16) | 543 | #define IMR_TIMEOUT1 BIT(16) |
544 | #define IMR_TXFOVW BIT(15) | 544 | #define IMR_TXFOVW BIT(15) |
545 | #define IMR_PSTIMEOUT BIT(14) | 545 | #define IMR_PSTIMEOUT BIT(14) |
546 | #define IMR_BcnInt BIT(13) | 546 | #define IMR_BCNINT BIT(13) |
547 | #define IMR_RXFOVW BIT(12) | 547 | #define IMR_RXFOVW BIT(12) |
548 | #define IMR_RDU BIT(11) | 548 | #define IMR_RDU BIT(11) |
549 | #define IMR_ATIMEND BIT(10) | 549 | #define IMR_ATIMEND BIT(10) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c index 03c6d18b2e07..c18c04bf0c13 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c | |||
@@ -166,7 +166,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) | |||
166 | rtlpriv->psc.fwctrl_psmode = FW_PS_DTIM_MODE; | 166 | rtlpriv->psc.fwctrl_psmode = FW_PS_DTIM_MODE; |
167 | 167 | ||
168 | /* for early mode */ | 168 | /* for early mode */ |
169 | rtlpriv->rtlhal.earlymode_enable = true; | 169 | rtlpriv->rtlhal.earlymode_enable = false; |
170 | for (tid = 0; tid < 8; tid++) | 170 | for (tid = 0; tid < 8; tid++) |
171 | skb_queue_head_init(&rtlpriv->mac80211.skb_waitq[tid]); | 171 | skb_queue_head_init(&rtlpriv->mac80211.skb_waitq[tid]); |
172 | 172 | ||
@@ -319,7 +319,7 @@ static struct rtl_hal_cfg rtl92de_hal_cfg = { | |||
319 | 319 | ||
320 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, | 320 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, |
321 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, | 321 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, |
322 | .maps[RTL_IMR_BcnInt] = IMR_BcnInt, | 322 | .maps[RTL_IMR_BCNINT] = IMR_BCNINT, |
323 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, | 323 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, |
324 | .maps[RTL_IMR_RDU] = IMR_RDU, | 324 | .maps[RTL_IMR_RDU] = IMR_RDU, |
325 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, | 325 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, |
@@ -333,7 +333,7 @@ static struct rtl_hal_cfg rtl92de_hal_cfg = { | |||
333 | .maps[RTL_IMR_VIDOK] = IMR_VIDOK, | 333 | .maps[RTL_IMR_VIDOK] = IMR_VIDOK, |
334 | .maps[RTL_IMR_VODOK] = IMR_VODOK, | 334 | .maps[RTL_IMR_VODOK] = IMR_VODOK, |
335 | .maps[RTL_IMR_ROK] = IMR_ROK, | 335 | .maps[RTL_IMR_ROK] = IMR_ROK, |
336 | .maps[RTL_IBSS_INT_MASKS] = (IMR_BcnInt | IMR_TBDOK | IMR_TBDER), | 336 | .maps[RTL_IBSS_INT_MASKS] = (IMR_BCNINT | IMR_TBDOK | IMR_TBDER), |
337 | 337 | ||
338 | .maps[RTL_RC_CCK_RATE1M] = DESC92_RATE1M, | 338 | .maps[RTL_RC_CCK_RATE1M] = DESC92_RATE1M, |
339 | .maps[RTL_RC_CCK_RATE2M] = DESC92_RATE2M, | 339 | .maps[RTL_RC_CCK_RATE2M] = DESC92_RATE2M, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/dm.c b/drivers/net/wireless/rtlwifi/rtl8192se/dm.c index e2a0faadc2b0..b3a2d5ec59e6 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/dm.c | |||
@@ -472,13 +472,13 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw) | |||
472 | digtable->back_val = DM_DIG_BACKOFF; | 472 | digtable->back_val = DM_DIG_BACKOFF; |
473 | 473 | ||
474 | if ((digtable->rssi_val + 10 - digtable->back_val) > | 474 | if ((digtable->rssi_val + 10 - digtable->back_val) > |
475 | digtable->rx_gain_range_max) | 475 | digtable->rx_gain_max) |
476 | digtable->cur_igvalue = | 476 | digtable->cur_igvalue = |
477 | digtable->rx_gain_range_max; | 477 | digtable->rx_gain_max; |
478 | else if ((digtable->rssi_val + 10 - digtable->back_val) | 478 | else if ((digtable->rssi_val + 10 - digtable->back_val) |
479 | < digtable->rx_gain_range_min) | 479 | < digtable->rx_gain_min) |
480 | digtable->cur_igvalue = | 480 | digtable->cur_igvalue = |
481 | digtable->rx_gain_range_min; | 481 | digtable->rx_gain_min; |
482 | else | 482 | else |
483 | digtable->cur_igvalue = digtable->rssi_val + 10 | 483 | digtable->cur_igvalue = digtable->rssi_val + 10 |
484 | - digtable->back_val; | 484 | - digtable->back_val; |
@@ -490,7 +490,7 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw) | |||
490 | 490 | ||
491 | if (falsealm_cnt->cnt_all > 16000) | 491 | if (falsealm_cnt->cnt_all > 16000) |
492 | digtable->cur_igvalue = | 492 | digtable->cur_igvalue = |
493 | digtable->rx_gain_range_max; | 493 | digtable->rx_gain_max; |
494 | /* connected -> connected or disconnected -> disconnected */ | 494 | /* connected -> connected or disconnected -> disconnected */ |
495 | } else { | 495 | } else { |
496 | /* Firmware control DIG, do nothing in driver dm */ | 496 | /* Firmware control DIG, do nothing in driver dm */ |
@@ -692,9 +692,9 @@ static void _rtl92s_dm_init_dig(struct ieee80211_hw *hw) | |||
692 | /* for dig debug rssi value */ | 692 | /* for dig debug rssi value */ |
693 | digtable->rssi_val = 50; | 693 | digtable->rssi_val = 50; |
694 | digtable->back_val = DM_DIG_BACKOFF; | 694 | digtable->back_val = DM_DIG_BACKOFF; |
695 | digtable->rx_gain_range_max = DM_DIG_MAX; | 695 | digtable->rx_gain_max = DM_DIG_MAX; |
696 | 696 | ||
697 | digtable->rx_gain_range_min = DM_DIG_MIN; | 697 | digtable->rx_gain_min = DM_DIG_MIN; |
698 | 698 | ||
699 | digtable->backoffval_range_max = DM_DIG_BACKOFF_MAX; | 699 | digtable->backoffval_range_max = DM_DIG_BACKOFF_MAX; |
700 | digtable->backoffval_range_min = DM_DIG_BACKOFF_MIN; | 700 | digtable->backoffval_range_min = DM_DIG_BACKOFF_MIN; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c index a4f41b1eef52..4f461786a7eb 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c | |||
@@ -1791,7 +1791,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1791 | } | 1791 | } |
1792 | 1792 | ||
1793 | for (i = 0; i < 14; i++) { | 1793 | for (i = 0; i < 14; i++) { |
1794 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1794 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1795 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", | 1795 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", |
1796 | rf_path, i, | 1796 | rf_path, i, |
1797 | rtlefuse->txpwrlevel_cck[rf_path][i], | 1797 | rtlefuse->txpwrlevel_cck[rf_path][i], |
@@ -1828,11 +1828,11 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1828 | ((rtlefuse->eeprom_pwrgroup[rf_path][index] & | 1828 | ((rtlefuse->eeprom_pwrgroup[rf_path][index] & |
1829 | 0xf0) >> 4); | 1829 | 0xf0) >> 4); |
1830 | 1830 | ||
1831 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1831 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1832 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", | 1832 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", |
1833 | rf_path, i, | 1833 | rf_path, i, |
1834 | rtlefuse->pwrgroup_ht20[rf_path][i]); | 1834 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
1835 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1835 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1836 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", | 1836 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", |
1837 | rf_path, i, | 1837 | rf_path, i, |
1838 | rtlefuse->pwrgroup_ht40[rf_path][i]); | 1838 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
@@ -1887,27 +1887,27 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1887 | rtlefuse->eeprom_regulatory = | 1887 | rtlefuse->eeprom_regulatory = |
1888 | (hwinfo[EEPROM_REGULATORY] & 0x1); | 1888 | (hwinfo[EEPROM_REGULATORY] & 0x1); |
1889 | } | 1889 | } |
1890 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1890 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1891 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); | 1891 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
1892 | 1892 | ||
1893 | for (i = 0; i < 14; i++) | 1893 | for (i = 0; i < 14; i++) |
1894 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1894 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1895 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", | 1895 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", |
1896 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); | 1896 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
1897 | for (i = 0; i < 14; i++) | 1897 | for (i = 0; i < 14; i++) |
1898 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1898 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1899 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", | 1899 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", |
1900 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); | 1900 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
1901 | for (i = 0; i < 14; i++) | 1901 | for (i = 0; i < 14; i++) |
1902 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1902 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1903 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", | 1903 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", |
1904 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); | 1904 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
1905 | for (i = 0; i < 14; i++) | 1905 | for (i = 0; i < 14; i++) |
1906 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1906 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1907 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", | 1907 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", |
1908 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); | 1908 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
1909 | 1909 | ||
1910 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1910 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1911 | "TxPwrSafetyFlag = %d\n", rtlefuse->txpwr_safetyflag); | 1911 | "TxPwrSafetyFlag = %d\n", rtlefuse->txpwr_safetyflag); |
1912 | 1912 | ||
1913 | /* Read RF-indication and Tx Power gain | 1913 | /* Read RF-indication and Tx Power gain |
@@ -1917,7 +1917,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1917 | rtlefuse->legacy_httxpowerdiff = | 1917 | rtlefuse->legacy_httxpowerdiff = |
1918 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][0]; | 1918 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][0]; |
1919 | 1919 | ||
1920 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1920 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1921 | "TxPowerDiff = %#x\n", rtlefuse->eeprom_txpowerdiff); | 1921 | "TxPowerDiff = %#x\n", rtlefuse->eeprom_txpowerdiff); |
1922 | 1922 | ||
1923 | /* Get TSSI value for each path. */ | 1923 | /* Get TSSI value for each path. */ |
@@ -1926,7 +1926,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1926 | usvalue = hwinfo[EEPROM_TSSI_B]; | 1926 | usvalue = hwinfo[EEPROM_TSSI_B]; |
1927 | rtlefuse->eeprom_tssi[RF90_PATH_B] = (u8)(usvalue & 0xff); | 1927 | rtlefuse->eeprom_tssi[RF90_PATH_B] = (u8)(usvalue & 0xff); |
1928 | 1928 | ||
1929 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 1929 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
1930 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 1930 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
1931 | rtlefuse->eeprom_tssi[RF90_PATH_B]); | 1931 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
1932 | 1932 | ||
@@ -1934,7 +1934,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1934 | /* and read ThermalMeter from EEPROM */ | 1934 | /* and read ThermalMeter from EEPROM */ |
1935 | tempval = hwinfo[EEPROM_THERMALMETER]; | 1935 | tempval = hwinfo[EEPROM_THERMALMETER]; |
1936 | rtlefuse->eeprom_thermalmeter = tempval; | 1936 | rtlefuse->eeprom_thermalmeter = tempval; |
1937 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1937 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1938 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); | 1938 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
1939 | 1939 | ||
1940 | /* ThermalMeter, BIT(0)~3 for RFIC1, BIT(4)~7 for RFIC2 */ | 1940 | /* ThermalMeter, BIT(0)~3 for RFIC1, BIT(4)~7 for RFIC2 */ |
@@ -1951,7 +1951,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1951 | /* Version ID, Channel plan */ | 1951 | /* Version ID, Channel plan */ |
1952 | rtlefuse->eeprom_channelplan = hwinfo[EEPROM_CHANNELPLAN]; | 1952 | rtlefuse->eeprom_channelplan = hwinfo[EEPROM_CHANNELPLAN]; |
1953 | rtlefuse->txpwr_fromeprom = true; | 1953 | rtlefuse->txpwr_fromeprom = true; |
1954 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1954 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1955 | "EEPROM ChannelPlan = 0x%4x\n", rtlefuse->eeprom_channelplan); | 1955 | "EEPROM ChannelPlan = 0x%4x\n", rtlefuse->eeprom_channelplan); |
1956 | 1956 | ||
1957 | /* Read Customer ID or Board Type!!! */ | 1957 | /* Read Customer ID or Board Type!!! */ |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c index 2c115b0c4b6f..2e8e6f8d2d51 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c | |||
@@ -367,7 +367,7 @@ static struct rtl_hal_cfg rtl92se_hal_cfg = { | |||
367 | 367 | ||
368 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, | 368 | .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW, |
369 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, | 369 | .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT, |
370 | .maps[RTL_IMR_BcnInt] = IMR_BCNINT, | 370 | .maps[RTL_IMR_BCNINT] = IMR_BCNINT, |
371 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, | 371 | .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW, |
372 | .maps[RTL_IMR_RDU] = IMR_RDU, | 372 | .maps[RTL_IMR_RDU] = IMR_RDU, |
373 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, | 373 | .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c b/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c index f9b746753dbb..a36eee28f9e7 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c | |||
@@ -166,8 +166,8 @@ static void rtl8723ae_dm_diginit(struct ieee80211_hw *hw) | |||
166 | dm_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; | 166 | dm_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; |
167 | dm_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; | 167 | dm_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; |
168 | dm_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; | 168 | dm_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; |
169 | dm_digtable->rx_gain_range_max = DM_DIG_MAX; | 169 | dm_digtable->rx_gain_max = DM_DIG_MAX; |
170 | dm_digtable->rx_gain_range_min = DM_DIG_MIN; | 170 | dm_digtable->rx_gain_min = DM_DIG_MIN; |
171 | dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; | 171 | dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; |
172 | dm_digtable->back_range_max = DM_DIG_BACKOFF_MAX; | 172 | dm_digtable->back_range_max = DM_DIG_BACKOFF_MAX; |
173 | dm_digtable->back_range_min = DM_DIG_BACKOFF_MIN; | 173 | dm_digtable->back_range_min = DM_DIG_BACKOFF_MIN; |
@@ -291,11 +291,11 @@ static void rtl92c_dm_ctrl_initgain_by_rssi(struct ieee80211_hw *hw) | |||
291 | } | 291 | } |
292 | 292 | ||
293 | if ((dgtbl->rssi_val_min + 10 - dgtbl->back_val) > | 293 | if ((dgtbl->rssi_val_min + 10 - dgtbl->back_val) > |
294 | dgtbl->rx_gain_range_max) | 294 | dgtbl->rx_gain_max) |
295 | dgtbl->cur_igvalue = dgtbl->rx_gain_range_max; | 295 | dgtbl->cur_igvalue = dgtbl->rx_gain_max; |
296 | else if ((dgtbl->rssi_val_min + 10 - | 296 | else if ((dgtbl->rssi_val_min + 10 - |
297 | dgtbl->back_val) < dgtbl->rx_gain_range_min) | 297 | dgtbl->back_val) < dgtbl->rx_gain_min) |
298 | dgtbl->cur_igvalue = dgtbl->rx_gain_range_min; | 298 | dgtbl->cur_igvalue = dgtbl->rx_gain_min; |
299 | else | 299 | else |
300 | dgtbl->cur_igvalue = dgtbl->rssi_val_min + 10 - dgtbl->back_val; | 300 | dgtbl->cur_igvalue = dgtbl->rssi_val_min + 10 - dgtbl->back_val; |
301 | 301 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c index 178462261c6f..c333dfd116b8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | |||
@@ -1415,7 +1415,7 @@ static void _rtl8723ae_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | for (i = 0; i < 14; i++) { | 1417 | for (i = 0; i < 14; i++) { |
1418 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1418 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1419 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = " | 1419 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = " |
1420 | "[0x%x / 0x%x / 0x%x]\n", rf_path, i, | 1420 | "[0x%x / 0x%x / 0x%x]\n", rf_path, i, |
1421 | rtlefuse->txpwrlevel_cck[rf_path][i], | 1421 | rtlefuse->txpwrlevel_cck[rf_path][i], |
@@ -1456,10 +1456,10 @@ static void _rtl8723ae_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1456 | 0xf0) >> 4); | 1456 | 0xf0) >> 4); |
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1459 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1460 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", rf_path, i, | 1460 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", rf_path, i, |
1461 | rtlefuse->pwrgroup_ht20[rf_path][i]); | 1461 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
1462 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1462 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1463 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", rf_path, i, | 1463 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", rf_path, i, |
1464 | rtlefuse->pwrgroup_ht40[rf_path][i]); | 1464 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
1465 | } | 1465 | } |
@@ -1499,19 +1499,19 @@ static void _rtl8723ae_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1499 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; | 1499 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; |
1500 | 1500 | ||
1501 | for (i = 0; i < 14; i++) | 1501 | for (i = 0; i < 14; i++) |
1502 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1502 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1503 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1503 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", i, |
1504 | rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); | 1504 | rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
1505 | for (i = 0; i < 14; i++) | 1505 | for (i = 0; i < 14; i++) |
1506 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1506 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1507 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", i, | 1507 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", i, |
1508 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); | 1508 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
1509 | for (i = 0; i < 14; i++) | 1509 | for (i = 0; i < 14; i++) |
1510 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1510 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1511 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1511 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", i, |
1512 | rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); | 1512 | rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
1513 | for (i = 0; i < 14; i++) | 1513 | for (i = 0; i < 14; i++) |
1514 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1514 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1515 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", i, | 1515 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", i, |
1516 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); | 1516 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
1517 | 1517 | ||
@@ -1519,14 +1519,14 @@ static void _rtl8723ae_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1519 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); | 1519 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); |
1520 | else | 1520 | else |
1521 | rtlefuse->eeprom_regulatory = 0; | 1521 | rtlefuse->eeprom_regulatory = 0; |
1522 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1522 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1523 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); | 1523 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
1524 | 1524 | ||
1525 | if (!autoload_fail) | 1525 | if (!autoload_fail) |
1526 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; | 1526 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; |
1527 | else | 1527 | else |
1528 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; | 1528 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; |
1529 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1529 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1530 | "TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 1530 | "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
1531 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 1531 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
1532 | rtlefuse->eeprom_tssi[RF90_PATH_B]); | 1532 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
@@ -1541,7 +1541,7 @@ static void _rtl8723ae_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1541 | rtlefuse->apk_thermalmeterignore = true; | 1541 | rtlefuse->apk_thermalmeterignore = true; |
1542 | 1542 | ||
1543 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; | 1543 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; |
1544 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1544 | RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, |
1545 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); | 1545 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
1546 | } | 1546 | } |
1547 | 1547 | ||
@@ -1749,19 +1749,7 @@ static void _rtl8723ae_hal_customized_behavior(struct ieee80211_hw *hw) | |||
1749 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); | 1749 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); |
1750 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 1750 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
1751 | 1751 | ||
1752 | switch (rtlhal->oem_id) { | 1752 | pcipriv->ledctl.led_opendrain = true; |
1753 | case RT_CID_819x_HP: | ||
1754 | pcipriv->ledctl.led_opendrain = true; | ||
1755 | break; | ||
1756 | case RT_CID_819x_Lenovo: | ||
1757 | case RT_CID_DEFAULT: | ||
1758 | case RT_CID_TOSHIBA: | ||
1759 | case RT_CID_CCX: | ||
1760 | case RT_CID_819x_Acer: | ||
1761 | case RT_CID_WHQL: | ||
1762 | default: | ||
1763 | break; | ||
1764 | } | ||
1765 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1753 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, |
1766 | "RT Customized ID: 0x%02X\n", rtlhal->oem_id); | 1754 | "RT Customized ID: 0x%02X\n", rtlhal->oem_id); |
1767 | } | 1755 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/led.c b/drivers/net/wireless/rtlwifi/rtl8723ae/led.c index 9c4e1d811187..061526fe6e2d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/led.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/led.c | |||
@@ -54,8 +54,9 @@ void rtl8723ae_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
54 | case LED_PIN_GPIO0: | 54 | case LED_PIN_GPIO0: |
55 | break; | 55 | break; |
56 | case LED_PIN_LED0: | 56 | case LED_PIN_LED0: |
57 | ledcfg &= ~BIT(6); | ||
57 | rtl_write_byte(rtlpriv, | 58 | rtl_write_byte(rtlpriv, |
58 | REG_LEDCFG2, (ledcfg & 0xf0) | BIT(5) | BIT(6)); | 59 | REG_LEDCFG2, (ledcfg & 0xf0) | BIT(5)); |
59 | break; | 60 | break; |
60 | case LED_PIN_LED1: | 61 | case LED_PIN_LED1: |
61 | rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg & 0x0f) | BIT(5)); | 62 | rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg & 0x0f) | BIT(5)); |
@@ -84,16 +85,21 @@ void rtl8723ae_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
84 | break; | 85 | break; |
85 | case LED_PIN_LED0: | 86 | case LED_PIN_LED0: |
86 | ledcfg &= 0xf0; | 87 | ledcfg &= 0xf0; |
87 | if (pcipriv->ledctl.led_opendrain) | 88 | if (pcipriv->ledctl.led_opendrain) { |
89 | ledcfg &= 0x90; | ||
90 | rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg|BIT(3))); | ||
91 | ledcfg = rtl_read_byte(rtlpriv, REG_MAC_PINMUX_CFG); | ||
92 | ledcfg &= 0xFE; | ||
93 | rtl_write_byte(rtlpriv, REG_MAC_PINMUX_CFG, ledcfg); | ||
94 | } else { | ||
95 | ledcfg &= ~BIT(6); | ||
88 | rtl_write_byte(rtlpriv, REG_LEDCFG2, | 96 | rtl_write_byte(rtlpriv, REG_LEDCFG2, |
89 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); | 97 | (ledcfg | BIT(3) | BIT(5))); |
90 | else | 98 | } |
91 | rtl_write_byte(rtlpriv, REG_LEDCFG2, | ||
92 | (ledcfg | BIT(3) | BIT(5) | BIT(6))); | ||
93 | break; | 99 | break; |
94 | case LED_PIN_LED1: | 100 | case LED_PIN_LED1: |
95 | ledcfg &= 0x0f; | 101 | ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG1) & 0x10; |
96 | rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg | BIT(3))); | 102 | rtl_write_byte(rtlpriv, REG_LEDCFG1, (ledcfg | BIT(3))); |
97 | break; | 103 | break; |
98 | default: | 104 | default: |
99 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 105 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c index bb7cc90bafb2..e4c4cdc3eb67 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | |||
@@ -305,7 +305,7 @@ static struct rtl_hal_cfg rtl8723ae_hal_cfg = { | |||
305 | 305 | ||
306 | .maps[RTL_IMR_TXFOVW] = PHIMR_TXFOVW, | 306 | .maps[RTL_IMR_TXFOVW] = PHIMR_TXFOVW, |
307 | .maps[RTL_IMR_PSTIMEOUT] = PHIMR_PSTIMEOUT, | 307 | .maps[RTL_IMR_PSTIMEOUT] = PHIMR_PSTIMEOUT, |
308 | .maps[RTL_IMR_BcnInt] = PHIMR_BCNDMAINT0, | 308 | .maps[RTL_IMR_BCNINT] = PHIMR_BCNDMAINT0, |
309 | .maps[RTL_IMR_RXFOVW] = PHIMR_RXFOVW, | 309 | .maps[RTL_IMR_RXFOVW] = PHIMR_RXFOVW, |
310 | .maps[RTL_IMR_RDU] = PHIMR_RDU, | 310 | .maps[RTL_IMR_RDU] = PHIMR_RDU, |
311 | .maps[RTL_IMR_ATIMEND] = PHIMR_ATIMEND_E, | 311 | .maps[RTL_IMR_ATIMEND] = PHIMR_ATIMEND_E, |
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h index 70193a519547..c796b01bfcad 100644 --- a/drivers/net/wireless/rtlwifi/wifi.h +++ b/drivers/net/wireless/rtlwifi/wifi.h | |||
@@ -99,12 +99,36 @@ | |||
99 | #define CHANNEL_GROUP_MAX_5G 9 | 99 | #define CHANNEL_GROUP_MAX_5G 9 |
100 | #define CHANNEL_MAX_NUMBER_2G 14 | 100 | #define CHANNEL_MAX_NUMBER_2G 14 |
101 | #define AVG_THERMAL_NUM 8 | 101 | #define AVG_THERMAL_NUM 8 |
102 | #define AVG_THERMAL_NUM_88E 4 | ||
102 | #define MAX_TID_COUNT 9 | 103 | #define MAX_TID_COUNT 9 |
103 | 104 | ||
104 | /* for early mode */ | 105 | /* for early mode */ |
105 | #define FCS_LEN 4 | 106 | #define FCS_LEN 4 |
106 | #define EM_HDR_LEN 8 | 107 | #define EM_HDR_LEN 8 |
107 | 108 | ||
109 | #define MAX_TX_COUNT 4 | ||
110 | #define MAX_RF_PATH 4 | ||
111 | #define MAX_CHNL_GROUP_24G 6 | ||
112 | #define MAX_CHNL_GROUP_5G 14 | ||
113 | |||
114 | struct txpower_info_2g { | ||
115 | u8 index_cck_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; | ||
116 | u8 index_bw40_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; | ||
117 | /*If only one tx, only BW20 and OFDM are used.*/ | ||
118 | u8 cck_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
119 | u8 ofdm_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
120 | u8 bw20_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
121 | u8 bw40_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
122 | }; | ||
123 | |||
124 | struct txpower_info_5g { | ||
125 | u8 index_bw40_base[MAX_RF_PATH][MAX_CHNL_GROUP_5G]; | ||
126 | /*If only one tx, only BW20, OFDM, BW80 and BW160 are used.*/ | ||
127 | u8 ofdm_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
128 | u8 bw20_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
129 | u8 bw40_diff[MAX_RF_PATH][MAX_TX_COUNT]; | ||
130 | }; | ||
131 | |||
108 | enum intf_type { | 132 | enum intf_type { |
109 | INTF_PCI = 0, | 133 | INTF_PCI = 0, |
110 | INTF_USB = 1, | 134 | INTF_USB = 1, |
@@ -499,7 +523,7 @@ enum rtl_var_map { | |||
499 | RTL_IMR_TIMEOUT1, /*Timeout interrupt 1 */ | 523 | RTL_IMR_TIMEOUT1, /*Timeout interrupt 1 */ |
500 | RTL_IMR_TXFOVW, /*Transmit FIFO Overflow */ | 524 | RTL_IMR_TXFOVW, /*Transmit FIFO Overflow */ |
501 | RTL_IMR_PSTIMEOUT, /*Power save time out interrupt */ | 525 | RTL_IMR_PSTIMEOUT, /*Power save time out interrupt */ |
502 | RTL_IMR_BcnInt, /*Beacon DMA Interrupt 0 */ | 526 | RTL_IMR_BCNINT, /*Beacon DMA Interrupt 0 */ |
503 | RTL_IMR_RXFOVW, /*Receive FIFO Overflow */ | 527 | RTL_IMR_RXFOVW, /*Receive FIFO Overflow */ |
504 | RTL_IMR_RDU, /*Receive Descriptor Unavailable */ | 528 | RTL_IMR_RDU, /*Receive Descriptor Unavailable */ |
505 | RTL_IMR_ATIMEND, /*For 92C,ATIM Window End Interrupt */ | 529 | RTL_IMR_ATIMEND, /*For 92C,ATIM Window End Interrupt */ |
@@ -514,7 +538,7 @@ enum rtl_var_map { | |||
514 | RTL_IMR_VIDOK, /*AC_VI DMA OK Interrupt */ | 538 | RTL_IMR_VIDOK, /*AC_VI DMA OK Interrupt */ |
515 | RTL_IMR_VODOK, /*AC_VO DMA Interrupt */ | 539 | RTL_IMR_VODOK, /*AC_VO DMA Interrupt */ |
516 | RTL_IMR_ROK, /*Receive DMA OK Interrupt */ | 540 | RTL_IMR_ROK, /*Receive DMA OK Interrupt */ |
517 | RTL_IBSS_INT_MASKS, /*(RTL_IMR_BcnInt | RTL_IMR_TBDOK | | 541 | RTL_IBSS_INT_MASKS, /*(RTL_IMR_BCNINT | RTL_IMR_TBDOK | |
518 | * RTL_IMR_TBDER) */ | 542 | * RTL_IMR_TBDER) */ |
519 | RTL_IMR_C2HCMD, /*fw interrupt*/ | 543 | RTL_IMR_C2HCMD, /*fw interrupt*/ |
520 | 544 | ||
@@ -959,7 +983,7 @@ struct rtl_phy { | |||
959 | 983 | ||
960 | /* Dual mac */ | 984 | /* Dual mac */ |
961 | bool need_iqk; | 985 | bool need_iqk; |
962 | struct iqk_matrix_regs iqk_matrix_regsetting[IQK_MATRIX_SETTINGS_NUM]; | 986 | struct iqk_matrix_regs iqk_matrix[IQK_MATRIX_SETTINGS_NUM]; |
963 | 987 | ||
964 | bool rfpi_enable; | 988 | bool rfpi_enable; |
965 | 989 | ||
@@ -1278,6 +1302,29 @@ struct rtl_security { | |||
1278 | u8 *pairwise_key; | 1302 | u8 *pairwise_key; |
1279 | }; | 1303 | }; |
1280 | 1304 | ||
1305 | #define ASSOCIATE_ENTRY_NUM 33 | ||
1306 | |||
1307 | struct fast_ant_training { | ||
1308 | u8 bssid[6]; | ||
1309 | u8 antsel_rx_keep_0; | ||
1310 | u8 antsel_rx_keep_1; | ||
1311 | u8 antsel_rx_keep_2; | ||
1312 | u32 ant_sum[7]; | ||
1313 | u32 ant_cnt[7]; | ||
1314 | u32 ant_ave[7]; | ||
1315 | u8 fat_state; | ||
1316 | u32 train_idx; | ||
1317 | u8 antsel_a[ASSOCIATE_ENTRY_NUM]; | ||
1318 | u8 antsel_b[ASSOCIATE_ENTRY_NUM]; | ||
1319 | u8 antsel_c[ASSOCIATE_ENTRY_NUM]; | ||
1320 | u32 main_ant_sum[ASSOCIATE_ENTRY_NUM]; | ||
1321 | u32 aux_ant_sum[ASSOCIATE_ENTRY_NUM]; | ||
1322 | u32 main_ant_cnt[ASSOCIATE_ENTRY_NUM]; | ||
1323 | u32 aux_ant_cnt[ASSOCIATE_ENTRY_NUM]; | ||
1324 | u8 rx_idle_ant; | ||
1325 | bool becomelinked; | ||
1326 | }; | ||
1327 | |||
1281 | struct rtl_dm { | 1328 | struct rtl_dm { |
1282 | /*PHY status for Dynamic Management */ | 1329 | /*PHY status for Dynamic Management */ |
1283 | long entry_min_undec_sm_pwdb; | 1330 | long entry_min_undec_sm_pwdb; |
@@ -1314,9 +1361,24 @@ struct rtl_dm { | |||
1314 | bool disable_tx_int; | 1361 | bool disable_tx_int; |
1315 | char ofdm_index[2]; | 1362 | char ofdm_index[2]; |
1316 | char cck_index; | 1363 | char cck_index; |
1364 | char delta_power_index; | ||
1365 | char delta_power_index_last; | ||
1366 | char power_index_offset; | ||
1367 | |||
1368 | /*88e tx power tracking*/ | ||
1369 | u8 swing_idx_ofdm[2]; | ||
1370 | u8 swing_idx_ofdm_cur; | ||
1371 | u8 swing_idx_ofdm_base; | ||
1372 | bool swing_flag_ofdm; | ||
1373 | u8 swing_idx_cck; | ||
1374 | u8 swing_idx_cck_cur; | ||
1375 | u8 swing_idx_cck_base; | ||
1376 | bool swing_flag_cck; | ||
1317 | 1377 | ||
1318 | /* DMSP */ | 1378 | /* DMSP */ |
1319 | bool supp_phymode_switch; | 1379 | bool supp_phymode_switch; |
1380 | |||
1381 | struct fast_ant_training fat_table; | ||
1320 | }; | 1382 | }; |
1321 | 1383 | ||
1322 | #define EFUSE_MAX_LOGICAL_SIZE 256 | 1384 | #define EFUSE_MAX_LOGICAL_SIZE 256 |
@@ -1349,6 +1411,9 @@ struct rtl_efuse { | |||
1349 | u8 external_pa; | 1411 | u8 external_pa; |
1350 | 1412 | ||
1351 | u8 dev_addr[6]; | 1413 | u8 dev_addr[6]; |
1414 | u8 wowlan_enable; | ||
1415 | u8 antenna_div_cfg; | ||
1416 | u8 antenna_div_type; | ||
1352 | 1417 | ||
1353 | bool txpwr_fromeprom; | 1418 | bool txpwr_fromeprom; |
1354 | u8 eeprom_crystalcap; | 1419 | u8 eeprom_crystalcap; |
@@ -1404,14 +1469,12 @@ struct rtl_ps_ctl { | |||
1404 | bool rfchange_inprogress; | 1469 | bool rfchange_inprogress; |
1405 | bool swrf_processing; | 1470 | bool swrf_processing; |
1406 | bool hwradiooff; | 1471 | bool hwradiooff; |
1407 | |||
1408 | /* | 1472 | /* |
1409 | * just for PCIE ASPM | 1473 | * just for PCIE ASPM |
1410 | * If it supports ASPM, Offset[560h] = 0x40, | 1474 | * If it supports ASPM, Offset[560h] = 0x40, |
1411 | * otherwise Offset[560h] = 0x00. | 1475 | * otherwise Offset[560h] = 0x00. |
1412 | * */ | 1476 | * */ |
1413 | bool support_aspm; | 1477 | bool support_aspm; |
1414 | |||
1415 | bool support_backdoor; | 1478 | bool support_backdoor; |
1416 | 1479 | ||
1417 | /*for LPS */ | 1480 | /*for LPS */ |
@@ -1472,7 +1535,7 @@ struct rtl_stats { | |||
1472 | s8 rssi; | 1535 | s8 rssi; |
1473 | u8 signal; | 1536 | u8 signal; |
1474 | u8 noise; | 1537 | u8 noise; |
1475 | u16 rate; /*in 100 kbps */ | 1538 | u8 rate; /* hw desc rate */ |
1476 | u8 received_channel; | 1539 | u8 received_channel; |
1477 | u8 control; | 1540 | u8 control; |
1478 | u8 mask; | 1541 | u8 mask; |
@@ -1514,8 +1577,16 @@ struct rtl_stats { | |||
1514 | bool packet_toself; | 1577 | bool packet_toself; |
1515 | bool packet_beacon; /*for rssi */ | 1578 | bool packet_beacon; /*for rssi */ |
1516 | char cck_adc_pwdb[4]; /*for rx path selection */ | 1579 | char cck_adc_pwdb[4]; /*for rx path selection */ |
1580 | |||
1581 | u8 packet_report_type; | ||
1582 | |||
1583 | u32 macid; | ||
1584 | u8 wake_match; | ||
1585 | u32 bt_rx_rssi_percentage; | ||
1586 | u32 macid_valid_entry[2]; | ||
1517 | }; | 1587 | }; |
1518 | 1588 | ||
1589 | |||
1519 | struct rt_link_detect { | 1590 | struct rt_link_detect { |
1520 | /* count for roaming */ | 1591 | /* count for roaming */ |
1521 | u32 bcn_rx_inperiod; | 1592 | u32 bcn_rx_inperiod; |
@@ -1568,7 +1639,8 @@ struct rtl_tcb_desc { | |||
1568 | /* early mode */ | 1639 | /* early mode */ |
1569 | u8 empkt_num; | 1640 | u8 empkt_num; |
1570 | /* The max value by HW */ | 1641 | /* The max value by HW */ |
1571 | u32 empkt_len[5]; | 1642 | u32 empkt_len[10]; |
1643 | bool btx_enable_sw_calc_duration; | ||
1572 | }; | 1644 | }; |
1573 | 1645 | ||
1574 | struct rtl_hal_ops { | 1646 | struct rtl_hal_ops { |
@@ -1781,7 +1853,6 @@ struct rtl_works { | |||
1781 | struct timer_list dualmac_easyconcurrent_retrytimer; | 1853 | struct timer_list dualmac_easyconcurrent_retrytimer; |
1782 | struct timer_list fw_clockoff_timer; | 1854 | struct timer_list fw_clockoff_timer; |
1783 | struct timer_list fast_antenna_training_timer; | 1855 | struct timer_list fast_antenna_training_timer; |
1784 | |||
1785 | /*task */ | 1856 | /*task */ |
1786 | struct tasklet_struct irq_tasklet; | 1857 | struct tasklet_struct irq_tasklet; |
1787 | struct tasklet_struct irq_prepare_bcn_tasklet; | 1858 | struct tasklet_struct irq_prepare_bcn_tasklet; |
@@ -1866,10 +1937,12 @@ struct dig_t { | |||
1866 | char back_val; | 1937 | char back_val; |
1867 | char back_range_max; | 1938 | char back_range_max; |
1868 | char back_range_min; | 1939 | char back_range_min; |
1869 | u8 rx_gain_range_max; | 1940 | u8 rx_gain_max; |
1870 | u8 rx_gain_range_min; | 1941 | u8 rx_gain_min; |
1871 | u8 min_undec_pwdb_for_dm; | 1942 | u8 min_undec_pwdb_for_dm; |
1872 | u8 rssi_val_min; | 1943 | u8 rssi_val_min; |
1944 | u8 pre_cck_cca_thres; | ||
1945 | u8 cur_cck_cca_thres; | ||
1873 | u8 pre_cck_pd_state; | 1946 | u8 pre_cck_pd_state; |
1874 | u8 cur_cck_pd_state; | 1947 | u8 cur_cck_pd_state; |
1875 | u8 pre_cck_fa_state; | 1948 | u8 pre_cck_fa_state; |
@@ -1891,6 +1964,13 @@ struct dig_t { | |||
1891 | u8 backoff_enable_flag; | 1964 | u8 backoff_enable_flag; |
1892 | char backoffval_range_max; | 1965 | char backoffval_range_max; |
1893 | char backoffval_range_min; | 1966 | char backoffval_range_min; |
1967 | u8 dig_min_0; | ||
1968 | u8 dig_min_1; | ||
1969 | bool media_connect_0; | ||
1970 | bool media_connect_1; | ||
1971 | |||
1972 | u32 antdiv_rssi_max; | ||
1973 | u32 rssi_max; | ||
1894 | }; | 1974 | }; |
1895 | 1975 | ||
1896 | struct rtl_global_var { | 1976 | struct rtl_global_var { |
@@ -2228,6 +2308,7 @@ value to host byte ordering.*/ | |||
2228 | #define WLAN_FC_GET_TYPE(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_FTYPE) | 2308 | #define WLAN_FC_GET_TYPE(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_FTYPE) |
2229 | #define WLAN_FC_GET_STYPE(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_STYPE) | 2309 | #define WLAN_FC_GET_STYPE(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_STYPE) |
2230 | #define WLAN_FC_MORE_DATA(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_MOREDATA) | 2310 | #define WLAN_FC_MORE_DATA(fc) (le16_to_cpu(fc) & IEEE80211_FCTL_MOREDATA) |
2311 | #define rtl_dm(rtlpriv) (&((rtlpriv)->dm)) | ||
2231 | 2312 | ||
2232 | #define RT_RF_OFF_LEVL_ASPM BIT(0) /*PCI ASPM */ | 2313 | #define RT_RF_OFF_LEVL_ASPM BIT(0) /*PCI ASPM */ |
2233 | #define RT_RF_OFF_LEVL_CLK_REQ BIT(1) /*PCI clock request */ | 2314 | #define RT_RF_OFF_LEVL_CLK_REQ BIT(1) /*PCI clock request */ |