Commit da17fcff authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: rtl8192de: Shorten some variable names

The private data areas for these drivers contain some very long variable
names that cause difficulty in fitting source lines to an 80-character
limit.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0bd899e7
...@@ -34,9 +34,6 @@ ...@@ -34,9 +34,6 @@
#include "dm_common.h" #include "dm_common.h"
#include "phy_common.h" #include "phy_common.h"
/* Define macro to shorten lines */
#define MCS_TXPWR mcs_txpwrlevel_origoffset
u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask) u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
...@@ -138,13 +135,13 @@ u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw, ...@@ -138,13 +135,13 @@ u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XB_HSSIPARAMETER1, rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XB_HSSIPARAMETER1,
BIT(8)); BIT(8));
if (rfpi_enable) if (rfpi_enable)
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readbackpi, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rbpi,
BLSSIREADBACKDATA); BLSSIREADBACKDATA);
else else
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readback, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
BLSSIREADBACKDATA); BLSSIREADBACKDATA);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x]=0x%x\n", RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x]=0x%x\n",
rfpath, pphyreg->rflssi_readback, retvalue); rfpath, pphyreg->rf_rb, retvalue);
return retvalue; return retvalue;
} }
EXPORT_SYMBOL(_rtl92c_phy_rf_serial_read); EXPORT_SYMBOL(_rtl92c_phy_rf_serial_read);
...@@ -290,11 +287,11 @@ void _rtl92c_store_pwrIndex_diffrate_offset(struct ieee80211_hw *hw, ...@@ -290,11 +287,11 @@ void _rtl92c_store_pwrIndex_diffrate_offset(struct ieee80211_hw *hw,
else else
return; return;
rtlphy->MCS_TXPWR[rtlphy->pwrgroup_cnt][index] = data; rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index] = data;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%x\n", "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%x\n",
rtlphy->pwrgroup_cnt, index, rtlphy->pwrgroup_cnt, index,
rtlphy->MCS_TXPWR[rtlphy->pwrgroup_cnt][index]); rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index]);
if (index == 13) if (index == 13)
rtlphy->pwrgroup_cnt++; rtlphy->pwrgroup_cnt++;
...@@ -374,14 +371,10 @@ void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -374,14 +371,10 @@ void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RFPGA0_XA_HSSIPARAMETER2; rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RFPGA0_XA_HSSIPARAMETER2;
rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RFPGA0_XB_HSSIPARAMETER2; rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RFPGA0_XB_HSSIPARAMETER2;
rtlphy->phyreg_def[RF90_PATH_A].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_A].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_B].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_B].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_C].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_D].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_C].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_D].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1; rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1;
rtlphy->phyreg_def[RF90_PATH_B].rfagc_control1 = ROFDM0_XBAGCCORE1; rtlphy->phyreg_def[RF90_PATH_B].rfagc_control1 = ROFDM0_XBAGCCORE1;
...@@ -393,47 +386,33 @@ void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -393,47 +386,33 @@ void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_C].rfagc_control2 = ROFDM0_XCAGCCORE2; rtlphy->phyreg_def[RF90_PATH_C].rfagc_control2 = ROFDM0_XCAGCCORE2;
rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2; rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2;
rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbal = ROFDM0_XARXIQIMBALANCE;
ROFDM0_XARXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbal = ROFDM0_XBRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbal = ROFDM0_XCRXIQIMBANLANCE;
ROFDM0_XBRXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbal = ROFDM0_XDRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbalance =
ROFDM0_XCRXIQIMBANLANCE;
rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbalance =
ROFDM0_XDRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE; rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE;
rtlphy->phyreg_def[RF90_PATH_B].rfrx_afe = ROFDM0_XBRXAFE; rtlphy->phyreg_def[RF90_PATH_B].rfrx_afe = ROFDM0_XBRXAFE;
rtlphy->phyreg_def[RF90_PATH_C].rfrx_afe = ROFDM0_XCRXAFE; rtlphy->phyreg_def[RF90_PATH_C].rfrx_afe = ROFDM0_XCRXAFE;
rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE; rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE;
rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbal = ROFDM0_XATXIQIMBALANCE;
ROFDM0_XATXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbal = ROFDM0_XBTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbal = ROFDM0_XCTXIQIMBALANCE;
ROFDM0_XBTXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbal = ROFDM0_XDTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbalance =
ROFDM0_XCTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbalance =
ROFDM0_XDTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATXAFE; rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATXAFE;
rtlphy->phyreg_def[RF90_PATH_B].rftx_afe = ROFDM0_XBTXAFE; rtlphy->phyreg_def[RF90_PATH_B].rftx_afe = ROFDM0_XBTXAFE;
rtlphy->phyreg_def[RF90_PATH_C].rftx_afe = ROFDM0_XCTXAFE; rtlphy->phyreg_def[RF90_PATH_C].rftx_afe = ROFDM0_XCTXAFE;
rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTXAFE; rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTXAFE;
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RFPGA0_XA_LSSIREADBACK;
RFPGA0_XA_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RFPGA0_XB_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_C].rf_rb = RFPGA0_XC_LSSIREADBACK;
RFPGA0_XB_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_D].rf_rb = RFPGA0_XD_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_C].rflssi_readback =
RFPGA0_XC_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = TRANSCEIVEA_HSPI_READBACK;
rtlphy->phyreg_def[RF90_PATH_D].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = TRANSCEIVEB_HSPI_READBACK;
RFPGA0_XD_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readbackpi =
TRANSCEIVEA_HSPI_READBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readbackpi =
TRANSCEIVEB_HSPI_READBACK;
} }
EXPORT_SYMBOL(_rtl92c_phy_init_bb_rf_register_definition); EXPORT_SYMBOL(_rtl92c_phy_init_bb_rf_register_definition);
......
...@@ -41,7 +41,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -41,7 +41,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
if (!rtlpriv->dm.dynamic_txpower_enable) if (!rtlpriv->dm.dynamic_txpower_enable)
return; return;
...@@ -52,7 +52,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -52,7 +52,7 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
} }
if ((mac->link_state < MAC80211_LINKED) && if ((mac->link_state < MAC80211_LINKED) &&
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undec_sm_pwdb == 0)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
"Not connected to any\n"); "Not connected to any\n");
...@@ -64,41 +64,35 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -64,41 +64,35 @@ void rtl92ce_dm_dynamic_txpower(struct ieee80211_hw *hw)
if (mac->link_state >= MAC80211_LINKED) { if (mac->link_state >= MAC80211_LINKED) {
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"STA Default Port PWDB = 0x%lx\n", "STA Default Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Ext Port PWDB = 0x%lx\n", "AP Ext Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) { if (undec_sm_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n"); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
} else if ((undecorated_smoothed_pwdb < } else if ((undec_sm_pwdb < (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) &&
(TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) && (undec_sm_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL1)) {
(undecorated_smoothed_pwdb >=
TX_POWER_NEAR_FIELD_THRESH_LVL1)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n"); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
} else if (undecorated_smoothed_pwdb < } else if (undec_sm_pwdb < (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
(TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_NORMAL\n"); "TXHIGHPWRLEVEL_NORMAL\n");
......
...@@ -1403,9 +1403,9 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -1403,9 +1403,9 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
tempval = hwinfo[EEPROM_TXPOWERHT40_2SDIFF + i]; tempval = hwinfo[EEPROM_TXPOWERHT40_2SDIFF + i];
else else
tempval = EEPROM_DEFAULT_HT40_2SDIFF; tempval = EEPROM_DEFAULT_HT40_2SDIFF;
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif[RF90_PATH_A][i] = rtlefuse->eprom_chnl_txpwr_ht40_2sdf[RF90_PATH_A][i] =
(tempval & 0xf); (tempval & 0xf);
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif[RF90_PATH_B][i] = rtlefuse->eprom_chnl_txpwr_ht40_2sdf[RF90_PATH_B][i] =
((tempval & 0xf0) >> 4); ((tempval & 0xf0) >> 4);
} }
...@@ -1429,7 +1429,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -1429,7 +1429,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
"RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n",
rf_path, i, rf_path, i,
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][i]); eprom_chnl_txpwr_ht40_2sdf[rf_path][i]);
for (rf_path = 0; rf_path < 2; rf_path++) { for (rf_path = 0; rf_path < 2; rf_path++) {
for (i = 0; i < 14; i++) { for (i = 0; i < 14; i++) {
...@@ -1444,14 +1444,14 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -1444,14 +1444,14 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
if ((rtlefuse-> if ((rtlefuse->
eeprom_chnlarea_txpwr_ht40_1s[rf_path][index] - eeprom_chnlarea_txpwr_ht40_1s[rf_path][index] -
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][index]) eprom_chnl_txpwr_ht40_2sdf[rf_path][index])
> 0) { > 0) {
rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = rtlefuse->txpwrlevel_ht40_2s[rf_path][i] =
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_1s[rf_path] eeprom_chnlarea_txpwr_ht40_1s[rf_path]
[index] - [index] -
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path] eprom_chnl_txpwr_ht40_2sdf[rf_path]
[index]; [index];
} else { } else {
rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = 0; rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = 0;
...@@ -2224,7 +2224,7 @@ static void rtl8192ce_bt_var_init(struct ieee80211_hw *hw) ...@@ -2224,7 +2224,7 @@ static void rtl8192ce_bt_var_init(struct ieee80211_hw *hw)
if (rtlpcipriv->bt_coexist.reg_bt_iso == 2) if (rtlpcipriv->bt_coexist.reg_bt_iso == 2)
rtlpcipriv->bt_coexist.bt_ant_isolation = rtlpcipriv->bt_coexist.bt_ant_isolation =
rtlpcipriv->bt_coexist.eeprom_bt_ant_isolation; rtlpcipriv->bt_coexist.eeprom_bt_ant_isol;
else else
rtlpcipriv->bt_coexist.bt_ant_isolation = rtlpcipriv->bt_coexist.bt_ant_isolation =
rtlpcipriv->bt_coexist.reg_bt_iso; rtlpcipriv->bt_coexist.reg_bt_iso;
...@@ -2255,23 +2255,22 @@ void rtl8192ce_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -2255,23 +2255,22 @@ void rtl8192ce_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
bool auto_load_fail, u8 *hwinfo) bool auto_load_fail, u8 *hwinfo)
{ {
struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw); struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw);
u8 value; u8 val;
if (!auto_load_fail) { if (!auto_load_fail) {
rtlpcipriv->bt_coexist.eeprom_bt_coexist = rtlpcipriv->bt_coexist.eeprom_bt_coexist =
((hwinfo[RF_OPTION1] & 0xe0) >> 5); ((hwinfo[RF_OPTION1] & 0xe0) >> 5);
value = hwinfo[RF_OPTION4]; val = hwinfo[RF_OPTION4];
rtlpcipriv->bt_coexist.eeprom_bt_type = ((value & 0xe) >> 1); rtlpcipriv->bt_coexist.eeprom_bt_type = ((val & 0xe) >> 1);
rtlpcipriv->bt_coexist.eeprom_bt_ant_num = (value & 0x1); rtlpcipriv->bt_coexist.eeprom_bt_ant_num = (val & 0x1);
rtlpcipriv->bt_coexist.eeprom_bt_ant_isolation = rtlpcipriv->bt_coexist.eeprom_bt_ant_isol = ((val & 0x10) >> 4);
((value & 0x10) >> 4);
rtlpcipriv->bt_coexist.eeprom_bt_radio_shared = rtlpcipriv->bt_coexist.eeprom_bt_radio_shared =
((value & 0x20) >> 5); ((val & 0x20) >> 5);
} else { } else {
rtlpcipriv->bt_coexist.eeprom_bt_coexist = 0; rtlpcipriv->bt_coexist.eeprom_bt_coexist = 0;
rtlpcipriv->bt_coexist.eeprom_bt_type = BT_2WIRE; rtlpcipriv->bt_coexist.eeprom_bt_type = BT_2WIRE;
rtlpcipriv->bt_coexist.eeprom_bt_ant_num = ANT_X2; rtlpcipriv->bt_coexist.eeprom_bt_ant_num = ANT_X2;
rtlpcipriv->bt_coexist.eeprom_bt_ant_isolation = 0; rtlpcipriv->bt_coexist.eeprom_bt_ant_isol = 0;
rtlpcipriv->bt_coexist.eeprom_bt_radio_shared = BT_RADIO_SHARED; rtlpcipriv->bt_coexist.eeprom_bt_radio_shared = BT_RADIO_SHARED;
} }
......
...@@ -97,15 +97,12 @@ void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, ...@@ -97,15 +97,12 @@ void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
} }
if (rtlefuse->eeprom_regulatory == 0) { if (rtlefuse->eeprom_regulatory == 0) {
tmpval = tmpval = (rtlphy->mcs_offset[0][6]) +
(rtlphy->mcs_txpwrlevel_origoffset[0][6]) + (rtlphy->mcs_offset[0][7] << 8);
(rtlphy->mcs_txpwrlevel_origoffset[0][7] <<
8);
tx_agc[RF90_PATH_A] += tmpval; tx_agc[RF90_PATH_A] += tmpval;
tmpval = (rtlphy->mcs_txpwrlevel_origoffset[0][14]) + tmpval = (rtlphy->mcs_offset[0][14]) +
(rtlphy->mcs_txpwrlevel_origoffset[0][15] << (rtlphy->mcs_offset[0][15] << 24);
24);
tx_agc[RF90_PATH_B] += tmpval; tx_agc[RF90_PATH_B] += tmpval;
} }
} }
...@@ -209,8 +206,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -209,8 +206,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
case 0: case 0:
chnlgroup = 0; chnlgroup = 0;
writeVal = writeVal = rtlphy->mcs_offset[chnlgroup][index +
rtlphy->mcs_txpwrlevel_origoffset[chnlgroup][index +
(rf ? 8 : 0)] (rf ? 8 : 0)]
+ ((index < 2) ? powerBase0[rf] : powerBase1[rf]); + ((index < 2) ? powerBase0[rf] : powerBase1[rf]);
...@@ -240,8 +236,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -240,8 +236,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
chnlgroup++; chnlgroup++;
} }
writeVal = writeVal = rtlphy->mcs_offset[chnlgroup]
rtlphy->mcs_txpwrlevel_origoffset[chnlgroup]
[index + (rf ? 8 : 0)] + ((index < 2) ? [index + (rf ? 8 : 0)] + ((index < 2) ?
powerBase0[rf] : powerBase0[rf] :
powerBase1[rf]); powerBase1[rf]);
...@@ -276,8 +271,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -276,8 +271,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
1]); 1]);
} }
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
pwr_diff_limit[i] = pwr_diff_limit[i] = (u8) ((rtlphy->mcs_offset
(u8) ((rtlphy->mcs_txpwrlevel_origoffset
[chnlgroup][index + [chnlgroup][index +
(rf ? 8 : 0)] & (0x7f << (i * 8))) >> (rf ? 8 : 0)] & (0x7f << (i * 8))) >>
(i * 8)); (i * 8));
...@@ -317,8 +311,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -317,8 +311,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
break; break;
default: default:
chnlgroup = 0; chnlgroup = 0;
writeVal = writeVal = rtlphy->mcs_offset[chnlgroup]
rtlphy->mcs_txpwrlevel_origoffset[chnlgroup]
[index + (rf ? 8 : 0)] [index + (rf ? 8 : 0)]
+ ((index < 2) ? powerBase0[rf] : powerBase1[rf]); + ((index < 2) ? powerBase0[rf] : powerBase1[rf]);
......
...@@ -140,8 +140,8 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -140,8 +140,8 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw,
pstats->is_cck = is_cck_rate; pstats->is_cck = is_cck_rate;
pstats->packet_beacon = packet_beacon; pstats->packet_beacon = packet_beacon;
pstats->is_cck = is_cck_rate; pstats->is_cck = is_cck_rate;
pstats->rx_mimo_signalquality[0] = -1; pstats->rx_mimo_sig_qual[0] = -1;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
if (is_cck_rate) { if (is_cck_rate) {
u8 report, cck_highpwr; u8 report, cck_highpwr;
...@@ -211,8 +211,8 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -211,8 +211,8 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw,
} }
pstats->signalquality = sq; pstats->signalquality = sq;
pstats->rx_mimo_signalquality[0] = sq; pstats->rx_mimo_sig_qual[0] = sq;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
} }
} else { } else {
rtlpriv->dm.rfpath_rxenable[0] = rtlpriv->dm.rfpath_rxenable[0] =
...@@ -251,8 +251,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -251,8 +251,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw,
if (i == 0) if (i == 0)
pstats->signalquality = pstats->signalquality =
(u8) (evm & 0xff); (u8) (evm & 0xff);
pstats->rx_mimo_signalquality[i] = pstats->rx_mimo_sig_qual[i] = (u8) (evm & 0xff);
(u8) (evm & 0xff);
} }
} }
} }
...@@ -362,36 +361,31 @@ static void _rtl92ce_process_pwdb(struct ieee80211_hw *hw, ...@@ -362,36 +361,31 @@ static void _rtl92ce_process_pwdb(struct ieee80211_hw *hw,
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
return; return;
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
} }
if (pstats->packet_toself || pstats->packet_beacon) { if (pstats->packet_toself || pstats->packet_beacon) {
if (undecorated_smoothed_pwdb < 0) if (undec_sm_pwdb < 0)
undecorated_smoothed_pwdb = pstats->rx_pwdb_all; undec_sm_pwdb = pstats->rx_pwdb_all;
if (pstats->rx_pwdb_all > (u32) undecorated_smoothed_pwdb) { if (pstats->rx_pwdb_all > (u32) undec_sm_pwdb) {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb undec_sm_pwdb += 1;
+ 1;
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
} }
rtlpriv->dm.undecorated_smoothed_pwdb = rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
undecorated_smoothed_pwdb;
_rtl92ce_update_rxsignalstatistics(hw, pstats); _rtl92ce_update_rxsignalstatistics(hw, pstats);
} }
} }
...@@ -438,15 +432,14 @@ static void _rtl92ce_process_ui_link_quality(struct ieee80211_hw *hw, ...@@ -438,15 +432,14 @@ static void _rtl92ce_process_ui_link_quality(struct ieee80211_hw *hw,
for (n_spatialstream = 0; n_spatialstream < 2; for (n_spatialstream = 0; n_spatialstream < 2;
n_spatialstream++) { n_spatialstream++) {
if (pstats-> if (pstats->
rx_mimo_signalquality[n_spatialstream] != rx_mimo_sig_qual[n_spatialstream] != -1) {
-1) {
if (rtlpriv->stats. if (rtlpriv->stats.
rx_evm_percentage[n_spatialstream] rx_evm_percentage[n_spatialstream]
== 0) { == 0) {
rtlpriv->stats. rtlpriv->stats.
rx_evm_percentage rx_evm_percentage
[n_spatialstream] = [n_spatialstream] =
pstats->rx_mimo_signalquality pstats->rx_mimo_sig_qual
[n_spatialstream]; [n_spatialstream];
} }
...@@ -456,8 +449,7 @@ static void _rtl92ce_process_ui_link_quality(struct ieee80211_hw *hw, ...@@ -456,8 +449,7 @@ static void _rtl92ce_process_ui_link_quality(struct ieee80211_hw *hw,
stats.rx_evm_percentage stats.rx_evm_percentage
[n_spatialstream] * [n_spatialstream] *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats-> (pstats->rx_mimo_sig_qual
rx_mimo_signalquality
[n_spatialstream] * 1)) / [n_spatialstream] * 1)) /
(RX_SMOOTH_FACTOR); (RX_SMOOTH_FACTOR);
} }
......
...@@ -39,7 +39,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -39,7 +39,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
if (!rtlpriv->dm.dynamic_txpower_enable) if (!rtlpriv->dm.dynamic_txpower_enable)
return; return;
...@@ -50,7 +50,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -50,7 +50,7 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
} }
if ((mac->link_state < MAC80211_LINKED) && if ((mac->link_state < MAC80211_LINKED) &&
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undec_sm_pwdb == 0)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
"Not connected to any\n"); "Not connected to any\n");
...@@ -62,41 +62,35 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -62,41 +62,35 @@ void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw)
if (mac->link_state >= MAC80211_LINKED) { if (mac->link_state >= MAC80211_LINKED) {
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"STA Default Port PWDB = 0x%lx\n", "STA Default Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Ext Port PWDB = 0x%lx\n", "AP Ext Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
if (undecorated_smoothed_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) { if (undec_sm_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL2) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n"); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
} else if ((undecorated_smoothed_pwdb < } else if ((undec_sm_pwdb < (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) &&
(TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) && (undec_sm_pwdb >= TX_POWER_NEAR_FIELD_THRESH_LVL1)) {
(undecorated_smoothed_pwdb >=
TX_POWER_NEAR_FIELD_THRESH_LVL1)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_LEVEL1;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n"); "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
} else if (undecorated_smoothed_pwdb < } else if (undec_sm_pwdb < (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
(TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"TXHIGHPWRLEVEL_NORMAL\n"); "TXHIGHPWRLEVEL_NORMAL\n");
......
...@@ -152,9 +152,9 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -152,9 +152,9 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
tempval = hwinfo[EEPROM_TXPOWERHT40_2SDIFF + i]; tempval = hwinfo[EEPROM_TXPOWERHT40_2SDIFF + i];
else else
tempval = EEPROM_DEFAULT_HT40_2SDIFF; tempval = EEPROM_DEFAULT_HT40_2SDIFF;
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif[RF90_PATH_A][i] = rtlefuse->eprom_chnl_txpwr_ht40_2sdf[RF90_PATH_A][i] =
(tempval & 0xf); (tempval & 0xf);
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif[RF90_PATH_B][i] = rtlefuse->eprom_chnl_txpwr_ht40_2sdf[RF90_PATH_B][i] =
((tempval & 0xf0) >> 4); ((tempval & 0xf0) >> 4);
} }
for (rf_path = 0; rf_path < 2; rf_path++) for (rf_path = 0; rf_path < 2; rf_path++)
...@@ -177,7 +177,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -177,7 +177,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
"RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n",
rf_path, i, rf_path, i,
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][i]); eprom_chnl_txpwr_ht40_2sdf[rf_path][i]);
for (rf_path = 0; rf_path < 2; rf_path++) { for (rf_path = 0; rf_path < 2; rf_path++) {
for (i = 0; i < 14; i++) { for (i = 0; i < 14; i++) {
index = _rtl92c_get_chnl_group((u8) i); index = _rtl92c_get_chnl_group((u8) i);
...@@ -189,13 +189,13 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, ...@@ -189,13 +189,13 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
if ((rtlefuse-> if ((rtlefuse->
eeprom_chnlarea_txpwr_ht40_1s[rf_path][index] - eeprom_chnlarea_txpwr_ht40_1s[rf_path][index] -
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][index]) eprom_chnl_txpwr_ht40_2sdf[rf_path][index])
> 0) { > 0) {
rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = rtlefuse->txpwrlevel_ht40_2s[rf_path][i] =
rtlefuse-> rtlefuse->
eeprom_chnlarea_txpwr_ht40_1s[rf_path] eeprom_chnlarea_txpwr_ht40_1s[rf_path]
[index] - rtlefuse-> [index] - rtlefuse->
eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path] eprom_chnl_txpwr_ht40_2sdf[rf_path]
[index]; [index];
} else { } else {
rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = 0; rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = 0;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#define LINK_Q ui_link_quality #define LINK_Q ui_link_quality
#define RX_EVM rx_evm_percentage #define RX_EVM rx_evm_percentage
#define RX_SIGQ rx_mimo_signalquality #define RX_SIGQ rx_mimo_sig_qual
void rtl92c_read_chip_version(struct ieee80211_hw *hw) void rtl92c_read_chip_version(struct ieee80211_hw *hw)
...@@ -982,32 +982,27 @@ static void _rtl92c_process_pwdb(struct ieee80211_hw *hw, ...@@ -982,32 +982,27 @@ static void _rtl92c_process_pwdb(struct ieee80211_hw *hw,
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb = 0; long undec_sm_pwdb = 0;
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
return; return;
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
} }
if (pstats->packet_toself || pstats->packet_beacon) { if (pstats->packet_toself || pstats->packet_beacon) {
if (undecorated_smoothed_pwdb < 0) if (undec_sm_pwdb < 0)
undecorated_smoothed_pwdb = pstats->rx_pwdb_all; undec_sm_pwdb = pstats->rx_pwdb_all;
if (pstats->rx_pwdb_all > (u32) undecorated_smoothed_pwdb) { if (pstats->rx_pwdb_all > (u32) undec_sm_pwdb) {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
undecorated_smoothed_pwdb = undecorated_smoothed_pwdb undec_sm_pwdb += 1;
+ 1;
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
} }
rtlpriv->dm.undecorated_smoothed_pwdb = rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
undecorated_smoothed_pwdb;
_rtl92c_update_rxsignalstatistics(hw, pstats); _rtl92c_update_rxsignalstatistics(hw, pstats);
} }
} }
......
...@@ -115,15 +115,11 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, ...@@ -115,15 +115,11 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
(ppowerlevel[idx1] << 24); (ppowerlevel[idx1] << 24);
} }
if (rtlefuse->eeprom_regulatory == 0) { if (rtlefuse->eeprom_regulatory == 0) {
tmpval = (rtlphy->mcs_txpwrlevel_origoffset tmpval = (rtlphy->mcs_offset[0][6]) +
[0][6]) + (rtlphy->mcs_offset[0][7] << 8);
(rtlphy->mcs_txpwrlevel_origoffset
[0][7] << 8);
tx_agc[RF90_PATH_A] += tmpval; tx_agc[RF90_PATH_A] += tmpval;
tmpval = (rtlphy->mcs_txpwrlevel_origoffset tmpval = (rtlphy->mcs_offset[0][14]) +
[0][14]) + (rtlphy->mcs_offset[0][15] << 24);
(rtlphy->mcs_txpwrlevel_origoffset
[0][15] << 24);
tx_agc[RF90_PATH_B] += tmpval; tx_agc[RF90_PATH_B] += tmpval;
} }
} }
...@@ -215,7 +211,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -215,7 +211,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
switch (rtlefuse->eeprom_regulatory) { switch (rtlefuse->eeprom_regulatory) {
case 0: case 0:
chnlgroup = 0; chnlgroup = 0;
writeVal = rtlphy->mcs_txpwrlevel_origoffset writeVal = rtlphy->mcs_offset
[chnlgroup][index + (rf ? 8 : 0)] [chnlgroup][index + (rf ? 8 : 0)]
+ ((index < 2) ? powerBase0[rf] : powerBase1[rf]); + ((index < 2) ? powerBase0[rf] : powerBase1[rf]);
RTPRINT(rtlpriv, FPHY, PHY_TXPWR, RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
...@@ -238,8 +234,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -238,8 +234,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
else else
chnlgroup += 4; chnlgroup += 4;
} }
writeVal = rtlphy->mcs_txpwrlevel_origoffset writeVal = rtlphy->mcs_offset[chnlgroup][index +
[chnlgroup][index +
(rf ? 8 : 0)] + (rf ? 8 : 0)] +
((index < 2) ? powerBase0[rf] : ((index < 2) ? powerBase0[rf] :
powerBase1[rf]); powerBase1[rf]);
...@@ -271,8 +266,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -271,8 +266,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
[channel - 1]); [channel - 1]);
} }
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
pwr_diff_limit[i] = pwr_diff_limit[i] = (u8) ((rtlphy->mcs_offset
(u8) ((rtlphy->mcs_txpwrlevel_origoffset
[chnlgroup][index + (rf ? 8 : 0)] [chnlgroup][index + (rf ? 8 : 0)]
& (0x7f << (i * 8))) >> (i * 8)); & (0x7f << (i * 8))) >> (i * 8));
if (rtlphy->current_chan_bw == if (rtlphy->current_chan_bw ==
...@@ -306,7 +300,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -306,7 +300,7 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
break; break;
default: default:
chnlgroup = 0; chnlgroup = 0;
writeVal = rtlphy->mcs_txpwrlevel_origoffset[chnlgroup] writeVal = rtlphy->mcs_offset[chnlgroup]
[index + (rf ? 8 : 0)] + ((index < 2) ? [index + (rf ? 8 : 0)] + ((index < 2) ?
powerBase0[rf] : powerBase1[rf]); powerBase0[rf] : powerBase1[rf]);
RTPRINT(rtlpriv, FPHY, PHY_TXPWR, RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
......
This diff is collapsed.
...@@ -298,13 +298,13 @@ static u32 _rtl92d_phy_rf_serial_read(struct ieee80211_hw *hw, ...@@ -298,13 +298,13 @@ static u32 _rtl92d_phy_rf_serial_read(struct ieee80211_hw *hw,
rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XB_HSSIPARAMETER1, rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XB_HSSIPARAMETER1,
BIT(8)); BIT(8));
if (rfpi_enable) if (rfpi_enable)
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readbackpi, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rbpi,
BLSSIREADBACKDATA); BLSSIREADBACKDATA);
else else
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readback, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
BLSSIREADBACKDATA); BLSSIREADBACKDATA);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x] = 0x%x\n", RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x] = 0x%x\n",
rfpath, pphyreg->rflssi_readback, retvalue); rfpath, pphyreg->rf_rb, retvalue);
return retvalue; return retvalue;
} }
...@@ -478,14 +478,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -478,14 +478,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
/* RF switch Control */ /* RF switch Control */
/* TR/Ant switch control */ /* TR/Ant switch control */
rtlphy->phyreg_def[RF90_PATH_A].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_A].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_B].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_B].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_C].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_D].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_C].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_D].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
/* AGC control 1 */ /* AGC control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1; rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1;
...@@ -500,14 +496,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -500,14 +496,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2; rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2;
/* RX AFE control 1 */ /* RX AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbal = ROFDM0_XARXIQIMBALANCE;
ROFDM0_XARXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbal = ROFDM0_XBRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbal = ROFDM0_XCRXIQIMBALANCE;
ROFDM0_XBRXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbal = ROFDM0_XDRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbalance =
ROFDM0_XCRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbalance =
ROFDM0_XDRXIQIMBALANCE;
/*RX AFE control 1 */ /*RX AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE; rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE;
...@@ -516,14 +508,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -516,14 +508,10 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE; rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE;
/* Tx AFE control 1 */ /* Tx AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbal = ROFDM0_XATxIQIMBALANCE;
ROFDM0_XATxIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbal = ROFDM0_XBTxIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbal = ROFDM0_XCTxIQIMBALANCE;
ROFDM0_XBTxIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbal = ROFDM0_XDTxIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbalance =
ROFDM0_XCTxIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbalance =
ROFDM0_XDTxIQIMBALANCE;
/* Tx AFE control 2 */ /* Tx AFE control 2 */
rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATxAFE; rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATxAFE;
...@@ -532,20 +520,14 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw) ...@@ -532,20 +520,14 @@ static void _rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTxAFE; rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTxAFE;
/* Tranceiver LSSI Readback SI mode */ /* Tranceiver LSSI Readback SI mode */
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RFPGA0_XA_LSSIREADBACK;
RFPGA0_XA_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RFPGA0_XB_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_C].rf_rb = RFPGA0_XC_LSSIREADBACK;
RFPGA0_XB_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_D].rf_rb = RFPGA0_XD_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_C].rflssi_readback =
RFPGA0_XC_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_D].rflssi_readback =
RFPGA0_XD_LSSIREADBACK;
/* Tranceiver LSSI Readback PI mode */ /* Tranceiver LSSI Readback PI mode */
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readbackpi = rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = TRANSCEIVERA_HSPI_READBACK;
TRANSCEIVERA_HSPI_READBACK; rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = TRANSCEIVERB_HSPI_READBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readbackpi =
TRANSCEIVERB_HSPI_READBACK;
} }
static bool _rtl92d_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, static bool _rtl92d_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
...@@ -702,12 +684,11 @@ static void _rtl92d_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw, ...@@ -702,12 +684,11 @@ static void _rtl92d_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
else else
return; return;
rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][index] = data; rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index] = data;
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
"MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n", "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
rtlphy->pwrgroup_cnt, index, rtlphy->pwrgroup_cnt, index,
rtlphy->mcs_txpwrlevel_origoffset rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index]);
[rtlphy->pwrgroup_cnt][index]);
if (index == 13) if (index == 13)
rtlphy->pwrgroup_cnt++; rtlphy->pwrgroup_cnt++;
} }
......
...@@ -106,11 +106,11 @@ void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, ...@@ -106,11 +106,11 @@ void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
(ppowerlevel[idx1] << 24); (ppowerlevel[idx1] << 24);
} }
if (rtlefuse->eeprom_regulatory == 0) { if (rtlefuse->eeprom_regulatory == 0) {
tmpval = (rtlphy->mcs_txpwrlevel_origoffset[0][6]) + tmpval = (rtlphy->mcs_offset[0][6]) +
(rtlphy->mcs_txpwrlevel_origoffset[0][7] << 8); (rtlphy->mcs_offset[0][7] << 8);
tx_agc[RF90_PATH_A] += tmpval; tx_agc[RF90_PATH_A] += tmpval;
tmpval = (rtlphy->mcs_txpwrlevel_origoffset[0][14]) + tmpval = (rtlphy->mcs_offset[0][14]) +
(rtlphy->mcs_txpwrlevel_origoffset[0][15] << 24); (rtlphy->mcs_offset[0][15] << 24);
tx_agc[RF90_PATH_B] += tmpval; tx_agc[RF90_PATH_B] += tmpval;
} }
} }
...@@ -227,7 +227,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -227,7 +227,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
switch (rtlefuse->eeprom_regulatory) { switch (rtlefuse->eeprom_regulatory) {
case 0: case 0:
chnlgroup = 0; chnlgroup = 0;
writeval = rtlphy->mcs_txpwrlevel_origoffset writeval = rtlphy->mcs_offset
[chnlgroup][index + [chnlgroup][index +
(rf ? 8 : 0)] + ((index < 2) ? (rf ? 8 : 0)] + ((index < 2) ?
powerbase0[rf] : powerbase0[rf] :
...@@ -247,7 +247,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -247,7 +247,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
chnlgroup++; chnlgroup++;
else else
chnlgroup += 4; chnlgroup += 4;
writeval = rtlphy->mcs_txpwrlevel_origoffset writeval = rtlphy->mcs_offset
[chnlgroup][index + [chnlgroup][index +
(rf ? 8 : 0)] + ((index < 2) ? (rf ? 8 : 0)] + ((index < 2) ?
powerbase0[rf] : powerbase0[rf] :
...@@ -280,8 +280,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -280,8 +280,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
[channel - 1]); [channel - 1]);
} }
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
pwr_diff_limit[i] = pwr_diff_limit[i] = (u8)((rtlphy->mcs_offset
(u8)((rtlphy->mcs_txpwrlevel_origoffset
[chnlgroup][index + (rf ? 8 : 0)] & [chnlgroup][index + (rf ? 8 : 0)] &
(0x7f << (i * 8))) >> (i * 8)); (0x7f << (i * 8))) >> (i * 8));
if (rtlphy->current_chan_bw == if (rtlphy->current_chan_bw ==
...@@ -316,8 +315,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, ...@@ -316,8 +315,7 @@ static void _rtl92d_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
break; break;
default: default:
chnlgroup = 0; chnlgroup = 0;
writeval = rtlphy->mcs_txpwrlevel_origoffset writeval = rtlphy->mcs_offset[chnlgroup][index +
[chnlgroup][index +
(rf ? 8 : 0)] + ((index < 2) ? (rf ? 8 : 0)] + ((index < 2) ?
powerbase0[rf] : powerbase1[rf]); powerbase0[rf] : powerbase1[rf]);
RTPRINT(rtlpriv, FPHY, PHY_TXPWR, RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
......
...@@ -132,8 +132,8 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -132,8 +132,8 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
pstats->packet_toself = packet_toself; pstats->packet_toself = packet_toself;
pstats->packet_beacon = packet_beacon; pstats->packet_beacon = packet_beacon;
pstats->is_cck = is_cck_rate; pstats->is_cck = is_cck_rate;
pstats->rx_mimo_signalquality[0] = -1; pstats->rx_mimo_sig_qual[0] = -1;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
if (is_cck_rate) { if (is_cck_rate) {
u8 report, cck_highpwr; u8 report, cck_highpwr;
...@@ -212,8 +212,8 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -212,8 +212,8 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
sq = ((64 - sq) * 100) / 44; sq = ((64 - sq) * 100) / 44;
} }
pstats->signalquality = sq; pstats->signalquality = sq;
pstats->rx_mimo_signalquality[0] = sq; pstats->rx_mimo_sig_qual[0] = sq;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
} }
} else { } else {
rtlpriv->dm.rfpath_rxenable[0] = true; rtlpriv->dm.rfpath_rxenable[0] = true;
...@@ -246,7 +246,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -246,7 +246,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
if (i == 0) if (i == 0)
pstats->signalquality = pstats->signalquality =
(u8)(evm & 0xff); (u8)(evm & 0xff);
pstats->rx_mimo_signalquality[i] = pstats->rx_mimo_sig_qual[i] =
(u8)(evm & 0xff); (u8)(evm & 0xff);
} }
} }
...@@ -345,33 +345,28 @@ static void _rtl92de_process_pwdb(struct ieee80211_hw *hw, ...@@ -345,33 +345,28 @@ static void _rtl92de_process_pwdb(struct ieee80211_hw *hw,
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
if (mac->opmode == NL80211_IFTYPE_ADHOC || if (mac->opmode == NL80211_IFTYPE_ADHOC ||
mac->opmode == NL80211_IFTYPE_AP) mac->opmode == NL80211_IFTYPE_AP)
return; return;
else else
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
if (pstats->packet_toself || pstats->packet_beacon) { if (pstats->packet_toself || pstats->packet_beacon) {
if (undecorated_smoothed_pwdb < 0) if (undec_sm_pwdb < 0)
undecorated_smoothed_pwdb = pstats->rx_pwdb_all; undec_sm_pwdb = pstats->rx_pwdb_all;
if (pstats->rx_pwdb_all > (u32) undecorated_smoothed_pwdb) { if (pstats->rx_pwdb_all > (u32) undec_sm_pwdb) {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
undecorated_smoothed_pwdb = undec_sm_pwdb = undec_sm_pwdb + 1;
undecorated_smoothed_pwdb + 1;
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = (((undec_sm_pwdb) *
(((undecorated_smoothed_pwdb) *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR); (pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
} }
rtlpriv->dm.undecorated_smoothed_pwdb = rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
undecorated_smoothed_pwdb;
_rtl92de_update_rxsignalstatistics(hw, pstats); _rtl92de_update_rxsignalstatistics(hw, pstats);
} }
} }
...@@ -383,15 +378,15 @@ static void rtl92d_loop_over_streams(struct ieee80211_hw *hw, ...@@ -383,15 +378,15 @@ static void rtl92d_loop_over_streams(struct ieee80211_hw *hw,
int stream; int stream;
for (stream = 0; stream < 2; stream++) { for (stream = 0; stream < 2; stream++) {
if (pstats->rx_mimo_signalquality[stream] != -1) { if (pstats->rx_mimo_sig_qual[stream] != -1) {
if (rtlpriv->stats.rx_evm_percentage[stream] == 0) { if (rtlpriv->stats.rx_evm_percentage[stream] == 0) {
rtlpriv->stats.rx_evm_percentage[stream] = rtlpriv->stats.rx_evm_percentage[stream] =
pstats->rx_mimo_signalquality[stream]; pstats->rx_mimo_sig_qual[stream];
} }
rtlpriv->stats.rx_evm_percentage[stream] = rtlpriv->stats.rx_evm_percentage[stream] =
((rtlpriv->stats.rx_evm_percentage[stream] ((rtlpriv->stats.rx_evm_percentage[stream]
* (RX_SMOOTH_FACTOR - 1)) + * (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_mimo_signalquality[stream] * 1)) / (pstats->rx_mimo_sig_qual[stream] * 1)) /
(RX_SMOOTH_FACTOR); (RX_SMOOTH_FACTOR);
} }
} }
......
...@@ -267,13 +267,12 @@ static void _rtl92s_dm_refresh_rateadaptive_mask(struct ieee80211_hw *hw) ...@@ -267,13 +267,12 @@ static void _rtl92s_dm_refresh_rateadaptive_mask(struct ieee80211_hw *hw)
break; break;
} }
if (rtlpriv->dm.undecorated_smoothed_pwdb > if (rtlpriv->dm.undec_sm_pwdb > (long)high_rssi_thresh) {
(long)high_rssi_thresh) {
ra->ratr_state = DM_RATR_STA_HIGH; ra->ratr_state = DM_RATR_STA_HIGH;
} else if (rtlpriv->dm.undecorated_smoothed_pwdb > } else if (rtlpriv->dm.undec_sm_pwdb >
(long)middle_rssi_thresh) { (long)middle_rssi_thresh) {
ra->ratr_state = DM_RATR_STA_LOW; ra->ratr_state = DM_RATR_STA_LOW;
} else if (rtlpriv->dm.undecorated_smoothed_pwdb > } else if (rtlpriv->dm.undec_sm_pwdb >
(long)low_rssi_thresh) { (long)low_rssi_thresh) {
ra->ratr_state = DM_RATR_STA_LOW; ra->ratr_state = DM_RATR_STA_LOW;
} else { } else {
...@@ -283,8 +282,7 @@ static void _rtl92s_dm_refresh_rateadaptive_mask(struct ieee80211_hw *hw) ...@@ -283,8 +282,7 @@ static void _rtl92s_dm_refresh_rateadaptive_mask(struct ieee80211_hw *hw)
if (ra->pre_ratr_state != ra->ratr_state) { if (ra->pre_ratr_state != ra->ratr_state) {
RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD, RT_TRACE(rtlpriv, COMP_RATE, DBG_LOUD,
"RSSI = %ld RSSI_LEVEL = %d PreState = %d, CurState = %d\n", "RSSI = %ld RSSI_LEVEL = %d PreState = %d, CurState = %d\n",
rtlpriv->dm.undecorated_smoothed_pwdb, rtlpriv->dm.undec_sm_pwdb, ra->ratr_state,
ra->ratr_state,
ra->pre_ratr_state, ra->ratr_state); ra->pre_ratr_state, ra->ratr_state);
rtlpriv->cfg->ops->update_rate_tbl(hw, sta, rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
...@@ -316,7 +314,7 @@ static void _rtl92s_dm_switch_baseband_mrc(struct ieee80211_hw *hw) ...@@ -316,7 +314,7 @@ static void _rtl92s_dm_switch_baseband_mrc(struct ieee80211_hw *hw)
rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_MRC, (u8 *)(&current_mrc)); rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_MRC, (u8 *)(&current_mrc));
if (mac->link_state >= MAC80211_LINKED) { if (mac->link_state >= MAC80211_LINKED) {
if (rtlpriv->dm.undecorated_smoothed_pwdb > tmpentry_maxpwdb) { if (rtlpriv->dm.undec_sm_pwdb > tmpentry_maxpwdb) {
rssi_a = rtlpriv->stats.rx_rssi_percentage[RF90_PATH_A]; rssi_a = rtlpriv->stats.rx_rssi_percentage[RF90_PATH_A];
rssi_b = rtlpriv->stats.rx_rssi_percentage[RF90_PATH_B]; rssi_b = rtlpriv->stats.rx_rssi_percentage[RF90_PATH_B];
} }
...@@ -424,18 +422,18 @@ static void rtl92s_backoff_enable_flag(struct ieee80211_hw *hw) ...@@ -424,18 +422,18 @@ static void rtl92s_backoff_enable_flag(struct ieee80211_hw *hw)
struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt); struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt);
if (falsealm_cnt->cnt_all > digtable->fa_highthresh) { if (falsealm_cnt->cnt_all > digtable->fa_highthresh) {
if ((digtable->backoff_val - 6) < if ((digtable->back_val - 6) <
digtable->backoffval_range_min) digtable->backoffval_range_min)
digtable->backoff_val = digtable->backoffval_range_min; digtable->back_val = digtable->backoffval_range_min;
else else
digtable->backoff_val -= 6; digtable->back_val -= 6;
} else if (falsealm_cnt->cnt_all < digtable->fa_lowthresh) { } else if (falsealm_cnt->cnt_all < digtable->fa_lowthresh) {
if ((digtable->backoff_val + 6) > if ((digtable->back_val + 6) >
digtable->backoffval_range_max) digtable->backoffval_range_max)
digtable->backoff_val = digtable->back_val =
digtable->backoffval_range_max; digtable->backoffval_range_max;
else else
digtable->backoff_val += 6; digtable->back_val += 6;
} }
} }
...@@ -447,28 +445,28 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw) ...@@ -447,28 +445,28 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw)
static u8 initialized, force_write; static u8 initialized, force_write;
u8 initial_gain = 0; u8 initial_gain = 0;
if ((digtable->pre_sta_connectstate == digtable->cur_sta_connectstate) || if ((digtable->pre_sta_cstate == digtable->cur_sta_cstate) ||
(digtable->cur_sta_connectstate == DIG_STA_BEFORE_CONNECT)) { (digtable->cur_sta_cstate == DIG_STA_BEFORE_CONNECT)) {
if (digtable->cur_sta_connectstate == DIG_STA_BEFORE_CONNECT) { if (digtable->cur_sta_cstate == DIG_STA_BEFORE_CONNECT) {
if (rtlpriv->psc.rfpwr_state != ERFON) if (rtlpriv->psc.rfpwr_state != ERFON)
return; return;
if (digtable->backoff_enable_flag) if (digtable->backoff_enable_flag)
rtl92s_backoff_enable_flag(hw); rtl92s_backoff_enable_flag(hw);
else else
digtable->backoff_val = DM_DIG_BACKOFF; digtable->back_val = DM_DIG_BACKOFF;
if ((digtable->rssi_val + 10 - digtable->backoff_val) > if ((digtable->rssi_val + 10 - digtable->back_val) >
digtable->rx_gain_range_max) digtable->rx_gain_range_max)
digtable->cur_igvalue = digtable->cur_igvalue =
digtable->rx_gain_range_max; digtable->rx_gain_range_max;
else if ((digtable->rssi_val + 10 - digtable->backoff_val) else if ((digtable->rssi_val + 10 - digtable->back_val)
< digtable->rx_gain_range_min) < digtable->rx_gain_range_min)
digtable->cur_igvalue = digtable->cur_igvalue =
digtable->rx_gain_range_min; digtable->rx_gain_range_min;
else else
digtable->cur_igvalue = digtable->rssi_val + 10 - digtable->cur_igvalue = digtable->rssi_val + 10 -
digtable->backoff_val; digtable->back_val;
if (falsealm_cnt->cnt_all > 10000) if (falsealm_cnt->cnt_all > 10000)
digtable->cur_igvalue = digtable->cur_igvalue =
...@@ -490,7 +488,7 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw) ...@@ -490,7 +488,7 @@ static void _rtl92s_dm_initial_gain_sta_beforeconnect(struct ieee80211_hw *hw)
digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
rtl92s_phy_set_fw_cmd(hw, FW_CMD_DIG_ENABLE); rtl92s_phy_set_fw_cmd(hw, FW_CMD_DIG_ENABLE);
digtable->backoff_val = DM_DIG_BACKOFF; digtable->back_val = DM_DIG_BACKOFF;
digtable->cur_igvalue = rtlpriv->phy.default_initialgain[0]; digtable->cur_igvalue = rtlpriv->phy.default_initialgain[0];
digtable->pre_igvalue = 0; digtable->pre_igvalue = 0;
return; return;
...@@ -528,14 +526,14 @@ static void _rtl92s_dm_ctrl_initgain_bytwoport(struct ieee80211_hw *hw) ...@@ -528,14 +526,14 @@ static void _rtl92s_dm_ctrl_initgain_bytwoport(struct ieee80211_hw *hw)
/* Decide the current status and if modify initial gain or not */ /* Decide the current status and if modify initial gain or not */
if (rtlpriv->mac80211.link_state >= MAC80211_LINKED || if (rtlpriv->mac80211.link_state >= MAC80211_LINKED ||
rtlpriv->mac80211.opmode == NL80211_IFTYPE_ADHOC) rtlpriv->mac80211.opmode == NL80211_IFTYPE_ADHOC)
digtable->cur_sta_connectstate = DIG_STA_CONNECT; digtable->cur_sta_cstate = DIG_STA_CONNECT;
else else
digtable->cur_sta_connectstate = DIG_STA_DISCONNECT; digtable->cur_sta_cstate = DIG_STA_DISCONNECT;
digtable->rssi_val = rtlpriv->dm.undecorated_smoothed_pwdb; digtable->rssi_val = rtlpriv->dm.undec_sm_pwdb;
/* Change dig mode to rssi */ /* Change dig mode to rssi */
if (digtable->cur_sta_connectstate != DIG_STA_DISCONNECT) { if (digtable->cur_sta_cstate != DIG_STA_DISCONNECT) {
if (digtable->dig_twoport_algorithm == if (digtable->dig_twoport_algorithm ==
DIG_TWO_PORT_ALGO_FALSE_ALARM) { DIG_TWO_PORT_ALGO_FALSE_ALARM) {
digtable->dig_twoport_algorithm = DIG_TWO_PORT_ALGO_RSSI; digtable->dig_twoport_algorithm = DIG_TWO_PORT_ALGO_RSSI;
...@@ -546,7 +544,7 @@ static void _rtl92s_dm_ctrl_initgain_bytwoport(struct ieee80211_hw *hw) ...@@ -546,7 +544,7 @@ static void _rtl92s_dm_ctrl_initgain_bytwoport(struct ieee80211_hw *hw)
_rtl92s_dm_false_alarm_counter_statistics(hw); _rtl92s_dm_false_alarm_counter_statistics(hw);
_rtl92s_dm_initial_gain_sta_beforeconnect(hw); _rtl92s_dm_initial_gain_sta_beforeconnect(hw);
digtable->pre_sta_connectstate = digtable->cur_sta_connectstate; digtable->pre_sta_cstate = digtable->cur_sta_cstate;
} }
static void _rtl92s_dm_ctrl_initgain_byrssi(struct ieee80211_hw *hw) static void _rtl92s_dm_ctrl_initgain_byrssi(struct ieee80211_hw *hw)
...@@ -573,7 +571,7 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -573,7 +571,7 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
long txpwr_threshold_lv1, txpwr_threshold_lv2; long txpwr_threshold_lv1, txpwr_threshold_lv2;
/* 2T2R TP issue */ /* 2T2R TP issue */
...@@ -587,7 +585,7 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -587,7 +585,7 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw)
} }
if ((mac->link_state < MAC80211_LINKED) && if ((mac->link_state < MAC80211_LINKED) &&
(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb == 0)) { (rtlpriv->dm.entry_min_undec_sm_pwdb == 0)) {
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
"Not connected to any\n"); "Not connected to any\n");
...@@ -599,25 +597,22 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -599,25 +597,22 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw)
if (mac->link_state >= MAC80211_LINKED) { if (mac->link_state >= MAC80211_LINKED) {
if (mac->opmode == NL80211_IFTYPE_ADHOC) { if (mac->opmode == NL80211_IFTYPE_ADHOC) {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Client PWDB = 0x%lx\n", "AP Client PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
rtlpriv->dm.undecorated_smoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"STA Default Port PWDB = 0x%lx\n", "STA Default Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
} else { } else {
undecorated_smoothed_pwdb = undec_sm_pwdb = rtlpriv->dm.entry_min_undec_sm_pwdb;
rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"AP Ext Port PWDB = 0x%lx\n", "AP Ext Port PWDB = 0x%lx\n",
undecorated_smoothed_pwdb); undec_sm_pwdb);
} }
txpwr_threshold_lv2 = TX_POWER_NEAR_FIELD_THRESH_LVL2; txpwr_threshold_lv2 = TX_POWER_NEAR_FIELD_THRESH_LVL2;
...@@ -625,12 +620,12 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw) ...@@ -625,12 +620,12 @@ static void _rtl92s_dm_dynamic_txpower(struct ieee80211_hw *hw)
if (rtl_get_bbreg(hw, 0xc90, MASKBYTE0) == 1) if (rtl_get_bbreg(hw, 0xc90, MASKBYTE0) == 1)
rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL;
else if (undecorated_smoothed_pwdb >= txpwr_threshold_lv2) else if (undec_sm_pwdb >= txpwr_threshold_lv2)
rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL2; rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL2;
else if ((undecorated_smoothed_pwdb < (txpwr_threshold_lv2 - 3)) && else if ((undec_sm_pwdb < (txpwr_threshold_lv2 - 3)) &&
(undecorated_smoothed_pwdb >= txpwr_threshold_lv1)) (undec_sm_pwdb >= txpwr_threshold_lv1))
rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL1; rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL1;
else if (undecorated_smoothed_pwdb < (txpwr_threshold_lv1 - 3)) else if (undec_sm_pwdb < (txpwr_threshold_lv1 - 3))
rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL; rtlpriv->dm.dynamic_txhighpower_lvl = TX_HIGHPWR_LEVEL_NORMAL;
if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl))
...@@ -665,10 +660,10 @@ static void _rtl92s_dm_init_dig(struct ieee80211_hw *hw) ...@@ -665,10 +660,10 @@ static void _rtl92s_dm_init_dig(struct ieee80211_hw *hw)
digtable->dig_state = DM_STA_DIG_MAX; digtable->dig_state = DM_STA_DIG_MAX;
digtable->dig_highpwrstate = DM_STA_DIG_MAX; digtable->dig_highpwrstate = DM_STA_DIG_MAX;
digtable->cur_sta_connectstate = DIG_STA_DISCONNECT; digtable->cur_sta_cstate = DIG_STA_DISCONNECT;
digtable->pre_sta_connectstate = DIG_STA_DISCONNECT; digtable->pre_sta_cstate = DIG_STA_DISCONNECT;
digtable->cur_ap_connectstate = DIG_AP_DISCONNECT; digtable->cur_ap_cstate = DIG_AP_DISCONNECT;
digtable->pre_ap_connectstate = DIG_AP_DISCONNECT; digtable->pre_ap_cstate = DIG_AP_DISCONNECT;
digtable->rssi_lowthresh = DM_DIG_THRESH_LOW; digtable->rssi_lowthresh = DM_DIG_THRESH_LOW;
digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; digtable->rssi_highthresh = DM_DIG_THRESH_HIGH;
...@@ -681,7 +676,7 @@ static void _rtl92s_dm_init_dig(struct ieee80211_hw *hw) ...@@ -681,7 +676,7 @@ static void _rtl92s_dm_init_dig(struct ieee80211_hw *hw)
/* for dig debug rssi value */ /* for dig debug rssi value */
digtable->rssi_val = 50; digtable->rssi_val = 50;
digtable->backoff_val = DM_DIG_BACKOFF; digtable->back_val = DM_DIG_BACKOFF;
digtable->rx_gain_range_max = DM_DIG_MAX; digtable->rx_gain_range_max = DM_DIG_MAX;
digtable->rx_gain_range_min = DM_DIG_MIN; digtable->rx_gain_range_min = DM_DIG_MIN;
...@@ -709,7 +704,7 @@ void rtl92s_dm_init(struct ieee80211_hw *hw) ...@@ -709,7 +704,7 @@ void rtl92s_dm_init(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER; rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER;
rtlpriv->dm.undecorated_smoothed_pwdb = -1; rtlpriv->dm.undec_sm_pwdb = -1;
_rtl92s_dm_init_dynamic_txpower(hw); _rtl92s_dm_init_dynamic_txpower(hw);
rtl92s_dm_init_edca_turbo(hw); rtl92s_dm_init_edca_turbo(hw);
......
...@@ -1697,7 +1697,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) ...@@ -1697,7 +1697,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw)
hwinfo[EEPROM_TXPOWERBASE + 6 + rf_path * 3 + i]; hwinfo[EEPROM_TXPOWERBASE + 6 + rf_path * 3 + i];
/* Read OFDM RF A & B Tx power for 2T */ /* Read OFDM RF A & B Tx power for 2T */
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][i] rtlefuse->eprom_chnl_txpwr_ht40_2sdf[rf_path][i]
= hwinfo[EEPROM_TXPOWERBASE + 12 + = hwinfo[EEPROM_TXPOWERBASE + 12 +
rf_path * 3 + i]; rf_path * 3 + i];
} }
...@@ -1722,7 +1722,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) ...@@ -1722,7 +1722,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw)
RTPRINT(rtlpriv, FINIT, INIT_EEPROM, RTPRINT(rtlpriv, FINIT, INIT_EEPROM,
"RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n",
rf_path, i, rf_path, i,
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif rtlefuse->eprom_chnl_txpwr_ht40_2sdf
[rf_path][i]); [rf_path][i]);
for (rf_path = 0; rf_path < 2; rf_path++) { for (rf_path = 0; rf_path < 2; rf_path++) {
...@@ -1748,7 +1748,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) ...@@ -1748,7 +1748,7 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw)
rtlefuse->eeprom_chnlarea_txpwr_ht40_1s rtlefuse->eeprom_chnlarea_txpwr_ht40_1s
[rf_path][index]; [rf_path][index];
rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = rtlefuse->txpwrlevel_ht40_2s[rf_path][i] =
rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif rtlefuse->eprom_chnl_txpwr_ht40_2sdf
[rf_path][index]; [rf_path][index];
} }
......
...@@ -139,17 +139,17 @@ static u32 _rtl92s_phy_rf_serial_read(struct ieee80211_hw *hw, ...@@ -139,17 +139,17 @@ static u32 _rtl92s_phy_rf_serial_read(struct ieee80211_hw *hw,
BIT(8)); BIT(8));
if (rfpi_enable) if (rfpi_enable)
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readbackpi, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rbpi,
BLSSI_READBACK_DATA); BLSSI_READBACK_DATA);
else else
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readback, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
BLSSI_READBACK_DATA); BLSSI_READBACK_DATA);
retvalue = rtl_get_bbreg(hw, pphyreg->rflssi_readback, retvalue = rtl_get_bbreg(hw, pphyreg->rf_rb,
BLSSI_READBACK_DATA); BLSSI_READBACK_DATA);
RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x]=0x%x\n", RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "RFR-%d Addr[0x%x]=0x%x\n",
rfpath, pphyreg->rflssi_readback, retvalue); rfpath, pphyreg->rf_rb, retvalue);
return retvalue; return retvalue;
...@@ -696,7 +696,7 @@ static void _rtl92s_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw, ...@@ -696,7 +696,7 @@ static void _rtl92s_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
else else
return; return;
rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][index] = data; rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index] = data;
if (index == 5) if (index == 5)
rtlphy->pwrgroup_cnt++; rtlphy->pwrgroup_cnt++;
} }
...@@ -765,14 +765,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) ...@@ -765,14 +765,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rfhssi_para2 = RFPGA0_XD_HSSIPARAMETER2; rtlphy->phyreg_def[RF90_PATH_D].rfhssi_para2 = RFPGA0_XD_HSSIPARAMETER2;
/* RF switch Control */ /* RF switch Control */
rtlphy->phyreg_def[RF90_PATH_A].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_A].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_B].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_B].rfswitch_control = rtlphy->phyreg_def[RF90_PATH_C].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
RFPGA0_XAB_SWITCHCONTROL; rtlphy->phyreg_def[RF90_PATH_D].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_C].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
rtlphy->phyreg_def[RF90_PATH_D].rfswitch_control =
RFPGA0_XCD_SWITCHCONTROL;
/* AGC control 1 */ /* AGC control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1; rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1;
...@@ -787,14 +783,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) ...@@ -787,14 +783,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2; rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2;
/* RX AFE control 1 */ /* RX AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbal = ROFDM0_XARXIQIMBALANCE;
ROFDM0_XARXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbal = ROFDM0_XBRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbal = ROFDM0_XCRXIQIMBALANCE;
ROFDM0_XBRXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbal = ROFDM0_XDRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbalance =
ROFDM0_XCRXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbalance =
ROFDM0_XDRXIQIMBALANCE;
/* RX AFE control 1 */ /* RX AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE; rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE;
...@@ -803,14 +795,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) ...@@ -803,14 +795,10 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE; rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE;
/* Tx AFE control 1 */ /* Tx AFE control 1 */
rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbal = ROFDM0_XATXIQIMBALANCE;
ROFDM0_XATXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbal = ROFDM0_XBTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbalance = rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbal = ROFDM0_XCTXIQIMBALANCE;
ROFDM0_XBTXIQIMBALANCE; rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbal = ROFDM0_XDTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbalance =
ROFDM0_XCTXIQIMBALANCE;
rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbalance =
ROFDM0_XDTXIQIMBALANCE;
/* Tx AFE control 2 */ /* Tx AFE control 2 */
rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATXAFE; rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATXAFE;
...@@ -819,20 +807,14 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw) ...@@ -819,20 +807,14 @@ static void _rtl92s_phy_init_register_definition(struct ieee80211_hw *hw)
rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTXAFE; rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTXAFE;
/* Tranceiver LSSI Readback */ /* Tranceiver LSSI Readback */
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RFPGA0_XA_LSSIREADBACK;
RFPGA0_XA_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RFPGA0_XB_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readback = rtlphy->phyreg_def[RF90_PATH_C].rf_rb = RFPGA0_XC_LSSIREADBACK;
RFPGA0_XB_LSSIREADBACK; rtlphy->phyreg_def[RF90_PATH_D].rf_rb = RFPGA0_XD_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_C].rflssi_readback =
RFPGA0_XC_LSSIREADBACK;
rtlphy->phyreg_def[RF90_PATH_D].rflssi_readback =
RFPGA0_XD_LSSIREADBACK;
/* Tranceiver LSSI Readback PI mode */ /* Tranceiver LSSI Readback PI mode */
rtlphy->phyreg_def[RF90_PATH_A].rflssi_readbackpi = rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = TRANSCEIVERA_HSPI_READBACK;
TRANSCEIVERA_HSPI_READBACK; rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = TRANSCEIVERB_HSPI_READBACK;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_readbackpi =
TRANSCEIVERB_HSPI_READBACK;
} }
......
...@@ -192,8 +192,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, ...@@ -192,8 +192,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
* defined by Realtek for large power */ * defined by Realtek for large power */
chnlgroup = 0; chnlgroup = 0;
writeval = rtlphy->mcs_txpwrlevel_origoffset writeval = rtlphy->mcs_offset[chnlgroup][index] +
[chnlgroup][index] +
((index < 2) ? pwrbase0 : pwrbase1); ((index < 2) ? pwrbase0 : pwrbase1);
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
...@@ -223,8 +222,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, ...@@ -223,8 +222,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
chnlgroup++; chnlgroup++;
} }
writeval = rtlphy->mcs_txpwrlevel_origoffset writeval = rtlphy->mcs_offset[chnlgroup][index]
[chnlgroup][index]
+ ((index < 2) ? + ((index < 2) ?
pwrbase0 : pwrbase1); pwrbase0 : pwrbase1);
...@@ -257,8 +255,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, ...@@ -257,8 +255,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
} }
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
pwrdiff_limit[i] = pwrdiff_limit[i] = (u8)((rtlphy->mcs_offset
(u8)((rtlphy->mcs_txpwrlevel_origoffset
[chnlgroup][index] & (0x7f << (i * 8))) [chnlgroup][index] & (0x7f << (i * 8)))
>> (i * 8)); >> (i * 8));
...@@ -296,7 +293,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, ...@@ -296,7 +293,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
break; break;
default: default:
chnlgroup = 0; chnlgroup = 0;
writeval = rtlphy->mcs_txpwrlevel_origoffset[chnlgroup][index] + writeval = rtlphy->mcs_offset[chnlgroup][index] +
((index < 2) ? pwrbase0 : pwrbase1); ((index < 2) ? pwrbase0 : pwrbase1);
RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
"RTK better performance, writeval = 0x%x\n", writeval); "RTK better performance, writeval = 0x%x\n", writeval);
......
...@@ -129,8 +129,8 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -129,8 +129,8 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw,
pstats->packet_matchbssid = packet_match_bssid; pstats->packet_matchbssid = packet_match_bssid;
pstats->packet_toself = packet_toself; pstats->packet_toself = packet_toself;
pstats->packet_beacon = packet_beacon; pstats->packet_beacon = packet_beacon;
pstats->rx_mimo_signalquality[0] = -1; pstats->rx_mimo_sig_qual[0] = -1;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
if (is_cck) { if (is_cck) {
u8 report, cck_highpwr; u8 report, cck_highpwr;
...@@ -216,8 +216,8 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -216,8 +216,8 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw,
} }
pstats->signalquality = sq; pstats->signalquality = sq;
pstats->rx_mimo_signalquality[0] = sq; pstats->rx_mimo_sig_qual[0] = sq;
pstats->rx_mimo_signalquality[1] = -1; pstats->rx_mimo_sig_qual[1] = -1;
} }
} else { } else {
rtlpriv->dm.rfpath_rxenable[0] = rtlpriv->dm.rfpath_rxenable[0] =
...@@ -256,8 +256,7 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -256,8 +256,7 @@ static void _rtl92se_query_rxphystatus(struct ieee80211_hw *hw,
if (i == 0) if (i == 0)
pstats->signalquality = (u8)(evm & pstats->signalquality = (u8)(evm &
0xff); 0xff);
pstats->rx_mimo_signalquality[i] = pstats->rx_mimo_sig_qual[i] = (u8) (evm & 0xff);
(u8) (evm & 0xff);
} }
} }
} }
...@@ -366,7 +365,7 @@ static void _rtl92se_process_pwdb(struct ieee80211_hw *hw, ...@@ -366,7 +365,7 @@ static void _rtl92se_process_pwdb(struct ieee80211_hw *hw,
return; return;
} else { } else {
undec_sm_pwdb = undec_sm_pwdb =
rtlpriv->dm.undecorated_smoothed_pwdb; rtlpriv->dm.undec_sm_pwdb;
} }
if (pstats->packet_toself || pstats->packet_beacon) { if (pstats->packet_toself || pstats->packet_beacon) {
...@@ -386,7 +385,7 @@ static void _rtl92se_process_pwdb(struct ieee80211_hw *hw, ...@@ -386,7 +385,7 @@ static void _rtl92se_process_pwdb(struct ieee80211_hw *hw,
(RX_SMOOTH_FACTOR); (RX_SMOOTH_FACTOR);
} }
rtlpriv->dm.undecorated_smoothed_pwdb = undec_sm_pwdb; rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
_rtl92se_update_rxsignalstatistics(hw, pstats); _rtl92se_update_rxsignalstatistics(hw, pstats);
} }
} }
...@@ -398,16 +397,16 @@ static void rtl_92s_process_streams(struct ieee80211_hw *hw, ...@@ -398,16 +397,16 @@ static void rtl_92s_process_streams(struct ieee80211_hw *hw,
u32 stream; u32 stream;
for (stream = 0; stream < 2; stream++) { for (stream = 0; stream < 2; stream++) {
if (pstats->rx_mimo_signalquality[stream] != -1) { if (pstats->rx_mimo_sig_qual[stream] != -1) {
if (rtlpriv->stats.rx_evm_percentage[stream] == 0) { if (rtlpriv->stats.rx_evm_percentage[stream] == 0) {
rtlpriv->stats.rx_evm_percentage[stream] = rtlpriv->stats.rx_evm_percentage[stream] =
pstats->rx_mimo_signalquality[stream]; pstats->rx_mimo_sig_qual[stream];
} }
rtlpriv->stats.rx_evm_percentage[stream] = rtlpriv->stats.rx_evm_percentage[stream] =
((rtlpriv->stats.rx_evm_percentage[stream] * ((rtlpriv->stats.rx_evm_percentage[stream] *
(RX_SMOOTH_FACTOR - 1)) + (RX_SMOOTH_FACTOR - 1)) +
(pstats->rx_mimo_signalquality[stream] * (pstats->rx_mimo_sig_qual[stream] *
1)) / (RX_SMOOTH_FACTOR); 1)) / (RX_SMOOTH_FACTOR);
} }
} }
......
...@@ -198,15 +198,15 @@ struct bb_reg_def { ...@@ -198,15 +198,15 @@ struct bb_reg_def {
u32 rftxgain_stage; u32 rftxgain_stage;
u32 rfhssi_para1; u32 rfhssi_para1;
u32 rfhssi_para2; u32 rfhssi_para2;
u32 rfswitch_control; u32 rfsw_ctrl;
u32 rfagc_control1; u32 rfagc_control1;
u32 rfagc_control2; u32 rfagc_control2;
u32 rfrxiq_imbalance; u32 rfrxiq_imbal;
u32 rfrx_afe; u32 rfrx_afe;
u32 rftxiq_imbalance; u32 rftxiq_imbal;
u32 rftx_afe; u32 rftx_afe;
u32 rflssi_readback; u32 rf_rb; /* rflssi_readback */
u32 rflssi_readbackpi; u32 rf_rbpi; /* rflssi_readbackpi */
}; };
enum io_type { enum io_type {
...@@ -885,7 +885,7 @@ struct rtl_phy { ...@@ -885,7 +885,7 @@ struct rtl_phy {
u8 pwrgroup_cnt; u8 pwrgroup_cnt;
u8 cck_high_power; u8 cck_high_power;
/* MAX_PG_GROUP groups of pwr diff by rates */ /* MAX_PG_GROUP groups of pwr diff by rates */
u32 mcs_txpwrlevel_origoffset[MAX_PG_GROUP][16]; u32 mcs_offset[MAX_PG_GROUP][16];
u8 default_initialgain[4]; u8 default_initialgain[4];
/* the current Tx power level */ /* the current Tx power level */
...@@ -933,7 +933,7 @@ struct rtl_tid_data { ...@@ -933,7 +933,7 @@ struct rtl_tid_data {
}; };
struct rssi_sta { struct rssi_sta {
long undecorated_smoothed_pwdb; long undec_sm_pwdb;
}; };
struct rtl_sta_info { struct rtl_sta_info {
...@@ -1131,9 +1131,9 @@ struct rtl_security { ...@@ -1131,9 +1131,9 @@ struct rtl_security {
struct rtl_dm { struct rtl_dm {
/*PHY status for Dynamic Management */ /*PHY status for Dynamic Management */
long entry_min_undecoratedsmoothed_pwdb; long entry_min_undec_sm_pwdb;
long undecorated_smoothed_pwdb; /*out dm */ long undec_sm_pwdb; /*out dm */
long entry_max_undecoratedsmoothed_pwdb; long entry_max_undec_sm_pwdb;
bool dm_initialgain_enable; bool dm_initialgain_enable;
bool dynamic_txpower_enable; bool dynamic_txpower_enable;
bool current_turbo_edca; bool current_turbo_edca;
...@@ -1209,7 +1209,7 @@ struct rtl_efuse { ...@@ -1209,7 +1209,7 @@ struct rtl_efuse {
u8 eeprom_pwrlimit_ht40[CHANNEL_GROUP_MAX]; u8 eeprom_pwrlimit_ht40[CHANNEL_GROUP_MAX];
u8 eeprom_chnlarea_txpwr_cck[2][CHANNEL_GROUP_MAX_2G]; u8 eeprom_chnlarea_txpwr_cck[2][CHANNEL_GROUP_MAX_2G];
u8 eeprom_chnlarea_txpwr_ht40_1s[2][CHANNEL_GROUP_MAX]; u8 eeprom_chnlarea_txpwr_ht40_1s[2][CHANNEL_GROUP_MAX];
u8 eeprom_chnlarea_txpwr_ht40_2sdiif[2][CHANNEL_GROUP_MAX]; u8 eprom_chnl_txpwr_ht40_2sdf[2][CHANNEL_GROUP_MAX];
u8 txpwrlevel_cck[2][CHANNEL_MAX_NUMBER_2G]; u8 txpwrlevel_cck[2][CHANNEL_MAX_NUMBER_2G];
u8 txpwrlevel_ht40_1s[2][CHANNEL_MAX_NUMBER]; /*For HT 40MHZ pwr */ u8 txpwrlevel_ht40_1s[2][CHANNEL_MAX_NUMBER]; /*For HT 40MHZ pwr */
u8 txpwrlevel_ht40_2s[2][CHANNEL_MAX_NUMBER]; /*For HT 40MHZ pwr */ u8 txpwrlevel_ht40_2s[2][CHANNEL_MAX_NUMBER]; /*For HT 40MHZ pwr */
...@@ -1351,7 +1351,7 @@ struct rtl_stats { ...@@ -1351,7 +1351,7 @@ struct rtl_stats {
bool rx_is40Mhzpacket; bool rx_is40Mhzpacket;
u32 rx_pwdb_all; u32 rx_pwdb_all;
u8 rx_mimo_signalstrength[4]; /*in 0~100 index */ u8 rx_mimo_signalstrength[4]; /*in 0~100 index */
s8 rx_mimo_signalquality[2]; s8 rx_mimo_sig_qual[2];
bool packet_matchbssid; bool packet_matchbssid;
bool is_cck; bool is_cck;
bool is_ht; bool is_ht;
...@@ -1503,6 +1503,9 @@ struct rtl_hal_ops { ...@@ -1503,6 +1503,9 @@ struct rtl_hal_ops {
void (*phy_lc_calibrate) (struct ieee80211_hw *hw, bool is2t); void (*phy_lc_calibrate) (struct ieee80211_hw *hw, bool is2t);
void (*phy_set_bw_mode_callback) (struct ieee80211_hw *hw); void (*phy_set_bw_mode_callback) (struct ieee80211_hw *hw);
void (*dm_dynamic_txpower) (struct ieee80211_hw *hw); void (*dm_dynamic_txpower) (struct ieee80211_hw *hw);
void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw,
bool mstate);
void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw);
}; };
struct rtl_intf_ops { struct rtl_intf_ops {
...@@ -1679,7 +1682,7 @@ struct dig_t { ...@@ -1679,7 +1682,7 @@ struct dig_t {
u32 rssi_highthresh; u32 rssi_highthresh;
u32 fa_lowthresh; u32 fa_lowthresh;
u32 fa_highthresh; u32 fa_highthresh;
long last_min_undecorated_pwdb_for_dm; long last_min_undec_pwdb_for_dm;
long rssi_highpower_lowthresh; long rssi_highpower_lowthresh;
long rssi_highpower_highthresh; long rssi_highpower_highthresh;
u32 recover_cnt; u32 recover_cnt;
...@@ -1692,15 +1695,15 @@ struct dig_t { ...@@ -1692,15 +1695,15 @@ struct dig_t {
u8 dig_twoport_algorithm; u8 dig_twoport_algorithm;
u8 dig_dbgmode; u8 dig_dbgmode;
u8 dig_slgorithm_switch; u8 dig_slgorithm_switch;
u8 cursta_connectstate; u8 cursta_cstate;
u8 presta_connectstate; u8 presta_cstate;
u8 curmultista_connectstate; u8 curmultista_cstate;
char backoff_val; char back_val;
char backoff_val_range_max; char back_range_max;
char backoff_val_range_min; char back_range_min;
u8 rx_gain_range_max; u8 rx_gain_range_max;
u8 rx_gain_range_min; u8 rx_gain_range_min;
u8 min_undecorated_pwdb_for_dm; u8 min_undec_pwdb_for_dm;
u8 rssi_val_min; u8 rssi_val_min;
u8 pre_cck_pd_state; u8 pre_cck_pd_state;
u8 cur_cck_pd_state; u8 cur_cck_pd_state;
...@@ -1712,10 +1715,10 @@ struct dig_t { ...@@ -1712,10 +1715,10 @@ struct dig_t {
u8 forbidden_igi; u8 forbidden_igi;
u8 dig_state; u8 dig_state;
u8 dig_highpwrstate; u8 dig_highpwrstate;
u8 cur_sta_connectstate; u8 cur_sta_cstate;
u8 pre_sta_connectstate; u8 pre_sta_cstate;
u8 cur_ap_connectstate; u8 cur_ap_cstate;
u8 pre_ap_connectstate; u8 pre_ap_cstate;
u8 cur_pd_thstate; u8 cur_pd_thstate;
u8 pre_pd_thstate; u8 pre_pd_thstate;
u8 cur_cs_ratiostate; u8 cur_cs_ratiostate;
...@@ -1846,7 +1849,7 @@ struct bt_coexist_info { ...@@ -1846,7 +1849,7 @@ struct bt_coexist_info {
u8 eeprom_bt_coexist; u8 eeprom_bt_coexist;
u8 eeprom_bt_type; u8 eeprom_bt_type;
u8 eeprom_bt_ant_num; u8 eeprom_bt_ant_num;
u8 eeprom_bt_ant_isolation; u8 eeprom_bt_ant_isol;
u8 eeprom_bt_radio_shared; u8 eeprom_bt_radio_shared;
u8 bt_coexistence; u8 bt_coexistence;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment