Lines Matching refs:rtlphy
65 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_rf_serial_read() local
66 struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; in _rtl92s_phy_rf_serial_read()
126 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_rf_serial_write() local
127 struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; in _rtl92s_phy_rf_serial_write()
172 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_set_rf_reg() local
175 if (!((rtlphy->rf_pathmap >> rfpath) & 0x1)) in rtl92s_phy_set_rf_reg()
226 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_set_bw_mode() local
231 rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20 ? in rtl92s_phy_set_bw_mode()
234 if (rtlphy->set_bwmode_inprogress) in rtl92s_phy_set_bw_mode()
239 rtlphy->set_bwmode_inprogress = true; in rtl92s_phy_set_bw_mode()
245 switch (rtlphy->current_chan_bw) { in rtl92s_phy_set_bw_mode()
256 rtlphy->current_chan_bw); in rtl92s_phy_set_bw_mode()
260 switch (rtlphy->current_chan_bw) { in rtl92s_phy_set_bw_mode()
281 rtlphy->current_chan_bw); in rtl92s_phy_set_bw_mode()
285 rtl92s_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); in rtl92s_phy_set_bw_mode()
286 rtlphy->set_bwmode_inprogress = false; in rtl92s_phy_set_bw_mode()
317 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_sw_chnl_step_by_step() local
326 u8 num_total_rfpath = rtlphy->num_total_rfpath; in _rtl92s_phy_sw_chnl_step_by_step()
394 rtlphy->rfreg_chnlval[rfpath] = in _rtl92s_phy_sw_chnl_step_by_step()
395 ((rtlphy->rfreg_chnlval[rfpath] & in _rtl92s_phy_sw_chnl_step_by_step()
400 rtlphy->rfreg_chnlval[rfpath]); in _rtl92s_phy_sw_chnl_step_by_step()
421 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_sw_chnl() local
426 rtlphy->current_channel); in rtl92s_phy_sw_chnl()
428 if (rtlphy->sw_chnl_inprogress) in rtl92s_phy_sw_chnl()
431 if (rtlphy->set_bwmode_inprogress) in rtl92s_phy_sw_chnl()
437 rtlphy->sw_chnl_inprogress = true; in rtl92s_phy_sw_chnl()
438 rtlphy->sw_chnl_stage = 0; in rtl92s_phy_sw_chnl()
439 rtlphy->sw_chnl_step = 0; in rtl92s_phy_sw_chnl()
442 if (!rtlphy->sw_chnl_inprogress) in rtl92s_phy_sw_chnl()
446 rtlphy->current_channel, in rtl92s_phy_sw_chnl()
447 &rtlphy->sw_chnl_stage, in rtl92s_phy_sw_chnl()
448 &rtlphy->sw_chnl_step, &delay); in rtl92s_phy_sw_chnl()
455 rtlphy->sw_chnl_inprogress = false; in rtl92s_phy_sw_chnl()
460 rtlphy->sw_chnl_inprogress = false; in rtl92s_phy_sw_chnl()
641 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_store_pwrindex_diffrate_offset() local
661 rtlphy->mcs_offset[rtlphy->pwrgroup_cnt][index] = data; in _rtl92s_store_pwrindex_diffrate_offset()
663 rtlphy->pwrgroup_cnt++; in _rtl92s_store_pwrindex_diffrate_offset()
669 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_init_register_definition() local
672 rtlphy->phyreg_def[RF90_PATH_A].rfintfs = RFPGA0_XAB_RFINTERFACESW; in _rtl92s_phy_init_register_definition()
673 rtlphy->phyreg_def[RF90_PATH_B].rfintfs = RFPGA0_XAB_RFINTERFACESW; in _rtl92s_phy_init_register_definition()
674 rtlphy->phyreg_def[RF90_PATH_C].rfintfs = RFPGA0_XCD_RFINTERFACESW; in _rtl92s_phy_init_register_definition()
675 rtlphy->phyreg_def[RF90_PATH_D].rfintfs = RFPGA0_XCD_RFINTERFACESW; in _rtl92s_phy_init_register_definition()
678 rtlphy->phyreg_def[RF90_PATH_A].rfintfi = RFPGA0_XAB_RFINTERFACERB; in _rtl92s_phy_init_register_definition()
679 rtlphy->phyreg_def[RF90_PATH_B].rfintfi = RFPGA0_XAB_RFINTERFACERB; in _rtl92s_phy_init_register_definition()
680 rtlphy->phyreg_def[RF90_PATH_C].rfintfi = RFPGA0_XCD_RFINTERFACERB; in _rtl92s_phy_init_register_definition()
681 rtlphy->phyreg_def[RF90_PATH_D].rfintfi = RFPGA0_XCD_RFINTERFACERB; in _rtl92s_phy_init_register_definition()
684 rtlphy->phyreg_def[RF90_PATH_A].rfintfo = RFPGA0_XA_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
685 rtlphy->phyreg_def[RF90_PATH_B].rfintfo = RFPGA0_XB_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
686 rtlphy->phyreg_def[RF90_PATH_C].rfintfo = RFPGA0_XC_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
687 rtlphy->phyreg_def[RF90_PATH_D].rfintfo = RFPGA0_XD_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
690 rtlphy->phyreg_def[RF90_PATH_A].rfintfe = RFPGA0_XA_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
691 rtlphy->phyreg_def[RF90_PATH_B].rfintfe = RFPGA0_XB_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
692 rtlphy->phyreg_def[RF90_PATH_C].rfintfe = RFPGA0_XC_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
693 rtlphy->phyreg_def[RF90_PATH_D].rfintfe = RFPGA0_XD_RFINTERFACEOE; in _rtl92s_phy_init_register_definition()
696 rtlphy->phyreg_def[RF90_PATH_A].rf3wire_offset = in _rtl92s_phy_init_register_definition()
698 rtlphy->phyreg_def[RF90_PATH_B].rf3wire_offset = in _rtl92s_phy_init_register_definition()
700 rtlphy->phyreg_def[RF90_PATH_C].rf3wire_offset = in _rtl92s_phy_init_register_definition()
702 rtlphy->phyreg_def[RF90_PATH_D].rf3wire_offset = in _rtl92s_phy_init_register_definition()
706 rtlphy->phyreg_def[RF90_PATH_A].rflssi_select = RFPGA0_XAB_RFPARAMETER; in _rtl92s_phy_init_register_definition()
707 rtlphy->phyreg_def[RF90_PATH_B].rflssi_select = RFPGA0_XAB_RFPARAMETER; in _rtl92s_phy_init_register_definition()
708 rtlphy->phyreg_def[RF90_PATH_C].rflssi_select = RFPGA0_XCD_RFPARAMETER; in _rtl92s_phy_init_register_definition()
709 rtlphy->phyreg_def[RF90_PATH_D].rflssi_select = RFPGA0_XCD_RFPARAMETER; in _rtl92s_phy_init_register_definition()
712 rtlphy->phyreg_def[RF90_PATH_A].rftxgain_stage = RFPGA0_TXGAINSTAGE; in _rtl92s_phy_init_register_definition()
713 rtlphy->phyreg_def[RF90_PATH_B].rftxgain_stage = RFPGA0_TXGAINSTAGE; in _rtl92s_phy_init_register_definition()
714 rtlphy->phyreg_def[RF90_PATH_C].rftxgain_stage = RFPGA0_TXGAINSTAGE; in _rtl92s_phy_init_register_definition()
715 rtlphy->phyreg_def[RF90_PATH_D].rftxgain_stage = RFPGA0_TXGAINSTAGE; in _rtl92s_phy_init_register_definition()
718 rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para1 = RFPGA0_XA_HSSIPARAMETER1; in _rtl92s_phy_init_register_definition()
719 rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para1 = RFPGA0_XB_HSSIPARAMETER1; in _rtl92s_phy_init_register_definition()
720 rtlphy->phyreg_def[RF90_PATH_C].rfhssi_para1 = RFPGA0_XC_HSSIPARAMETER1; in _rtl92s_phy_init_register_definition()
721 rtlphy->phyreg_def[RF90_PATH_D].rfhssi_para1 = RFPGA0_XD_HSSIPARAMETER1; in _rtl92s_phy_init_register_definition()
724 rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RFPGA0_XA_HSSIPARAMETER2; in _rtl92s_phy_init_register_definition()
725 rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RFPGA0_XB_HSSIPARAMETER2; in _rtl92s_phy_init_register_definition()
726 rtlphy->phyreg_def[RF90_PATH_C].rfhssi_para2 = RFPGA0_XC_HSSIPARAMETER2; in _rtl92s_phy_init_register_definition()
727 rtlphy->phyreg_def[RF90_PATH_D].rfhssi_para2 = RFPGA0_XD_HSSIPARAMETER2; in _rtl92s_phy_init_register_definition()
730 rtlphy->phyreg_def[RF90_PATH_A].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL; in _rtl92s_phy_init_register_definition()
731 rtlphy->phyreg_def[RF90_PATH_B].rfsw_ctrl = RFPGA0_XAB_SWITCHCONTROL; in _rtl92s_phy_init_register_definition()
732 rtlphy->phyreg_def[RF90_PATH_C].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL; in _rtl92s_phy_init_register_definition()
733 rtlphy->phyreg_def[RF90_PATH_D].rfsw_ctrl = RFPGA0_XCD_SWITCHCONTROL; in _rtl92s_phy_init_register_definition()
736 rtlphy->phyreg_def[RF90_PATH_A].rfagc_control1 = ROFDM0_XAAGCCORE1; in _rtl92s_phy_init_register_definition()
737 rtlphy->phyreg_def[RF90_PATH_B].rfagc_control1 = ROFDM0_XBAGCCORE1; in _rtl92s_phy_init_register_definition()
738 rtlphy->phyreg_def[RF90_PATH_C].rfagc_control1 = ROFDM0_XCAGCCORE1; in _rtl92s_phy_init_register_definition()
739 rtlphy->phyreg_def[RF90_PATH_D].rfagc_control1 = ROFDM0_XDAGCCORE1; in _rtl92s_phy_init_register_definition()
742 rtlphy->phyreg_def[RF90_PATH_A].rfagc_control2 = ROFDM0_XAAGCCORE2; in _rtl92s_phy_init_register_definition()
743 rtlphy->phyreg_def[RF90_PATH_B].rfagc_control2 = ROFDM0_XBAGCCORE2; in _rtl92s_phy_init_register_definition()
744 rtlphy->phyreg_def[RF90_PATH_C].rfagc_control2 = ROFDM0_XCAGCCORE2; in _rtl92s_phy_init_register_definition()
745 rtlphy->phyreg_def[RF90_PATH_D].rfagc_control2 = ROFDM0_XDAGCCORE2; in _rtl92s_phy_init_register_definition()
748 rtlphy->phyreg_def[RF90_PATH_A].rfrxiq_imbal = ROFDM0_XARXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
749 rtlphy->phyreg_def[RF90_PATH_B].rfrxiq_imbal = ROFDM0_XBRXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
750 rtlphy->phyreg_def[RF90_PATH_C].rfrxiq_imbal = ROFDM0_XCRXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
751 rtlphy->phyreg_def[RF90_PATH_D].rfrxiq_imbal = ROFDM0_XDRXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
754 rtlphy->phyreg_def[RF90_PATH_A].rfrx_afe = ROFDM0_XARXAFE; in _rtl92s_phy_init_register_definition()
755 rtlphy->phyreg_def[RF90_PATH_B].rfrx_afe = ROFDM0_XBRXAFE; in _rtl92s_phy_init_register_definition()
756 rtlphy->phyreg_def[RF90_PATH_C].rfrx_afe = ROFDM0_XCRXAFE; in _rtl92s_phy_init_register_definition()
757 rtlphy->phyreg_def[RF90_PATH_D].rfrx_afe = ROFDM0_XDRXAFE; in _rtl92s_phy_init_register_definition()
760 rtlphy->phyreg_def[RF90_PATH_A].rftxiq_imbal = ROFDM0_XATXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
761 rtlphy->phyreg_def[RF90_PATH_B].rftxiq_imbal = ROFDM0_XBTXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
762 rtlphy->phyreg_def[RF90_PATH_C].rftxiq_imbal = ROFDM0_XCTXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
763 rtlphy->phyreg_def[RF90_PATH_D].rftxiq_imbal = ROFDM0_XDTXIQIMBALANCE; in _rtl92s_phy_init_register_definition()
766 rtlphy->phyreg_def[RF90_PATH_A].rftx_afe = ROFDM0_XATXAFE; in _rtl92s_phy_init_register_definition()
767 rtlphy->phyreg_def[RF90_PATH_B].rftx_afe = ROFDM0_XBTXAFE; in _rtl92s_phy_init_register_definition()
768 rtlphy->phyreg_def[RF90_PATH_C].rftx_afe = ROFDM0_XCTXAFE; in _rtl92s_phy_init_register_definition()
769 rtlphy->phyreg_def[RF90_PATH_D].rftx_afe = ROFDM0_XDTXAFE; in _rtl92s_phy_init_register_definition()
772 rtlphy->phyreg_def[RF90_PATH_A].rf_rb = RFPGA0_XA_LSSIREADBACK; in _rtl92s_phy_init_register_definition()
773 rtlphy->phyreg_def[RF90_PATH_B].rf_rb = RFPGA0_XB_LSSIREADBACK; in _rtl92s_phy_init_register_definition()
774 rtlphy->phyreg_def[RF90_PATH_C].rf_rb = RFPGA0_XC_LSSIREADBACK; in _rtl92s_phy_init_register_definition()
775 rtlphy->phyreg_def[RF90_PATH_D].rf_rb = RFPGA0_XD_LSSIREADBACK; in _rtl92s_phy_init_register_definition()
778 rtlphy->phyreg_def[RF90_PATH_A].rf_rbpi = TRANSCEIVERA_HSPI_READBACK; in _rtl92s_phy_init_register_definition()
779 rtlphy->phyreg_def[RF90_PATH_B].rf_rbpi = TRANSCEIVERB_HSPI_READBACK; in _rtl92s_phy_init_register_definition()
823 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_set_bb_to_diff_rf() local
828 if (rtlphy->rf_type == RF_1T1R) { in _rtl92s_phy_set_bb_to_diff_rf()
831 } else if (rtlphy->rf_type == RF_1T2R) { in _rtl92s_phy_set_bb_to_diff_rf()
881 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_bb_config_parafile() local
887 if (rtlphy->rf_type == RF_1T2R || rtlphy->rf_type == RF_2T2R || in _rtl92s_phy_bb_config_parafile()
888 rtlphy->rf_type == RF_1T1R || rtlphy->rf_type == RF_2T2R_GREEN) { in _rtl92s_phy_bb_config_parafile()
891 if (rtlphy->rf_type != RF_2T2R && in _rtl92s_phy_bb_config_parafile()
892 rtlphy->rf_type != RF_2T2R_GREEN) in _rtl92s_phy_bb_config_parafile()
909 rtlphy->pwrgroup_cnt = 0; in _rtl92s_phy_bb_config_parafile()
929 rtlphy->cck_high_power = (bool)(rtl92s_phy_query_bb_reg(hw, in _rtl92s_phy_bb_config_parafile()
939 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_config_rf() local
950 if (rtlphy->rf_type == RF_2T2R_GREEN) { in rtl92s_phy_config_rf()
1012 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_bb_config() local
1030 rtlphy->rf_pathmap = pathmap; in rtl92s_phy_bb_config()
1036 if ((rtlphy->rf_type == RF_1T1R && rf_num != 1) || in rtl92s_phy_bb_config()
1037 (rtlphy->rf_type == RF_1T2R && rf_num != 2) || in rtl92s_phy_bb_config()
1038 (rtlphy->rf_type == RF_2T2R && rf_num != 2) || in rtl92s_phy_bb_config()
1039 (rtlphy->rf_type == RF_2T2R_GREEN && rf_num != 2)) { in rtl92s_phy_bb_config()
1041 rtlphy->rf_type, rf_num); in rtl92s_phy_bb_config()
1052 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_rf_config() local
1055 if (rtlphy->rf_type == RF_1T1R) in rtl92s_phy_rf_config()
1056 rtlphy->num_total_rfpath = 1; in rtl92s_phy_rf_config()
1058 rtlphy->num_total_rfpath = 2; in rtl92s_phy_rf_config()
1067 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92s_phy_get_hw_reg_originalvalue() local
1070 rtlphy->default_initialgain[0] = rtl_get_bbreg(hw, in rtl92s_phy_get_hw_reg_originalvalue()
1072 rtlphy->default_initialgain[1] = rtl_get_bbreg(hw, in rtl92s_phy_get_hw_reg_originalvalue()
1074 rtlphy->default_initialgain[2] = rtl_get_bbreg(hw, in rtl92s_phy_get_hw_reg_originalvalue()
1076 rtlphy->default_initialgain[3] = rtl_get_bbreg(hw, in rtl92s_phy_get_hw_reg_originalvalue()
1080 rtlphy->default_initialgain[0], in rtl92s_phy_get_hw_reg_originalvalue()
1081 rtlphy->default_initialgain[1], in rtl92s_phy_get_hw_reg_originalvalue()
1082 rtlphy->default_initialgain[2], in rtl92s_phy_get_hw_reg_originalvalue()
1083 rtlphy->default_initialgain[3]); in rtl92s_phy_get_hw_reg_originalvalue()
1086 rtlphy->framesync = rtl_get_bbreg(hw, ROFDM0_RXDETECTOR3, MASKBYTE0); in rtl92s_phy_get_hw_reg_originalvalue()
1087 rtlphy->framesync_c34 = rtl_get_bbreg(hw, ROFDM0_RXDETECTOR2, in rtl92s_phy_get_hw_reg_originalvalue()
1091 ROFDM0_RXDETECTOR3, rtlphy->framesync); in rtl92s_phy_get_hw_reg_originalvalue()
1099 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_get_txpower_index() local
1110 if (rtlphy->rf_type == RF_1T2R || rtlphy->rf_type == RF_1T1R) { in _rtl92s_phy_get_txpower_index()
1114 } else if (rtlphy->rf_type == RF_2T2R) { in _rtl92s_phy_get_txpower_index()
1128 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_ccxpower_indexcheck() local
1130 rtlphy->cur_cck_txpwridx = cckpowerlevel[0]; in _rtl92s_phy_ccxpower_indexcheck()
1131 rtlphy->cur_ofdm24g_txpwridx = ofdmpowerlevel[0]; in _rtl92s_phy_ccxpower_indexcheck()
1190 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92s_phy_set_fwcmd_io() local
1268 rtl92s_phy_set_txpower(hw, rtlphy->current_channel); in _rtl92s_phy_set_fwcmd_io()