Lines Matching refs:rtlhal
159 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_query_bb_reg() local
165 if (rtlhal->during_mac1init_radioa) in rtl92du_phy_query_bb_reg()
167 else if (rtlhal->during_mac0init_radiob) in rtl92du_phy_query_bb_reg()
183 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_set_bb_reg() local
190 if (rtlhal->during_mac1init_radioa) in rtl92du_phy_set_bb_reg()
192 else if (rtlhal->during_mac0init_radiob) in rtl92du_phy_set_bb_reg()
245 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) { in rtl92du_phy_mac_config()
262 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in _rtl92du_phy_config_bb() local
269 if (rtlhal->interfaceindex == 0) { in _rtl92du_phy_config_bb()
275 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92du_phy_config_bb()
386 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_bb_config() local
407 if (rtlhal->interface == INTF_PCI) in rtl92du_phy_bb_config()
409 else if (rtlhal->interface == INTF_USB) in rtl92du_phy_bb_config()
422 if (!(IS_92D_SINGLEPHY(rtlpriv->rtlhal.version)) && in rtl92du_phy_bb_config()
423 rtlhal->interface == INTF_PCI) { in rtl92du_phy_bb_config()
511 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_set_bw_mode() local
520 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92du_phy_set_bw_mode()
567 if (rtlhal->current_bandtype == BAND_ON_2_4G) in rtl92du_phy_set_bw_mode()
600 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_switch_wirelessband() local
606 rtlhal->bandset = band; in rtl92du_phy_switch_wirelessband()
607 rtlhal->current_bandtype = band; in rtl92du_phy_switch_wirelessband()
608 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92du_phy_switch_wirelessband()
609 rtlhal->bandset = BAND_ON_BOTH; in rtl92du_phy_switch_wirelessband()
615 if (rtlhal->current_bandtype == BAND_ON_2_4G) in rtl92du_phy_switch_wirelessband()
622 if (rtlhal->interfaceindex == 1) in rtl92du_phy_switch_wirelessband()
628 if (rtlhal->current_bandtype == BAND_ON_2_4G) in rtl92du_phy_switch_wirelessband()
637 rtlhal->reloadtxpowerindex = true; in rtl92du_phy_switch_wirelessband()
639 reg_mac = rtlhal->interfaceindex == 0 ? REG_MAC0 : REG_MAC1; in rtl92du_phy_switch_wirelessband()
642 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92du_phy_switch_wirelessband()
666 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) { in _rtl92du_phy_reload_imr_setting()
695 rtlpriv->rtlhal.load_imrandiqk_setting_for2g); in _rtl92du_phy_reload_imr_setting()
698 if (!rtlpriv->rtlhal.load_imrandiqk_setting_for2g) { in _rtl92du_phy_reload_imr_setting()
727 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_switch_rf_setting() local
729 u8 path = rtlhal->current_bandtype == BAND_ON_5G ? RF90_PATH_A in _rtl92du_phy_switch_rf_setting()
741 if (rtlhal->current_bandtype == BAND_ON_5G) { in _rtl92du_phy_switch_rf_setting()
763 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_switch_rf_setting()
764 rtlhal->interfaceindex == 1) { in _rtl92du_phy_switch_rf_setting()
766 rtlhal->during_mac1init_radioa = true; in _rtl92du_phy_switch_rf_setting()
774 if (regb30 && rtlhal->interfaceindex == 0) { in _rtl92du_phy_switch_rf_setting()
776 rtlhal->during_mac0init_radiob = true; in _rtl92du_phy_switch_rf_setting()
783 if (i == 0 && rtlhal->macphymode == DUALMAC_DUALPHY) { in _rtl92du_phy_switch_rf_setting()
810 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_switch_rf_setting()
811 rtlhal->interfaceindex == 1) { in _rtl92du_phy_switch_rf_setting()
818 if (regb30 && rtlhal->interfaceindex == 0) { in _rtl92du_phy_switch_rf_setting()
838 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_switch_rf_setting()
839 rtlhal->interfaceindex == 1) /* MAC 1 5G */ in _rtl92du_phy_switch_rf_setting()
871 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92du_phy_switch_rf_setting()
886 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in _rtl92du_phy_switch_rf_setting()
888 if (rtlhal->interfaceindex == 0) { in _rtl92du_phy_switch_rf_setting()
891 rtlhal->during_mac0init_radiob = true; in _rtl92du_phy_switch_rf_setting()
899 if (regb30 && rtlhal->interfaceindex == 1) { in _rtl92du_phy_switch_rf_setting()
902 rtlhal->during_mac1init_radioa = true; in _rtl92du_phy_switch_rf_setting()
941 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_switch_rf_setting()
942 rtlhal->interfaceindex == 0) { in _rtl92du_phy_switch_rf_setting()
949 if (regb30 && rtlhal->interfaceindex == 1) { in _rtl92du_phy_switch_rf_setting()
963 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92du_phy_patha_iqk() local
969 if (rtlhal->interfaceindex == 0) { in _rtl92du_phy_patha_iqk()
1034 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in _rtl92du_phy_patha_iqk_5g_normal() local
1043 if (rtlhal->interfaceindex == 1) { /* PHY1 */ in _rtl92du_phy_patha_iqk_5g_normal()
1545 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_iq_calibrate_5g_normal() local
1546 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92du_phy_iq_calibrate_5g_normal()
1716 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_simularity_compare() local
1719 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92du_phy_simularity_compare()
1791 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_patha_fill_iqk_matrix_5g_normal() local
1811 if (rtlhal->current_bandtype == BAND_ON_5G) in _rtl92du_phy_patha_fill_iqk_matrix_5g_normal()
1848 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_patha_fill_iqk_matrix() local
1851 bool is2t = IS_92D_SINGLEPHY(rtlhal->version) || in _rtl92du_phy_patha_fill_iqk_matrix()
1852 rtlhal->macphymode == DUALMAC_DUALPHY; in _rtl92du_phy_patha_fill_iqk_matrix()
1854 if (rtlhal->current_bandtype == BAND_ON_5G) { in _rtl92du_phy_patha_fill_iqk_matrix()
1886 if (rtlhal->interfaceindex == 1 && in _rtl92du_phy_patha_fill_iqk_matrix()
1887 rtlhal->current_bandtype == BAND_ON_5G) in _rtl92du_phy_patha_fill_iqk_matrix()
1925 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_pathb_fill_iqk_matrix_5g_normal() local
1945 if (rtlhal->current_bandtype == BAND_ON_5G) in _rtl92du_phy_pathb_fill_iqk_matrix_5g_normal()
1982 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_pathb_fill_iqk_matrix() local
1986 if (rtlhal->current_bandtype == BAND_ON_5G) { in _rtl92du_phy_pathb_fill_iqk_matrix()
2016 if (rtlhal->current_bandtype == BAND_ON_5G) in _rtl92du_phy_pathb_fill_iqk_matrix()
2044 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in rtl92du_phy_iq_calibrate() local
2061 "IQK !!!currentband %d\n", rtlhal->current_bandtype); in rtl92du_phy_iq_calibrate()
2064 if (rtlhal->current_bandtype == BAND_ON_5G) { in rtl92du_phy_iq_calibrate()
2066 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92du_phy_iq_calibrate()
2067 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92du_phy_iq_calibrate()
2154 if (IS_92D_SINGLEPHY(rtlhal->version) && in rtl92du_phy_iq_calibrate()
2178 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in rtl92du_phy_reload_iqk_setting() local
2207 if ((!rtlhal->load_imrandiqk_setting_for2g && indexforchannel == 0) || in rtl92du_phy_reload_iqk_setting()
2218 if (IS_92D_SINGLEPHY(rtlhal->version) && in rtl92du_phy_reload_iqk_setting()
2230 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_reload_lck_setting() local
2231 u8 erfpath = rtlhal->current_bandtype == BAND_ON_5G ? RF90_PATH_A : in _rtl92du_phy_reload_lck_setting()
2232 IS_92D_SINGLEPHY(rtlhal->version) ? RF90_PATH_B : RF90_PATH_A; in _rtl92du_phy_reload_lck_setting()
2238 rtlpriv->rtlhal.current_bandtype); in _rtl92du_phy_reload_lck_setting()
2241 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) {/* Path-A for 5G */ in _rtl92du_phy_reload_lck_setting()
2246 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_reload_lck_setting()
2247 rtlpriv->rtlhal.interfaceindex == 1) { in _rtl92du_phy_reload_lck_setting()
2250 rtlpriv->rtlhal.during_mac1init_radioa = true; in _rtl92du_phy_reload_lck_setting()
2263 } else if (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) { in _rtl92du_phy_reload_lck_setting()
2268 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92du_phy_reload_lck_setting()
2269 rtlpriv->rtlhal.interfaceindex == 0) { in _rtl92du_phy_reload_lck_setting()
2272 rtlpriv->rtlhal.during_mac0init_radiob = true; in _rtl92du_phy_reload_lck_setting()
2295 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in _rtl92du_phy_lc_calibrate_sw() local
2360 if (index == 0 && rtlhal->interfaceindex == 0) { in _rtl92du_phy_lc_calibrate_sw()
2398 if (index == 0 && rtlhal->interfaceindex == 0) in _rtl92du_phy_lc_calibrate_sw()
2428 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in rtl92du_phy_lc_calibrate() local
2440 rtlhal->current_bandtype, timecount); in rtl92du_phy_lc_calibrate()
2456 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_sw_chnl() local
2469 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92du_phy_sw_chnl()
2480 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY && in rtl92du_phy_sw_chnl()
2481 rtlhal->bandset == BAND_ON_BOTH) { in rtl92du_phy_sw_chnl()
2490 switch (rtlhal->current_bandtype) { in rtl92du_phy_sw_chnl()
2522 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) { in rtl92du_phy_sw_chnl()
2554 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92du_phy_set_rfon()
2617 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92du_phy_set_rfsleep()
2703 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92du_phy_set_poweron() local
2704 u32 mac_reg = (rtlhal->interfaceindex == 0 ? REG_MAC0 : REG_MAC1); in rtl92du_phy_set_poweron()
2709 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92du_phy_set_poweron()
2719 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92du_phy_set_poweron()
2724 if (rtlhal->interfaceindex == 0) { in rtl92du_phy_set_poweron()
2753 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_update_bbrf_configuration() local
2759 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92du_update_bbrf_configuration()
2763 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92du_update_bbrf_configuration()
2780 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92du_update_bbrf_configuration()
2828 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92du_update_bbrf_configuration()
2843 if (rtlefuse->internal_pa_5g[rtlhal->interfaceindex]) in rtl92du_update_bbrf_configuration()
2850 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92du_update_bbrf_configuration()
2861 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92du_update_bbrf_configuration()
2907 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92du_update_bbrf_configuration()
2922 if (rtlhal->interfaceindex == 0 && rtlhal->bandset == BAND_ON_2_4G) { in rtl92du_update_bbrf_configuration()
2926 rtlhal->during_mac0init_radiob = true; in rtl92du_update_bbrf_configuration()
2931 } else if (rtlhal->interfaceindex == 1 && rtlhal->bandset == BAND_ON_5G) { in rtl92du_update_bbrf_configuration()
2935 rtlhal->during_mac1init_radioa = true; in rtl92du_update_bbrf_configuration()
2951 if (rtlhal->interfaceindex == 0) { in rtl92du_update_bbrf_configuration()
2955 rtlhal->during_mac1init_radioa = true; in rtl92du_update_bbrf_configuration()
2992 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92du_phy_check_poweroff() local
2995 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92du_phy_check_poweroff()
3002 if (rtlhal->interfaceindex == 0) { in rtl92du_phy_check_poweroff()
3028 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92du_phy_init_pa_bias() local
3029 bool is_single_mac = rtlhal->macphymode == SINGLEMAC_SINGLEPHY; in rtl92du_phy_init_pa_bias()
3038 if (!(val8 & BIT(0)) && (is_single_mac || rtlhal->interfaceindex == 0)) { in rtl92du_phy_init_pa_bias()
3051 if (!(val8 & BIT(1)) && (is_single_mac || rtlhal->interfaceindex == 1)) { in rtl92du_phy_init_pa_bias()
3052 rf_path = rtlhal->interfaceindex == 1 ? RF90_PATH_A : RF90_PATH_B; in rtl92du_phy_init_pa_bias()
3066 if (!(val8 & BIT(2)) && (is_single_mac || rtlhal->interfaceindex == 0)) { in rtl92du_phy_init_pa_bias()
3094 if (!(val8 & BIT(3)) && (is_single_mac || rtlhal->interfaceindex == 1)) { in rtl92du_phy_init_pa_bias()
3095 rf_path = rtlhal->interfaceindex == 1 ? RF90_PATH_A : RF90_PATH_B; in rtl92du_phy_init_pa_bias()