Lines Matching refs:rtlphy

281 	struct rtl_phy *rtlphy = &rtlpriv->phy;  in _rtl8821ae_phy_rf_serial_write()  local
282 struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; in _rtl8821ae_phy_rf_serial_write()
325 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_bb_config() local
352 rtlphy->reg_837 = rtl_read_byte(rtlpriv, 0x837); in rtl8821ae_phy_bb_config()
751 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_init_tx_power_by_rate() local
760 rtlphy->tx_power_by_rate_offset[band] in _rtl8821ae_phy_init_tx_power_by_rate()
770 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_set_txpower_by_rate_base() local
781 rtlphy->txpwr_by_rate_base_24g[path][txnum][0] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
784 rtlphy->txpwr_by_rate_base_24g[path][txnum][1] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
787 rtlphy->txpwr_by_rate_base_24g[path][txnum][2] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
790 rtlphy->txpwr_by_rate_base_24g[path][txnum][3] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
793 rtlphy->txpwr_by_rate_base_24g[path][txnum][4] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
796 rtlphy->txpwr_by_rate_base_24g[path][txnum][5] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
807 rtlphy->txpwr_by_rate_base_5g[path][txnum][0] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
810 rtlphy->txpwr_by_rate_base_5g[path][txnum][1] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
813 rtlphy->txpwr_by_rate_base_5g[path][txnum][2] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
816 rtlphy->txpwr_by_rate_base_5g[path][txnum][3] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
819 rtlphy->txpwr_by_rate_base_5g[path][txnum][4] = value; in _rtl8821ae_phy_set_txpower_by_rate_base()
838 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_txpower_by_rate_base() local
851 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][0]; in _rtl8821ae_phy_get_txpower_by_rate_base()
854 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][1]; in _rtl8821ae_phy_get_txpower_by_rate_base()
857 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][2]; in _rtl8821ae_phy_get_txpower_by_rate_base()
860 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][3]; in _rtl8821ae_phy_get_txpower_by_rate_base()
863 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][4]; in _rtl8821ae_phy_get_txpower_by_rate_base()
866 value = rtlphy->txpwr_by_rate_base_24g[path][txnum][5]; in _rtl8821ae_phy_get_txpower_by_rate_base()
877 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][0]; in _rtl8821ae_phy_get_txpower_by_rate_base()
880 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][1]; in _rtl8821ae_phy_get_txpower_by_rate_base()
883 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][2]; in _rtl8821ae_phy_get_txpower_by_rate_base()
886 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][3]; in _rtl8821ae_phy_get_txpower_by_rate_base()
889 value = rtlphy->txpwr_by_rate_base_5g[path][txnum][4]; in _rtl8821ae_phy_get_txpower_by_rate_base()
908 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_store_txpower_by_rate_base() local
913 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()
917 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()
921 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()
925 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()
929 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()
933 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()
937 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()
941 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()
945 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()
949 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()
953 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()
987 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit() local
995 temp_pwrlmt = rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1003 rtlphy->txpwr_limit_5g[regulation][bw][2][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1004 rtlphy->txpwr_limit_5g[regulation][bw][4][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1006 rtlphy->txpwr_limit_5g[regulation][bw][4][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1007 rtlphy->txpwr_limit_5g[regulation][bw][2][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1009 rtlphy->txpwr_limit_5g[regulation][bw][3][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1010 rtlphy->txpwr_limit_5g[regulation][bw][5][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1012 rtlphy->txpwr_limit_5g[regulation][bw][5][channel][RF90_PATH_A] = in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1013 rtlphy->txpwr_limit_5g[regulation][bw][3][channel][RF90_PATH_A]; in _rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit()
1153 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_convert_txpower_limit_to_power_index() local
1190 temp_pwrlmt = rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1198 rtlphy->txpwr_by_rate_base_24g[rf_path][RF_2TX][base_index2_4G]; in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1201 rtlphy->txpwr_by_rate_base_24g[rf_path][RF_1TX][base_index2_4G]; in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1205 rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1213 rtlphy->txpwr_limit_2_4g[regulation][bw] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1251 temp_pwrlmt = rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1260 rtlphy->txpwr_by_rate_base_5g[rf_path] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1264 rtlphy->txpwr_by_rate_base_5g[rf_path] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1270 rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1278 channel, rtlphy->txpwr_limit_5g[regulation] in _rtl8812ae_phy_convert_txpower_limit_to_power_index()
1293 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_init_txpower_limit() local
1304 rtlphy->txpwr_limit_2_4g in _rtl8821ae_phy_init_txpower_limit()
1313 rtlphy->txpwr_limit_5g in _rtl8821ae_phy_init_txpower_limit()
1325 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value() local
1331 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][0], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1336 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][1], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1339 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][2], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1344 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][3], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1347 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][4], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1353 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_2TX][5], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1357 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_2TX][6], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1362 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][7], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1365 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][8], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1368 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1373 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1376 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_2TX][10], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1379 &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfPath][RF_2TX][11], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1384 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][1], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1387 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][2], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1392 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][3], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1395 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][4], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1400 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_2TX][5], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1403 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_2TX][6], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1408 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][7], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1411 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][8], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1414 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1419 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_1TX][9], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1422 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_2TX][10], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1425 &rtlphy->tx_power_by_rate_offset[BAND_ON_5G][rfPath][RF_2TX][11], in _rtl8821ae_phy_convert_txpower_dbm_to_relative_value()
1507 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_set_txpower_limit() local
1568 prev_power_limit = rtlphy->txpwr_limit_2_4g[regulation] in _rtl8812ae_phy_set_txpower_limit()
1573 rtlphy->txpwr_limit_2_4g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1580 rtlphy->txpwr_limit_2_4g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1592 prev_power_limit = rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1597 rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1603 rtlphy->txpwr_limit_5g[regulation][bandwidth] in _rtl8812ae_phy_set_txpower_limit()
1660 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_bb8821a_config_parafile() local
1699 rtlphy->cck_high_power = (bool)(rtl_get_bbreg(hw, in _rtl8821ae_phy_bb8821a_config_parafile()
1889 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_store_tx_power_by_rate() local
1904 rtlphy->tx_power_by_rate_offset[band][rfpath][txnum][rate_section] = data; in _rtl8821ae_store_tx_power_by_rate()
1908 rtlphy->tx_power_by_rate_offset[band][rfpath][txnum][rate_section]); in _rtl8821ae_store_tx_power_by_rate()
2159 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_get_hw_reg_originalvalue() local
2161 rtlphy->default_initialgain[0] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2163 rtlphy->default_initialgain[1] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2165 rtlphy->default_initialgain[2] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2167 rtlphy->default_initialgain[3] = in rtl8821ae_phy_get_hw_reg_originalvalue()
2172 rtlphy->default_initialgain[0], in rtl8821ae_phy_get_hw_reg_originalvalue()
2173 rtlphy->default_initialgain[1], in rtl8821ae_phy_get_hw_reg_originalvalue()
2174 rtlphy->default_initialgain[2], in rtl8821ae_phy_get_hw_reg_originalvalue()
2175 rtlphy->default_initialgain[3]); in rtl8821ae_phy_get_hw_reg_originalvalue()
2177 rtlphy->framesync = (u8)rtl_get_bbreg(hw, in rtl8821ae_phy_get_hw_reg_originalvalue()
2179 rtlphy->framesync_c34 = rtl_get_bbreg(hw, in rtl8821ae_phy_get_hw_reg_originalvalue()
2184 ROFDM0_RXDETECTOR3, rtlphy->framesync); in rtl8821ae_phy_get_hw_reg_originalvalue()
2190 struct rtl_phy *rtlphy = &rtlpriv->phy; in phy_init_bb_rf_register_definition() local
2192 rtlphy->phyreg_def[RF90_PATH_A].rfintfs = RFPGA0_XAB_RFINTERFACESW; in phy_init_bb_rf_register_definition()
2193 rtlphy->phyreg_def[RF90_PATH_B].rfintfs = RFPGA0_XAB_RFINTERFACESW; in phy_init_bb_rf_register_definition()
2195 rtlphy->phyreg_def[RF90_PATH_A].rfintfo = RFPGA0_XA_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2196 rtlphy->phyreg_def[RF90_PATH_B].rfintfo = RFPGA0_XB_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2198 rtlphy->phyreg_def[RF90_PATH_A].rfintfe = RFPGA0_XA_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2199 rtlphy->phyreg_def[RF90_PATH_B].rfintfe = RFPGA0_XB_RFINTERFACEOE; in phy_init_bb_rf_register_definition()
2201 rtlphy->phyreg_def[RF90_PATH_A].rf3wire_offset = RA_LSSIWRITE_8821A; in phy_init_bb_rf_register_definition()
2202 rtlphy->phyreg_def[RF90_PATH_B].rf3wire_offset = RB_LSSIWRITE_8821A; in phy_init_bb_rf_register_definition()
2204 rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RHSSIREAD_8821AE; in phy_init_bb_rf_register_definition()
2205 rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RHSSIREAD_8821AE; in phy_init_bb_rf_register_definition()
2207 rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RA_SIREAD_8821A; in phy_init_bb_rf_register_definition()
2208 rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RB_SIREAD_8821A; in phy_init_bb_rf_register_definition()
2210 rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = RA_PIREAD_8821A; in phy_init_bb_rf_register_definition()
2211 rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = RB_PIREAD_8821A; in phy_init_bb_rf_register_definition()
2217 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_get_txpower_level() local
2221 txpwr_level = rtlphy->cur_cck_txpwridx; in rtl8821ae_phy_get_txpower_level()
2224 txpwr_level = rtlphy->cur_ofdm24g_txpwridx; in rtl8821ae_phy_get_txpower_level()
2231 txpwr_level = rtlphy->cur_ofdm24g_txpwridx; in rtl8821ae_phy_get_txpower_level()
2373 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8812ae_phy_get_txpower_limit() local
2508 limits[i] = rtlphy->txpwr_limit_2_4g[i][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2513 rtlphy->txpwr_limit_2_4g[regu][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2520 limits[i] = rtlphy->txpwr_limit_5g[i][bdwidth] in _rtl8812ae_phy_get_txpower_limit()
2525 rtlphy->txpwr_limit_5g[regu][chnl] in _rtl8812ae_phy_get_txpower_limit()
2538 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_txpower_by_rate() local
2616 tx_pwr_diff = (u8)(rtlphy->tx_power_by_rate_offset[band][path] in _rtl8821ae_phy_get_txpower_by_rate()
2622 rtlphy->current_chan_bw, path, rate, in _rtl8821ae_phy_get_txpower_by_rate()
2623 rtlphy->current_channel); in _rtl8821ae_phy_get_txpower_by_rate()
3189 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_set_txpower_level_by_path() local
3196 rtlphy->current_chan_bw, in _rtl8821ae_phy_set_txpower_level_by_path()
3207 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_txpower_training_by_path() local
3212 if (path >= rtlphy->num_total_rfpath) in _rtl8821ae_phy_txpower_training_by_path()
3247 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_txpower_level_by_path() local
3287 if (rtlphy->num_total_rfpath >= 2) { in rtl8821ae_phy_set_txpower_level_by_path()
3296 _rtl8821ae_phy_txpower_training_by_path(hw, rtlphy->current_chan_bw, in rtl8821ae_phy_set_txpower_level_by_path()
3304 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_txpower_level() local
3307 for (path = RF90_PATH_A; path < rtlphy->num_total_rfpath; ++path) in rtl8821ae_phy_set_txpower_level()
3395 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_phy_get_secondary_chnl() local
3399 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) { in _rtl8821ae_phy_get_secondary_chnl()
3423 } else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { in _rtl8821ae_phy_get_secondary_chnl()
3438 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_bw_mode_callback() local
3444 (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ? in rtl8821ae_phy_set_bw_mode_callback()
3446 (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40 ? in rtl8821ae_phy_set_bw_mode_callback()
3449 _rtl8821ae_phy_set_reg_bw(rtlpriv, rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3453 switch (rtlphy->current_chan_bw) { in rtl8821ae_phy_set_bw_mode_callback()
3458 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3469 if (rtlphy->reg_837 & BIT(2)) in rtl8821ae_phy_set_bw_mode_callback()
3472 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3494 if (rtlphy->reg_837 & BIT(2)) in rtl8821ae_phy_set_bw_mode_callback()
3497 if (rtlphy->rf_type == RF_2T2R) in rtl8821ae_phy_set_bw_mode_callback()
3507 "unknown bandwidth: %#X\n", rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3511 rtl8812ae_fixspur(hw, rtlphy->current_chan_bw, rtlphy->current_channel); in rtl8821ae_phy_set_bw_mode_callback()
3513 rtl8821ae_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); in rtl8821ae_phy_set_bw_mode_callback()
3514 rtlphy->set_bwmode_inprogress = false; in rtl8821ae_phy_set_bw_mode_callback()
3523 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_bw_mode() local
3525 u8 tmp_bw = rtlphy->current_chan_bw; in rtl8821ae_phy_set_bw_mode()
3527 if (rtlphy->set_bwmode_inprogress) in rtl8821ae_phy_set_bw_mode()
3529 rtlphy->set_bwmode_inprogress = true; in rtl8821ae_phy_set_bw_mode()
3535 rtlphy->set_bwmode_inprogress = false; in rtl8821ae_phy_set_bw_mode()
3536 rtlphy->current_chan_bw = tmp_bw; in rtl8821ae_phy_set_bw_mode()
3544 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_sw_chnl_callback() local
3545 u8 channel = rtlphy->current_channel; in rtl8821ae_phy_sw_chnl_callback()
3550 "switch to channel%d\n", rtlphy->current_channel); in rtl8821ae_phy_sw_chnl_callback()
3566 for (path = RF90_PATH_A; path < rtlphy->num_total_rfpath; path++) { in rtl8821ae_phy_sw_chnl_callback()
3600 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_sw_chnl() local
3603 u8 channel = rtlphy->current_channel; in rtl8821ae_phy_sw_chnl()
3605 if (rtlphy->sw_chnl_inprogress) in rtl8821ae_phy_sw_chnl()
3607 if (rtlphy->set_bwmode_inprogress) in rtl8821ae_phy_sw_chnl()
3615 while (rtlphy->lck_inprogress && timecount < timeout) { in rtl8821ae_phy_sw_chnl()
3620 if (rtlphy->current_channel > 14 && rtlhal->current_bandtype != BAND_ON_5G) in rtl8821ae_phy_sw_chnl()
3622 else if (rtlphy->current_channel <= 14 && rtlhal->current_bandtype != BAND_ON_2_4G) in rtl8821ae_phy_sw_chnl()
3625 rtlphy->sw_chnl_inprogress = true; in rtl8821ae_phy_sw_chnl()
3631 rtlphy->current_channel, rtlhal->current_bandtype); in rtl8821ae_phy_sw_chnl()
3636 rtl8821ae_phy_set_txpower_level(hw, rtlphy->current_channel); in rtl8821ae_phy_sw_chnl()
3639 rtlphy->sw_chnl_inprogress = false; in rtl8821ae_phy_sw_chnl()
3778 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8821ae_iqk_tx() local
3792 rtlphy->current_chan_bw); in _rtl8821ae_iqk_tx()
3793 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) in _rtl8821ae_iqk_tx()
3858 switch (rtlphy->current_chan_bw) { in _rtl8821ae_iqk_tx()
4598 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_iq_calibrate() local
4600 if (!rtlphy->lck_inprogress) { in rtl8821ae_phy_iq_calibrate()
4602 rtlphy->lck_inprogress = true; in rtl8821ae_phy_iq_calibrate()
4608 rtlphy->lck_inprogress = false; in rtl8821ae_phy_iq_calibrate()
4616 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_reset_iqk_result() local
4621 (int)(sizeof(rtlphy->iqk_matrix) / in rtl8821ae_reset_iqk_result()
4626 rtlphy->iqk_matrix[i].value[0][0] = 0x100; in rtl8821ae_reset_iqk_result()
4627 rtlphy->iqk_matrix[i].value[0][2] = 0x100; in rtl8821ae_reset_iqk_result()
4628 rtlphy->iqk_matrix[i].value[0][4] = 0x100; in rtl8821ae_reset_iqk_result()
4629 rtlphy->iqk_matrix[i].value[0][6] = 0x100; in rtl8821ae_reset_iqk_result()
4631 rtlphy->iqk_matrix[i].value[0][1] = 0x0; in rtl8821ae_reset_iqk_result()
4632 rtlphy->iqk_matrix[i].value[0][3] = 0x0; in rtl8821ae_reset_iqk_result()
4633 rtlphy->iqk_matrix[i].value[0][5] = 0x0; in rtl8821ae_reset_iqk_result()
4634 rtlphy->iqk_matrix[i].value[0][7] = 0x0; in rtl8821ae_reset_iqk_result()
4636 rtlphy->iqk_matrix[i].iqk_done = false; in rtl8821ae_reset_iqk_result()
4667 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_io_cmd() local
4672 iotype, rtlphy->set_io_inprogress); in rtl8821ae_phy_set_io_cmd()
4692 if (postprocessing && !rtlphy->set_io_inprogress) { in rtl8821ae_phy_set_io_cmd()
4693 rtlphy->set_io_inprogress = true; in rtl8821ae_phy_set_io_cmd()
4694 rtlphy->current_io_type = iotype; in rtl8821ae_phy_set_io_cmd()
4707 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8821ae_phy_set_io() local
4711 rtlphy->current_io_type, rtlphy->set_io_inprogress); in rtl8821ae_phy_set_io()
4712 switch (rtlphy->current_io_type) { in rtl8821ae_phy_set_io()
4716 rtl8821ae_dm_write_dig(hw, rtlphy->initgain_backup.xaagccore1); in rtl8821ae_phy_set_io()
4718 rtlphy->initgain_backup.cca); in rtl8821ae_phy_set_io()
4723 rtlphy->initgain_backup.xaagccore1 = dm_digtable->cur_igvalue; in rtl8821ae_phy_set_io()
4725 rtlphy->initgain_backup.cca = dm_digtable->cur_cck_cca_thres; in rtl8821ae_phy_set_io()
4735 rtlphy->set_io_inprogress = false; in rtl8821ae_phy_set_io()
4737 "(%#x)\n", rtlphy->current_io_type); in rtl8821ae_phy_set_io()