Lines Matching refs:rtlphy
61 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_query_rf_reg() local
70 if (rtlphy->rf_mode != RF_OP_BY_FW) { in rtl8723e_phy_query_rf_reg()
92 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_set_rf_reg() local
102 if (rtlphy->rf_mode != RF_OP_BY_FW) { in rtl8723e_phy_set_rf_reg()
208 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_phy_bb8192c_config_parafile() local
220 if (rtlphy->rf_type == RF_1T2R) { in _rtl8723e_phy_bb8192c_config_parafile()
225 rtlphy->pwrgroup_cnt = 0; in _rtl8723e_phy_bb8192c_config_parafile()
239 rtlphy->cck_high_power = (bool) (rtl_get_bbreg(hw, in _rtl8723e_phy_bb8192c_config_parafile()
318 struct rtl_phy *rtlphy = &rtlpriv->phy; in store_pwrindex_diffrate_offset() local
321 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][0] = in store_pwrindex_diffrate_offset()
325 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
326 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
330 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1] = in store_pwrindex_diffrate_offset()
334 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
335 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
339 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6] = in store_pwrindex_diffrate_offset()
343 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
344 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
348 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][7] = in store_pwrindex_diffrate_offset()
352 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
353 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
357 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2] = in store_pwrindex_diffrate_offset()
361 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
362 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
366 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3] = in store_pwrindex_diffrate_offset()
370 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
371 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
375 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4] = in store_pwrindex_diffrate_offset()
379 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
380 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
384 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5] = in store_pwrindex_diffrate_offset()
388 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
389 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
393 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][8] = in store_pwrindex_diffrate_offset()
397 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
398 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
402 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][9] = in store_pwrindex_diffrate_offset()
406 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
407 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
411 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][14] = in store_pwrindex_diffrate_offset()
415 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
416 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
420 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][15] = in store_pwrindex_diffrate_offset()
424 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
425 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
429 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][10] = in store_pwrindex_diffrate_offset()
433 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
434 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
438 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][11] = in store_pwrindex_diffrate_offset()
442 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
443 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
447 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][12] = in store_pwrindex_diffrate_offset()
451 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
452 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
456 rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][13] = in store_pwrindex_diffrate_offset()
460 rtlphy->pwrgroup_cnt, in store_pwrindex_diffrate_offset()
461 rtlphy->mcs_txpwrlevel_origoffset[rtlphy-> in store_pwrindex_diffrate_offset()
464 rtlphy->pwrgroup_cnt++; in store_pwrindex_diffrate_offset()
556 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_get_hw_reg_originalvalue() local
558 rtlphy->default_initialgain[0] = in rtl8723e_phy_get_hw_reg_originalvalue()
560 rtlphy->default_initialgain[1] = in rtl8723e_phy_get_hw_reg_originalvalue()
562 rtlphy->default_initialgain[2] = in rtl8723e_phy_get_hw_reg_originalvalue()
564 rtlphy->default_initialgain[3] = in rtl8723e_phy_get_hw_reg_originalvalue()
569 rtlphy->default_initialgain[0], in rtl8723e_phy_get_hw_reg_originalvalue()
570 rtlphy->default_initialgain[1], in rtl8723e_phy_get_hw_reg_originalvalue()
571 rtlphy->default_initialgain[2], in rtl8723e_phy_get_hw_reg_originalvalue()
572 rtlphy->default_initialgain[3]); in rtl8723e_phy_get_hw_reg_originalvalue()
574 rtlphy->framesync = (u8) rtl_get_bbreg(hw, in rtl8723e_phy_get_hw_reg_originalvalue()
576 rtlphy->framesync_c34 = rtl_get_bbreg(hw, in rtl8723e_phy_get_hw_reg_originalvalue()
581 ROFDM0_RXDETECTOR3, rtlphy->framesync); in rtl8723e_phy_get_hw_reg_originalvalue()
587 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_get_txpower_level() local
592 txpwr_level = rtlphy->cur_cck_txpwridx; in rtl8723e_phy_get_txpower_level()
595 txpwr_level = rtlphy->cur_ofdm24g_txpwridx + in rtl8723e_phy_get_txpower_level()
603 txpwr_level = rtlphy->cur_ofdm24g_txpwridx; in rtl8723e_phy_get_txpower_level()
617 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_get_txpower_index() local
625 if (get_rf_type(rtlphy) == RF_1T2R || get_rf_type(rtlphy) == RF_1T1R) { in _rtl8723e_get_txpower_index()
630 } else if (get_rf_type(rtlphy) == RF_2T2R) { in _rtl8723e_get_txpower_index()
643 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_ccxpower_index_check() local
645 rtlphy->cur_cck_txpwridx = cckpowerlevel[0]; in _rtl8723e_ccxpower_index_check()
646 rtlphy->cur_ofdm24g_txpwridx = ofdmpowerlevel[0]; in _rtl8723e_ccxpower_index_check()
669 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_update_txpower_dbm() local
695 rtl8723e_phy_set_txpower_level(hw, rtlphy->current_channel); in rtl8723e_phy_update_txpower_dbm()
763 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_set_bw_mode_callback() local
770 rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ? in rtl8723e_phy_set_bw_mode_callback()
774 rtlphy->set_bwmode_inprogress = false; in rtl8723e_phy_set_bw_mode_callback()
781 switch (rtlphy->current_chan_bw) { in rtl8723e_phy_set_bw_mode_callback()
795 "unknown bandwidth: %#X\n", rtlphy->current_chan_bw); in rtl8723e_phy_set_bw_mode_callback()
799 switch (rtlphy->current_chan_bw) { in rtl8723e_phy_set_bw_mode_callback()
820 "unknown bandwidth: %#X\n", rtlphy->current_chan_bw); in rtl8723e_phy_set_bw_mode_callback()
823 rtl8723e_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); in rtl8723e_phy_set_bw_mode_callback()
824 rtlphy->set_bwmode_inprogress = false; in rtl8723e_phy_set_bw_mode_callback()
832 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_set_bw_mode() local
834 u8 tmp_bw = rtlphy->current_chan_bw; in rtl8723e_phy_set_bw_mode()
836 if (rtlphy->set_bwmode_inprogress) in rtl8723e_phy_set_bw_mode()
838 rtlphy->set_bwmode_inprogress = true; in rtl8723e_phy_set_bw_mode()
844 rtlphy->set_bwmode_inprogress = false; in rtl8723e_phy_set_bw_mode()
845 rtlphy->current_chan_bw = tmp_bw; in rtl8723e_phy_set_bw_mode()
853 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_sw_chnl_callback() local
857 "switch to channel%d\n", rtlphy->current_channel); in rtl8723e_phy_sw_chnl_callback()
861 if (!rtlphy->sw_chnl_inprogress) in rtl8723e_phy_sw_chnl_callback()
864 (hw, rtlphy->current_channel, &rtlphy->sw_chnl_stage, in rtl8723e_phy_sw_chnl_callback()
865 &rtlphy->sw_chnl_step, &delay)) { in rtl8723e_phy_sw_chnl_callback()
871 rtlphy->sw_chnl_inprogress = false; in rtl8723e_phy_sw_chnl_callback()
881 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_sw_chnl() local
884 if (rtlphy->sw_chnl_inprogress) in rtl8723e_phy_sw_chnl()
886 if (rtlphy->set_bwmode_inprogress) in rtl8723e_phy_sw_chnl()
888 RT_ASSERT((rtlphy->current_channel <= 14), in rtl8723e_phy_sw_chnl()
890 rtlphy->sw_chnl_inprogress = true; in rtl8723e_phy_sw_chnl()
891 rtlphy->sw_chnl_stage = 0; in rtl8723e_phy_sw_chnl()
892 rtlphy->sw_chnl_step = 0; in rtl8723e_phy_sw_chnl()
897 rtlphy->sw_chnl_inprogress = false; in rtl8723e_phy_sw_chnl()
901 rtlphy->sw_chnl_inprogress = false; in rtl8723e_phy_sw_chnl()
909 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_phy_sw_rf_seting() local
913 if (channel == 6 && rtlphy->current_chan_bw == in _rtl8723e_phy_sw_rf_seting()
932 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_phy_sw_chnl_step_by_step() local
941 u8 num_total_rfpath = rtlphy->num_total_rfpath; in _rtl8723e_phy_sw_chnl_step_by_step()
1013 rtlphy->rfreg_chnlval[rfpath] = in _rtl8723e_phy_sw_chnl_step_by_step()
1014 ((rtlphy->rfreg_chnlval[rfpath] & in _rtl8723e_phy_sw_chnl_step_by_step()
1020 rtlphy->rfreg_chnlval[rfpath]); in _rtl8723e_phy_sw_chnl_step_by_step()
1164 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl8723e_phy_iq_calibrate() local
1186 rtlphy->adda_backup, 16); in _rtl8723e_phy_iq_calibrate()
1188 rtlphy->iqk_mac_backup); in _rtl8723e_phy_iq_calibrate()
1192 rtlphy->rfpi_enable = (u8) rtl_get_bbreg(hw, in _rtl8723e_phy_iq_calibrate()
1197 if (!rtlphy->rfpi_enable) in _rtl8723e_phy_iq_calibrate()
1200 rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD); in _rtl8723e_phy_iq_calibrate()
1201 rtlphy->reg_c08 = rtl_get_bbreg(hw, 0xc08, MASKDWORD); in _rtl8723e_phy_iq_calibrate()
1202 rtlphy->reg_874 = rtl_get_bbreg(hw, 0x874, MASKDWORD); in _rtl8723e_phy_iq_calibrate()
1212 rtlphy->iqk_mac_backup); in _rtl8723e_phy_iq_calibrate()
1271 rtl_set_bbreg(hw, 0xc04, MASKDWORD, rtlphy->reg_c04); in _rtl8723e_phy_iq_calibrate()
1272 rtl_set_bbreg(hw, 0x874, MASKDWORD, rtlphy->reg_874); in _rtl8723e_phy_iq_calibrate()
1273 rtl_set_bbreg(hw, 0xc08, MASKDWORD, rtlphy->reg_c08); in _rtl8723e_phy_iq_calibrate()
1279 if (!rtlphy->rfpi_enable) in _rtl8723e_phy_iq_calibrate()
1282 rtlphy->adda_backup, 16); in _rtl8723e_phy_iq_calibrate()
1284 rtlphy->iqk_mac_backup); in _rtl8723e_phy_iq_calibrate()
1365 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_iq_calibrate() local
1389 rtlphy->iqk_bb_backup, 10); in rtl8723e_phy_iq_calibrate()
1447 rtlphy->reg_e94 = reg_e94 = result[final_candidate][0]; in rtl8723e_phy_iq_calibrate()
1448 rtlphy->reg_e9c = reg_e9c = result[final_candidate][1]; in rtl8723e_phy_iq_calibrate()
1451 rtlphy->reg_eb4 = reg_eb4 = result[final_candidate][4]; in rtl8723e_phy_iq_calibrate()
1452 rtlphy->reg_ebc = reg_ebc = result[final_candidate][5]; in rtl8723e_phy_iq_calibrate()
1458 rtlphy->reg_e94 = rtlphy->reg_eb4 = 0x100; in rtl8723e_phy_iq_calibrate()
1459 rtlphy->reg_e9c = rtlphy->reg_ebc = 0x0; in rtl8723e_phy_iq_calibrate()
1466 rtlphy->iqk_bb_backup, 10); in rtl8723e_phy_iq_calibrate()
1482 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_set_io_cmd() local
1487 iotype, rtlphy->set_io_inprogress); in rtl8723e_phy_set_io_cmd()
1506 if (postprocessing && !rtlphy->set_io_inprogress) { in rtl8723e_phy_set_io_cmd()
1507 rtlphy->set_io_inprogress = true; in rtl8723e_phy_set_io_cmd()
1508 rtlphy->current_io_type = iotype; in rtl8723e_phy_set_io_cmd()
1520 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl8723e_phy_set_io() local
1525 rtlphy->current_io_type, rtlphy->set_io_inprogress); in rtl8723e_phy_set_io()
1526 switch (rtlphy->current_io_type) { in rtl8723e_phy_set_io()
1528 dm_digtable->cur_igvalue = rtlphy->initgain_backup.xaagccore1; in rtl8723e_phy_set_io()
1530 rtl8723e_phy_set_txpower_level(hw, rtlphy->current_channel); in rtl8723e_phy_set_io()
1533 rtlphy->initgain_backup.xaagccore1 = dm_digtable->cur_igvalue; in rtl8723e_phy_set_io()
1542 rtlphy->set_io_inprogress = false; in rtl8723e_phy_set_io()
1544 "(%#x)\n", rtlphy->current_io_type); in rtl8723e_phy_set_io()