Lines Matching refs:rtlhal
175 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92d_phy_query_bb_reg() local
180 if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) { in rtl92d_phy_query_bb_reg()
185 if (rtlhal->during_mac1init_radioa) in rtl92d_phy_query_bb_reg()
187 else if (rtlhal->during_mac0init_radiob) in rtl92d_phy_query_bb_reg()
206 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92d_phy_set_bb_reg() local
213 if (rtlhal->during_mac1init_radioa) in rtl92d_phy_set_bb_reg()
215 else if (rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
219 if (rtlhal->during_mac1init_radioa || in rtl92d_phy_set_bb_reg()
220 rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
229 if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
364 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_mac_config()
513 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_config_bb_with_headerfile() local
516 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_config_bb_with_headerfile()
522 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_config_bb_with_headerfile()
551 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_config_bb_with_headerfile()
567 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_config_bb_with_headerfile()
742 if (!(IS_92D_SINGLEPHY(rtlpriv->rtlhal.version))) { in rtl92d_phy_bb_config()
848 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_get_txpower_index() local
853 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_get_txpower_index()
916 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) in rtl92d_phy_set_txpower_level()
919 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) in rtl92d_phy_set_txpower_level()
929 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_set_bw_mode() local
937 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92d_phy_set_bw_mode()
979 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_set_bw_mode()
1015 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_switch_wirelessband() local
1019 rtlhal->bandset = band; in rtl92d_phy_switch_wirelessband()
1020 rtlhal->current_bandtype = band; in rtl92d_phy_switch_wirelessband()
1021 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92d_phy_switch_wirelessband()
1022 rtlhal->bandset = BAND_ON_BOTH; in rtl92d_phy_switch_wirelessband()
1026 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_switch_wirelessband()
1029 if (rtlhal->interfaceindex == 1) in rtl92d_phy_switch_wirelessband()
1035 if (rtlhal->interfaceindex == 1) in rtl92d_phy_switch_wirelessband()
1040 if (rtlhal->current_bandtype == BAND_ON_2_4G) in rtl92d_phy_switch_wirelessband()
1046 rtlhal->reloadtxpowerindex = true; in rtl92d_phy_switch_wirelessband()
1048 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_switch_wirelessband()
1049 value8 = rtl_read_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
1052 rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
1055 value8 = rtl_read_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
1058 rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
1075 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) { in _rtl92d_phy_reload_imr_setting()
1099 rtlpriv->rtlhal.load_imrandiqk_setting_for2g); in _rtl92d_phy_reload_imr_setting()
1101 if (!rtlpriv->rtlhal.load_imrandiqk_setting_for2g) { in _rtl92d_phy_reload_imr_setting()
1188 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_switch_rf_setting() local
1189 u8 path = rtlhal->current_bandtype == in _rtl92d_phy_switch_rf_setting()
1197 if (rtlhal->current_bandtype == BAND_ON_5G) { in _rtl92d_phy_switch_rf_setting()
1218 if (rtlhal->macphymode == DUALMAC_DUALPHY in _rtl92d_phy_switch_rf_setting()
1219 && rtlhal->interfaceindex == 1) { in _rtl92d_phy_switch_rf_setting()
1221 rtlhal->during_mac1init_radioa = true; in _rtl92d_phy_switch_rf_setting()
1228 if (i == 0 && (rtlhal->macphymode == DUALMAC_DUALPHY)) { in _rtl92d_phy_switch_rf_setting()
1257 if (rtlhal->during_mac1init_radioa) in _rtl92d_phy_switch_rf_setting()
1271 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_switch_rf_setting()
1272 rtlhal->interfaceindex == 1) /* MAC 1 5G */ in _rtl92d_phy_switch_rf_setting()
1296 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_switch_rf_setting()
1308 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in _rtl92d_phy_switch_rf_setting()
1310 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_switch_rf_setting()
1313 rtlhal->during_mac0init_radiob = true; in _rtl92d_phy_switch_rf_setting()
1351 if (rtlhal->during_mac0init_radiob) in _rtl92d_phy_switch_rf_setting()
1379 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_patha_iqk() local
1386 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_patha_iqk()
1442 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_patha_iqk_5g_normal() local
1450 if (rtlhal->interfaceindex == 1) { /* PHY1 */ in _rtl92d_phy_patha_iqk_5g_normal()
1698 pathon = rtlpriv->rtlhal.interfaceindex == 0 ? in _rtl92d_phy_path_adda_on()
1909 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_iq_calibrate_5g_normal() local
1928 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92d_phy_iq_calibrate_5g_normal()
2062 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_simularity_compare() local
2066 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92d_phy_simularity_compare()
2122 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_patha_fill_iqk_matrix() local
2125 bool is2t = IS_92D_SINGLEPHY(rtlhal->version) || in _rtl92d_phy_patha_fill_iqk_matrix()
2126 rtlhal->macphymode == DUALMAC_DUALPHY; in _rtl92d_phy_patha_fill_iqk_matrix()
2149 if (rtlhal->interfaceindex == 1 && in _rtl92d_phy_patha_fill_iqk_matrix()
2150 rtlhal->current_bandtype == BAND_ON_5G) in _rtl92d_phy_patha_fill_iqk_matrix()
2183 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_pathb_fill_iqk_matrix() local
2206 if (rtlhal->current_bandtype == BAND_ON_5G) in _rtl92d_phy_pathb_fill_iqk_matrix()
2232 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_iq_calibrate() local
2256 "IQK !!!currentband %d\n", rtlhal->current_bandtype); in rtl92d_phy_iq_calibrate()
2259 if (rtlhal->current_bandtype == BAND_ON_5G) { in rtl92d_phy_iq_calibrate()
2261 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_iq_calibrate()
2262 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92d_phy_iq_calibrate()
2335 if (IS_92D_SINGLEPHY(rtlhal->version)) { in rtl92d_phy_iq_calibrate()
2359 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_reload_iqk_setting() local
2377 if (((!rtlhal->load_imrandiqk_setting_for2g) && in rtl92d_phy_reload_iqk_setting()
2386 if (IS_92D_SINGLEPHY(rtlhal->version)) { in rtl92d_phy_reload_iqk_setting()
2458 u8 erfpath = rtlpriv->rtlhal.current_bandtype == in _rtl92d_phy_reload_lck_setting()
2460 IS_92D_SINGLEPHY(rtlpriv->rtlhal.version) ? in _rtl92d_phy_reload_lck_setting()
2467 rtlpriv->rtlhal.current_bandtype); in _rtl92d_phy_reload_lck_setting()
2469 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) {/* Path-A for 5G */ in _rtl92d_phy_reload_lck_setting()
2473 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_reload_lck_setting()
2474 rtlpriv->rtlhal.interfaceindex == 1) { in _rtl92d_phy_reload_lck_setting()
2477 rtlpriv->rtlhal.during_mac1init_radioa = true; in _rtl92d_phy_reload_lck_setting()
2486 if (rtlpriv->rtlhal.during_mac1init_radioa) in _rtl92d_phy_reload_lck_setting()
2488 } else if (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_reload_lck_setting()
2492 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_reload_lck_setting()
2493 rtlpriv->rtlhal.interfaceindex == 0) { in _rtl92d_phy_reload_lck_setting()
2496 rtlpriv->rtlhal.during_mac0init_radiob = true; in _rtl92d_phy_reload_lck_setting()
2507 if (rtlpriv->rtlhal.during_mac0init_radiob) in _rtl92d_phy_reload_lck_setting()
2516 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_lc_calibrate_sw() local
2560 if (index == 0 && rtlhal->interfaceindex == 0) { in _rtl92d_phy_lc_calibrate_sw()
2590 if (index == 0 && rtlhal->interfaceindex == 0) in _rtl92d_phy_lc_calibrate_sw()
2629 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_lc_calibrate() local
2640 rtlhal->current_bandtype, timecount); in rtl92d_phy_lc_calibrate()
2641 if (IS_92D_SINGLEPHY(rtlhal->version)) { in rtl92d_phy_lc_calibrate()
2777 if (rtlpriv->rtlhal.current_bandtype == in _rtl92d_phy_sw_chnl_step_by_step()
2820 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_sw_chnl() local
2831 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92d_phy_sw_chnl()
2840 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY && in rtl92d_phy_sw_chnl()
2841 rtlhal->bandset == BAND_ON_BOTH) { in rtl92d_phy_sw_chnl()
2849 switch (rtlhal->current_bandtype) { in rtl92d_phy_sw_chnl()
2971 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92d_phy_set_rfon()
3025 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92d_phy_set_rfsleep()
3150 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_config_macphymode() local
3153 switch (rtlhal->macphymode) { in rtl92d_phy_config_macphymode()
3175 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_config_macphymode_info() local
3178 switch (rtlhal->macphymode) { in rtl92d_phy_config_macphymode_info()
3181 rtlhal->version |= RF_TYPE_2T2R; in rtl92d_phy_config_macphymode_info()
3182 rtlhal->bandset = BAND_ON_BOTH; in rtl92d_phy_config_macphymode_info()
3183 rtlhal->current_bandtype = BAND_ON_2_4G; in rtl92d_phy_config_macphymode_info()
3188 rtlhal->version |= RF_TYPE_2T2R; in rtl92d_phy_config_macphymode_info()
3189 rtlhal->bandset = BAND_ON_BOTH; in rtl92d_phy_config_macphymode_info()
3190 rtlhal->current_bandtype = BAND_ON_2_4G; in rtl92d_phy_config_macphymode_info()
3195 rtlhal->version &= RF_TYPE_1T1R; in rtl92d_phy_config_macphymode_info()
3197 if (rtlhal->interfaceindex == 0) { in rtl92d_phy_config_macphymode_info()
3198 rtlhal->bandset = BAND_ON_5G; in rtl92d_phy_config_macphymode_info()
3199 rtlhal->current_bandtype = BAND_ON_5G; in rtl92d_phy_config_macphymode_info()
3201 rtlhal->bandset = BAND_ON_2_4G; in rtl92d_phy_config_macphymode_info()
3202 rtlhal->current_bandtype = BAND_ON_2_4G; in rtl92d_phy_config_macphymode_info()
3244 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_set_poweron() local
3248 u32 mac_reg = (rtlhal->interfaceindex == 0 ? REG_MAC0 : REG_MAC1); in rtl92d_phy_set_poweron()
3251 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_set_poweron()
3261 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_set_poweron()
3266 if (rtlhal->interfaceindex == 0) { in rtl92d_phy_set_poweron()
3296 switch (rtlpriv->rtlhal.macphymode) { in rtl92d_phy_config_maccoexist_rfpage()
3320 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_update_bbrf_configuration() local
3327 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_update_bbrf_configuration()
3331 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
3346 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
3386 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
3409 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
3446 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_update_bbrf_configuration()
3468 if (rtlhal->interfaceindex == 0) { in rtl92d_update_bbrf_configuration()
3508 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_check_poweroff() local
3512 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_check_poweroff()
3518 if (rtlhal->interfaceindex == 0) { in rtl92d_phy_check_poweroff()