Lines Matching refs:rtlphy

261 	struct rtl_phy *rtlphy = &rtlpriv->phy;  in _rtl8821ae_phy_rf_serial_write()  local
262 struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; in _rtl8821ae_phy_rf_serial_write()
294 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_bb_config() local
321 rtlphy->reg_837 = rtl_read_byte(rtlpriv, 0x837); in rtl8821ae_phy_bb_config()
892 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_init_tx_power_by_rate() local
901 rtlphy->tx_power_by_rate_offset[band] in _rtl8821ae_phy_init_tx_power_by_rate()
911 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_set_txpower_by_rate_base() local
922 rtlphy->txpwr_by_rate_base_24g[path][txnum][0] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
925 rtlphy->txpwr_by_rate_base_24g[path][txnum][1] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
928 rtlphy->txpwr_by_rate_base_24g[path][txnum][2] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
931 rtlphy->txpwr_by_rate_base_24g[path][txnum][3] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
934 rtlphy->txpwr_by_rate_base_24g[path][txnum][4] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
937 rtlphy->txpwr_by_rate_base_24g[path][txnum][5] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
948 rtlphy->txpwr_by_rate_base_5g[path][txnum][0] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
951 rtlphy->txpwr_by_rate_base_5g[path][txnum][1] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
954 rtlphy->txpwr_by_rate_base_5g[path][txnum][2] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
957 rtlphy->txpwr_by_rate_base_5g[path][txnum][3] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
960 rtlphy->txpwr_by_rate_base_5g[path][txnum][4] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
979 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_txpower_by_rate_base() local
992 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][0]; in _rtl8821ae_phy_get_txpower_by_rate_base()
995 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][1]; in _rtl8821ae_phy_get_txpower_by_rate_base()
998 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][2]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1001 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][3]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1004 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][4]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1007 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][5]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1018 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][0]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1021 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][1]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1024 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][2]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1027 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][3]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1030 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][4]; in _rtl8821ae_phy_get_txpower_by_rate_base()
1049 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_store_txpower_by_rate_base() local
1054 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_1TX][0] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1058 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_1TX][2] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1062 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_1TX][4] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1066 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_2TX][6] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1070 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_1TX][8] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1074 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][path][RF_2TX][11] >> 8) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1078 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_5G][path][RF_1TX][2] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1082 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_5G][path][RF_1TX][4] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1086 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_5G][path][RF_2TX][6] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1090 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_5G][path][RF_1TX][8] >> 24) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1094 rawvalue = (u16)(rtlphy->tx_power_by_rate_offset[BAND_ON_5G][path][RF_2TX][11] >> 8) & 0xFF; in _rtl8821ae_phy_store_txpower_by_rate_base()
1128 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit() local
1136 temp_pwrlmt = rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1144 rtlphy->txpwr_limit_5g[regulation][bw][2][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1145 rtlphy->txpwr_limit_5g[regulation][bw][4][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1147 rtlphy->txpwr_limit_5g[regulation][bw][4][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1148 rtlphy->txpwr_limit_5g[regulation][bw][2][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1150 rtlphy->txpwr_limit_5g[regulation][bw][3][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1151 rtlphy->txpwr_limit_5g[regulation][bw][5][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1153 rtlphy->txpwr_limit_5g[regulation][bw][5][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1154 rtlphy->txpwr_limit_5g[regulation][bw][3][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1296 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_convert_txpower_limit_to_power_index() local
1333 temp_pwrlmt = rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1341 rtlphy->txpwr_by_rate_base_24g[rf_path][RF_2TX][base_index2_4G]; in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1344 rtlphy->txpwr_by_rate_base_24g[rf_path][RF_1TX][base_index2_4G]; in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1348 rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1356 rtlphy->txpwr_limit_2_4g[regulation][bw] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1394 temp_pwrlmt = rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1403 rtlphy->txpwr_by_rate_base_5g[rf_path] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1407 rtlphy->txpwr_by_rate_base_5g[rf_path] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1413 rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1421 channel, rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1436 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_init_txpower_limit() local
1447 rtlphy->txpwr_limit_2_4g in _rtl8821ae_phy_init_txpower_limit()
1456 rtlphy->txpwr_limit_5g in _rtl8821ae_phy_init_txpower_limit()
1468 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value() local
1474 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][0], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1479 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][1], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1482 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][2], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1487 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][3], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1490 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][4], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1496 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_2TX][5], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1500 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_2TX][6], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1505 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][7], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1508 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][8], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1511 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1516 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1519 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_2TX][10], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1522 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_2TX][11], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1527 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][1], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1530 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][2], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1535 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][3], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1538 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][4], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1543 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_2TX][5], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1546 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_2TX][6], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1551 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][7], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1554 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][8], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1557 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1562 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1565 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_2TX][10], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1568 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfpath][RF_2TX][11], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1646 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_set_txpower_limit() local
1707 prev_power_limit = rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_set_txpower_limit()
1712 rtlphy->txpwr_limit_2_4g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1719 rtlphy->txpwr_limit_2_4g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1731 prev_power_limit = rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1736 rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1742 rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1798 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_bb8821a_config_parafile() local
1837 rtlphy->cck_high_power = (bool)(rtl_get_bbreg(hw, in _rtl8821ae_phy_bb8821a_config_parafile()
1972 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_store_tx_power_by_rate() local
1987 rtlphy->tx_power_by_rate_offset[band][rfpath][txnum][rate_section] = data; in _rtl8821ae_store_tx_power_by_rate()
1991 rtlphy->tx_power_by_rate_offset[band][rfpath][txnum][rate_section]); in _rtl8821ae_store_tx_power_by_rate()
2130 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_get_hw_reg_originalvalue() local
2132 rtlphy->default_initialgain[0] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2134 rtlphy->default_initialgain[1] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2136 rtlphy->default_initialgain[2] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2138 rtlphy->default_initialgain[3] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2143 rtlphy->default_initialgain[0], in rtl8821ae_phy_get_hw_reg_originalvalue()
2144 rtlphy->default_initialgain[1], in rtl8821ae_phy_get_hw_reg_originalvalue()
2145 rtlphy->default_initialgain[2], in rtl8821ae_phy_get_hw_reg_originalvalue()
2146 rtlphy->default_initialgain[3]); in rtl8821ae_phy_get_hw_reg_originalvalue()
2148 rtlphy->framesync = (u8)rtl_get_bbreg(hw, in rtl8821ae_phy_get_hw_reg_originalvalue()
2150 rtlphy->framesync_c34 = rtl_get_bbreg(hw, in rtl8821ae_phy_get_hw_reg_originalvalue()
2155 ROFDM0_RXDETECTOR3, rtlphy->framesync); in rtl8821ae_phy_get_hw_reg_originalvalue()
2161 struct rtl_phy *rtlphy = &rtlpriv->phy; in phy_init_bb_rf_register_definition() local
2163 rtlphy->phyreg_def[RF90_PATH_A].rfintfs = RFPGA0_XAB_RFINTERFACESW; in phy_init_bb_rf_register_definition()
2164 rtlphy->phyreg_def[RF90_PATH_B].rfintfs = RFPGA0_XAB_RFINTERFACESW; in phy_init_bb_rf_register_definition()
2166 rtlphy->phyreg_def[RF90_PATH_A].rfintfo = RFPGA0_XA_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2167 rtlphy->phyreg_def[RF90_PATH_B].rfintfo = RFPGA0_XB_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2169 rtlphy->phyreg_def[RF90_PATH_A].rfintfe = RFPGA0_XA_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2170 rtlphy->phyreg_def[RF90_PATH_B].rfintfe = RFPGA0_XB_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2172 rtlphy->phyreg_def[RF90_PATH_A].rf3wire_offset = RA_LSSIWRITE_8821A; in phy_init_bb_rf_register_definition()
2173 rtlphy->phyreg_def[RF90_PATH_B].rf3wire_offset = RB_LSSIWRITE_8821A; in phy_init_bb_rf_register_definition()
2175 rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RHSSIREAD_8821AE; in phy_init_bb_rf_register_definition()
2176 rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RHSSIREAD_8821AE; in phy_init_bb_rf_register_definition()
2178 rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RA_SIREAD_8821A; in phy_init_bb_rf_register_definition()
2179 rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RB_SIREAD_8821A; in phy_init_bb_rf_register_definition()
2181 rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = RA_PIREAD_8821A; in phy_init_bb_rf_register_definition()
2182 rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = RB_PIREAD_8821A; in phy_init_bb_rf_register_definition()
2188 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_get_txpower_level() local
2192 txpwr_level = rtlphy->cur_cck_txpwridx; in rtl8821ae_phy_get_txpower_level()
2195 txpwr_level = rtlphy->cur_ofdm24g_txpwridx; in rtl8821ae_phy_get_txpower_level()
2202 txpwr_level = rtlphy->cur_ofdm24g_txpwridx; in rtl8821ae_phy_get_txpower_level()
2337 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_get_txpower_limit() local
2472 limits[i] = rtlphy->txpwr_limit_2_4g[i][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2477 rtlphy->txpwr_limit_2_4g[regu][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2484 limits[i] = rtlphy->txpwr_limit_5g[i][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2489 rtlphy->txpwr_limit_5g[regu][chnl] in _rtl8812ae_phy_get_txpower_limit()
2502 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_txpower_by_rate() local
2580 tx_pwr_diff = (u8)(rtlphy->tx_power_by_rate_offset[band][path] in _rtl8821ae_phy_get_txpower_by_rate()
2586 rtlphy->current_chan_bw, path, rate, in _rtl8821ae_phy_get_txpower_by_rate()
2587 rtlphy->current_channel); in _rtl8821ae_phy_get_txpower_by_rate()
3150 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_set_txpower_level_by_path() local
3157 rtlphy->current_chan_bw, in _rtl8821ae_phy_set_txpower_level_by_path()
3168 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_txpower_training_by_path() local
3173 if (path >= rtlphy->num_total_rfpath) in _rtl8821ae_phy_txpower_training_by_path()
3208 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_txpower_level_by_path() local
3248 if (rtlphy->num_total_rfpath >= 2) { in rtl8821ae_phy_set_txpower_level_by_path()
3257 _rtl8821ae_phy_txpower_training_by_path(hw, rtlphy->current_chan_bw, in rtl8821ae_phy_set_txpower_level_by_path()
3265 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_txpower_level() local
3268 for (path = RF90_PATH_A; path < rtlphy->num_total_rfpath; ++path) in rtl8821ae_phy_set_txpower_level()
3355 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_secondary_chnl() local
3359 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) { in _rtl8821ae_phy_get_secondary_chnl()
3381 } else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { in _rtl8821ae_phy_get_secondary_chnl()
3395 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_bw_mode_callback() local
3401 (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ? in rtl8821ae_phy_set_bw_mode_callback()
3403 (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40 ? in rtl8821ae_phy_set_bw_mode_callback()
3406 _rtl8821ae_phy_set_reg_bw(rtlpriv, rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3410 switch (rtlphy->current_chan_bw) { in rtl8821ae_phy_set_bw_mode_callback()
3415 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3426 if (rtlphy->reg_837 & BIT(2)) in rtl8821ae_phy_set_bw_mode_callback()
3429 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3451 if (rtlphy->reg_837 & BIT(2)) in rtl8821ae_phy_set_bw_mode_callback()
3454 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3464 rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3468 rtl8812ae_fixspur(hw, rtlphy->current_chan_bw, rtlphy->current_channel); in rtl8821ae_phy_set_bw_mode_callback()
3470 rtl8821ae_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3471 rtlphy->set_bwmode_inprogress = false; in rtl8821ae_phy_set_bw_mode_callback()
3480 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_bw_mode() local
3482 u8 tmp_bw = rtlphy->current_chan_bw; in rtl8821ae_phy_set_bw_mode()
3484 if (rtlphy->set_bwmode_inprogress) in rtl8821ae_phy_set_bw_mode()
3486 rtlphy->set_bwmode_inprogress = true; in rtl8821ae_phy_set_bw_mode()
3492 rtlphy->set_bwmode_inprogress = false; in rtl8821ae_phy_set_bw_mode()
3493 rtlphy->current_chan_bw = tmp_bw; in rtl8821ae_phy_set_bw_mode()
3501 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_sw_chnl_callback() local
3502 u8 channel = rtlphy->current_channel; in rtl8821ae_phy_sw_chnl_callback()
3507 "switch to channel%d\n", rtlphy->current_channel); in rtl8821ae_phy_sw_chnl_callback()
3523 for (path = RF90_PATH_A; path < rtlphy->num_total_rfpath; path++) { in rtl8821ae_phy_sw_chnl_callback()
3555 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_sw_chnl() local
3558 u8 channel = rtlphy->current_channel; in rtl8821ae_phy_sw_chnl()
3560 if (rtlphy->sw_chnl_inprogress) in rtl8821ae_phy_sw_chnl()
3562 if (rtlphy->set_bwmode_inprogress) in rtl8821ae_phy_sw_chnl()
3570 while (rtlphy->lck_inprogress && timecount < timeout) { in rtl8821ae_phy_sw_chnl()
3575 if (rtlphy->current_channel > 14 && rtlhal->current_bandtype != BAND_ON_5G) in rtl8821ae_phy_sw_chnl()
3577 else if (rtlphy->current_channel <= 14 && rtlhal->current_bandtype != BAND_ON_2_4G) in rtl8821ae_phy_sw_chnl()
3580 rtlphy->sw_chnl_inprogress = true; in rtl8821ae_phy_sw_chnl()
3586 rtlphy->current_channel, rtlhal->current_bandtype); in rtl8821ae_phy_sw_chnl()
3591 rtl8821ae_phy_set_txpower_level(hw, rtlphy->current_channel); in rtl8821ae_phy_sw_chnl()
3594 rtlphy->sw_chnl_inprogress = false; in rtl8821ae_phy_sw_chnl()
3733 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_iqk_tx() local
3748 rtlphy->current_chan_bw); in _rtl8821ae_iqk_tx()
3749 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) in _rtl8821ae_iqk_tx()
3814 switch (rtlphy->current_chan_bw) { in _rtl8821ae_iqk_tx()
4557 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_iq_calibrate() local
4559 if (!rtlphy->lck_inprogress) { in rtl8821ae_phy_iq_calibrate()
4561 rtlphy->lck_inprogress = true; in rtl8821ae_phy_iq_calibrate()
4567 rtlphy->lck_inprogress = false; in rtl8821ae_phy_iq_calibrate()
4575 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_reset_iqk_result() local
4580 (int)(sizeof(rtlphy->iqk_matrix) / in rtl8821ae_reset_iqk_result()
4585 rtlphy->iqk_matrix[i].value[0][0] = 0x100; in rtl8821ae_reset_iqk_result()
4586 rtlphy->iqk_matrix[i].value[0][2] = 0x100; in rtl8821ae_reset_iqk_result()
4587 rtlphy->iqk_matrix[i].value[0][4] = 0x100; in rtl8821ae_reset_iqk_result()
4588 rtlphy->iqk_matrix[i].value[0][6] = 0x100; in rtl8821ae_reset_iqk_result()
4590 rtlphy->iqk_matrix[i].value[0][1] = 0x0; in rtl8821ae_reset_iqk_result()
4591 rtlphy->iqk_matrix[i].value[0][3] = 0x0; in rtl8821ae_reset_iqk_result()
4592 rtlphy->iqk_matrix[i].value[0][5] = 0x0; in rtl8821ae_reset_iqk_result()
4593 rtlphy->iqk_matrix[i].value[0][7] = 0x0; in rtl8821ae_reset_iqk_result()
4595 rtlphy->iqk_matrix[i].iqk_done = false; in rtl8821ae_reset_iqk_result()
4626 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_io_cmd() local
4631 iotype, rtlphy->set_io_inprogress); in rtl8821ae_phy_set_io_cmd()
4651 if (postprocessing && !rtlphy->set_io_inprogress) { in rtl8821ae_phy_set_io_cmd()
4652 rtlphy->set_io_inprogress = true; in rtl8821ae_phy_set_io_cmd()
4653 rtlphy->current_io_type = iotype; in rtl8821ae_phy_set_io_cmd()
4666 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_io() local
4670 rtlphy->current_io_type, rtlphy->set_io_inprogress); in rtl8821ae_phy_set_io()
4671 switch (rtlphy->current_io_type) { in rtl8821ae_phy_set_io()
4675 rtl8821ae_dm_write_dig(hw, rtlphy->initgain_backup.xaagccore1); in rtl8821ae_phy_set_io()
4677 rtlphy->initgain_backup.cca); in rtl8821ae_phy_set_io()
4682 rtlphy->initgain_backup.xaagccore1 = dm_digtable->cur_igvalue; in rtl8821ae_phy_set_io()
4684 rtlphy->initgain_backup.cca = dm_digtable->cur_cck_cca_thres; in rtl8821ae_phy_set_io()
4691 rtlphy->current_io_type); in rtl8821ae_phy_set_io()
4694 rtlphy->set_io_inprogress = false; in rtl8821ae_phy_set_io()
4696 "(%#x)\n", rtlphy->current_io_type); in rtl8821ae_phy_set_io()