Lines Matching refs:rtlhal

166 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);  in rtl92d_phy_query_bb_reg()  local
171 if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) { in rtl92d_phy_query_bb_reg()
176 if (rtlhal->during_mac1init_radioa) in rtl92d_phy_query_bb_reg()
178 else if (rtlhal->during_mac0init_radiob) in rtl92d_phy_query_bb_reg()
197 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); in rtl92d_phy_set_bb_reg() local
204 if (rtlhal->during_mac1init_radioa) in rtl92d_phy_set_bb_reg()
206 else if (rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
210 if (rtlhal->during_mac1init_radioa || in rtl92d_phy_set_bb_reg()
211 rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
220 if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) in rtl92d_phy_set_bb_reg()
242 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_mac_config()
264 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_config_bb_with_headerfile() local
267 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_config_bb_with_headerfile()
273 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_config_bb_with_headerfile()
302 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_config_bb_with_headerfile()
318 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_config_bb_with_headerfile()
441 if (!(IS_92D_SINGLEPHY(rtlpriv->rtlhal.version))) { in rtl92d_phy_bb_config()
519 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_set_bw_mode() local
527 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92d_phy_set_bw_mode()
569 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_set_bw_mode()
605 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_switch_wirelessband() local
609 rtlhal->bandset = band; in rtl92d_phy_switch_wirelessband()
610 rtlhal->current_bandtype = band; in rtl92d_phy_switch_wirelessband()
611 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92d_phy_switch_wirelessband()
612 rtlhal->bandset = BAND_ON_BOTH; in rtl92d_phy_switch_wirelessband()
616 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_switch_wirelessband()
619 if (rtlhal->interfaceindex == 1) in rtl92d_phy_switch_wirelessband()
625 if (rtlhal->interfaceindex == 1) in rtl92d_phy_switch_wirelessband()
630 if (rtlhal->current_bandtype == BAND_ON_2_4G) in rtl92d_phy_switch_wirelessband()
636 rtlhal->reloadtxpowerindex = true; in rtl92d_phy_switch_wirelessband()
638 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_switch_wirelessband()
639 value8 = rtl_read_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
642 rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
645 value8 = rtl_read_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
648 rtl_write_byte(rtlpriv, (rtlhal->interfaceindex == in rtl92d_phy_switch_wirelessband()
665 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) { in _rtl92d_phy_reload_imr_setting()
689 rtlpriv->rtlhal.load_imrandiqk_setting_for2g); in _rtl92d_phy_reload_imr_setting()
691 if (!rtlpriv->rtlhal.load_imrandiqk_setting_for2g) { in _rtl92d_phy_reload_imr_setting()
719 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_switch_rf_setting() local
720 u8 path = rtlhal->current_bandtype == in _rtl92d_phy_switch_rf_setting()
728 if (rtlhal->current_bandtype == BAND_ON_5G) { in _rtl92d_phy_switch_rf_setting()
749 if (rtlhal->macphymode == DUALMAC_DUALPHY in _rtl92d_phy_switch_rf_setting()
750 && rtlhal->interfaceindex == 1) { in _rtl92d_phy_switch_rf_setting()
752 rtlhal->during_mac1init_radioa = true; in _rtl92d_phy_switch_rf_setting()
759 if (i == 0 && (rtlhal->macphymode == DUALMAC_DUALPHY)) { in _rtl92d_phy_switch_rf_setting()
788 if (rtlhal->during_mac1init_radioa) in _rtl92d_phy_switch_rf_setting()
802 if (rtlhal->macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_switch_rf_setting()
803 rtlhal->interfaceindex == 1) /* MAC 1 5G */ in _rtl92d_phy_switch_rf_setting()
827 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_switch_rf_setting()
839 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in _rtl92d_phy_switch_rf_setting()
841 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_switch_rf_setting()
844 rtlhal->during_mac0init_radiob = true; in _rtl92d_phy_switch_rf_setting()
882 if (rtlhal->during_mac0init_radiob) in _rtl92d_phy_switch_rf_setting()
892 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_patha_iqk() local
899 if (rtlhal->interfaceindex == 0) { in _rtl92d_phy_patha_iqk()
955 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92d_phy_patha_iqk_5g_normal() local
963 if (rtlhal->interfaceindex == 1) { /* PHY1 */ in _rtl92d_phy_patha_iqk_5g_normal()
1369 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_iq_calibrate_5g_normal() local
1388 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92d_phy_iq_calibrate_5g_normal()
1522 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_simularity_compare() local
1526 bool is2t = IS_92D_SINGLEPHY(rtlhal->version); in _rtl92d_phy_simularity_compare()
1582 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_patha_fill_iqk_matrix() local
1585 bool is2t = IS_92D_SINGLEPHY(rtlhal->version) || in _rtl92d_phy_patha_fill_iqk_matrix()
1586 rtlhal->macphymode == DUALMAC_DUALPHY; in _rtl92d_phy_patha_fill_iqk_matrix()
1609 if (rtlhal->interfaceindex == 1 && in _rtl92d_phy_patha_fill_iqk_matrix()
1610 rtlhal->current_bandtype == BAND_ON_5G) in _rtl92d_phy_patha_fill_iqk_matrix()
1643 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_pathb_fill_iqk_matrix() local
1666 if (rtlhal->current_bandtype == BAND_ON_5G) in _rtl92d_phy_pathb_fill_iqk_matrix()
1692 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_iq_calibrate() local
1716 "IQK !!!currentband %d\n", rtlhal->current_bandtype); in rtl92d_phy_iq_calibrate()
1719 if (rtlhal->current_bandtype == BAND_ON_5G) { in rtl92d_phy_iq_calibrate()
1721 } else if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_iq_calibrate()
1722 if (IS_92D_SINGLEPHY(rtlhal->version)) in rtl92d_phy_iq_calibrate()
1795 if (IS_92D_SINGLEPHY(rtlhal->version)) { in rtl92d_phy_iq_calibrate()
1819 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_reload_iqk_setting() local
1837 if (((!rtlhal->load_imrandiqk_setting_for2g) && in rtl92d_phy_reload_iqk_setting()
1846 if (IS_92D_SINGLEPHY(rtlhal->version)) { in rtl92d_phy_reload_iqk_setting()
1868 u8 erfpath = rtlpriv->rtlhal.current_bandtype == in _rtl92d_phy_reload_lck_setting()
1870 IS_92D_SINGLEPHY(rtlpriv->rtlhal.version) ? in _rtl92d_phy_reload_lck_setting()
1877 rtlpriv->rtlhal.current_bandtype); in _rtl92d_phy_reload_lck_setting()
1879 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G) {/* Path-A for 5G */ in _rtl92d_phy_reload_lck_setting()
1883 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_reload_lck_setting()
1884 rtlpriv->rtlhal.interfaceindex == 1) { in _rtl92d_phy_reload_lck_setting()
1887 rtlpriv->rtlhal.during_mac1init_radioa = true; in _rtl92d_phy_reload_lck_setting()
1896 if (rtlpriv->rtlhal.during_mac1init_radioa) in _rtl92d_phy_reload_lck_setting()
1898 } else if (rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) { in _rtl92d_phy_reload_lck_setting()
1902 if (rtlpriv->rtlhal.macphymode == DUALMAC_DUALPHY && in _rtl92d_phy_reload_lck_setting()
1903 rtlpriv->rtlhal.interfaceindex == 0) { in _rtl92d_phy_reload_lck_setting()
1906 rtlpriv->rtlhal.during_mac0init_radiob = true; in _rtl92d_phy_reload_lck_setting()
1917 if (rtlpriv->rtlhal.during_mac0init_radiob) in _rtl92d_phy_reload_lck_setting()
1926 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in _rtl92d_phy_lc_calibrate_sw() local
1970 if (index == 0 && rtlhal->interfaceindex == 0) { in _rtl92d_phy_lc_calibrate_sw()
2000 if (index == 0 && rtlhal->interfaceindex == 0) in _rtl92d_phy_lc_calibrate_sw()
2039 struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); in rtl92d_phy_lc_calibrate() local
2050 rtlhal->current_bandtype, timecount); in rtl92d_phy_lc_calibrate()
2159 if (rtlpriv->rtlhal.current_bandtype == in _rtl92d_phy_sw_chnl_step_by_step()
2202 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_sw_chnl() local
2213 if ((is_hal_stop(rtlhal)) || (RT_CANNOT_IO(hw))) { in rtl92d_phy_sw_chnl()
2222 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY && in rtl92d_phy_sw_chnl()
2223 rtlhal->bandset == BAND_ON_BOTH) { in rtl92d_phy_sw_chnl()
2231 switch (rtlhal->current_bandtype) { in rtl92d_phy_sw_chnl()
2283 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92d_phy_set_rfon()
2337 if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) in _rtl92d_phy_set_rfsleep()
2462 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_set_poweron() local
2466 u32 mac_reg = (rtlhal->interfaceindex == 0 ? REG_MAC0 : REG_MAC1); in rtl92d_phy_set_poweron()
2469 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_phy_set_poweron()
2479 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_set_poweron()
2484 if (rtlhal->interfaceindex == 0) { in rtl92d_phy_set_poweron()
2513 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_update_bbrf_configuration() local
2520 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_update_bbrf_configuration()
2524 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
2539 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
2579 if (rtlhal->macphymode != DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
2602 if (rtlhal->macphymode == DUALMAC_DUALPHY) { in rtl92d_update_bbrf_configuration()
2639 if (rtlhal->current_bandtype == BAND_ON_2_4G) { in rtl92d_update_bbrf_configuration()
2661 if (rtlhal->interfaceindex == 0) { in rtl92d_update_bbrf_configuration()
2701 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92d_phy_check_poweroff() local
2705 if (rtlhal->macphymode == SINGLEMAC_SINGLEPHY) { in rtl92d_phy_check_poweroff()
2711 if (rtlhal->interfaceindex == 0) { in rtl92d_phy_check_poweroff()