Lines Matching refs:hw

45 static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);
47 u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, in rtl92c_phy_query_rf_reg() argument
50 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92c_phy_query_rf_reg()
61 original_value = _rtl92c_phy_rf_serial_read(hw, in rtl92c_phy_query_rf_reg()
64 original_value = _rtl92c_phy_fw_rf_serial_read(hw, in rtl92c_phy_query_rf_reg()
80 bool rtl92c_phy_mac_config(struct ieee80211_hw *hw) in rtl92c_phy_mac_config() argument
82 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92c_phy_mac_config()
83 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92c_phy_mac_config()
85 bool rtstatus = _rtl92c_phy_config_mac_with_headerfile(hw); in rtl92c_phy_mac_config()
94 bool rtl92c_phy_bb_config(struct ieee80211_hw *hw) in rtl92c_phy_bb_config() argument
97 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92c_phy_bb_config()
102 _rtl92c_phy_init_bb_rf_register_definition(hw); in rtl92c_phy_bb_config()
116 rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw); in rtl92c_phy_bb_config()
120 void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw, in rtl92ce_phy_set_rf_reg() argument
124 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92ce_phy_set_rf_reg()
136 original_value = _rtl92c_phy_rf_serial_read(hw, in rtl92ce_phy_set_rf_reg()
145 _rtl92c_phy_rf_serial_write(hw, rfpath, regaddr, data); in rtl92ce_phy_set_rf_reg()
148 original_value = _rtl92c_phy_fw_rf_serial_read(hw, in rtl92ce_phy_set_rf_reg()
156 _rtl92c_phy_fw_rf_serial_write(hw, rfpath, regaddr, data); in rtl92ce_phy_set_rf_reg()
166 static bool _rtl92c_phy_config_mac_with_headerfile(struct ieee80211_hw *hw) in _rtl92c_phy_config_mac_with_headerfile() argument
168 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92c_phy_config_mac_with_headerfile()
182 bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, in _rtl92ce_phy_config_bb_with_headerfile() argument
189 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92ce_phy_config_bb_with_headerfile()
190 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in _rtl92ce_phy_config_bb_with_headerfile()
206 rtl_set_bbreg(hw, phy_regarray_table[i], MASKDWORD, in _rtl92ce_phy_config_bb_with_headerfile()
216 rtl_set_bbreg(hw, agctab_array_table[i], MASKDWORD, in _rtl92ce_phy_config_bb_with_headerfile()
228 bool _rtl92ce_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, in _rtl92ce_phy_config_bb_with_pgheaderfile() argument
231 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92ce_phy_config_bb_with_pgheaderfile()
243 _rtl92c_store_pwrIndex_diffrate_offset(hw, in _rtl92ce_phy_config_bb_with_pgheaderfile()
256 bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, in rtl92c_phy_config_rf_with_headerfile() argument
264 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92c_phy_config_rf_with_headerfile()
265 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92c_phy_config_rf_with_headerfile()
290 rtl_rfreg_delay(hw, rfpath, radioa_array_table[i], in rtl92c_phy_config_rf_with_headerfile()
297 rtl_rfreg_delay(hw, rfpath, radiob_array_table[i], in rtl92c_phy_config_rf_with_headerfile()
316 void rtl92ce_phy_set_bw_mode_callback(struct ieee80211_hw *hw) in rtl92ce_phy_set_bw_mode_callback() argument
318 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92ce_phy_set_bw_mode_callback()
319 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); in rtl92ce_phy_set_bw_mode_callback()
321 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl92ce_phy_set_bw_mode_callback()
357 rtl_set_bbreg(hw, RFPGA0_RFMOD, BRFMOD, 0x0); in rtl92ce_phy_set_bw_mode_callback()
358 rtl_set_bbreg(hw, RFPGA1_RFMOD, BRFMOD, 0x0); in rtl92ce_phy_set_bw_mode_callback()
359 rtl_set_bbreg(hw, RFPGA0_ANALOGPARAMETER2, BIT(10), 1); in rtl92ce_phy_set_bw_mode_callback()
362 rtl_set_bbreg(hw, RFPGA0_RFMOD, BRFMOD, 0x1); in rtl92ce_phy_set_bw_mode_callback()
363 rtl_set_bbreg(hw, RFPGA1_RFMOD, BRFMOD, 0x1); in rtl92ce_phy_set_bw_mode_callback()
365 rtl_set_bbreg(hw, RCCK0_SYSTEM, BCCK_SIDEBAND, in rtl92ce_phy_set_bw_mode_callback()
367 rtl_set_bbreg(hw, ROFDM1_LSTF, 0xC00, mac->cur_40_prime_sc); in rtl92ce_phy_set_bw_mode_callback()
368 rtl_set_bbreg(hw, RFPGA0_ANALOGPARAMETER2, BIT(10), 0); in rtl92ce_phy_set_bw_mode_callback()
370 rtl_set_bbreg(hw, 0x818, (BIT(26) | BIT(27)), in rtl92ce_phy_set_bw_mode_callback()
379 rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw); in rtl92ce_phy_set_bw_mode_callback()
384 void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t) in _rtl92ce_phy_lc_calibrate() argument
388 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92ce_phy_lc_calibrate()
398 rf_a_mode = rtl_get_rfreg(hw, RF90_PATH_A, 0x00, MASK12BITS); in _rtl92ce_phy_lc_calibrate()
401 rf_b_mode = rtl_get_rfreg(hw, RF90_PATH_B, 0x00, in _rtl92ce_phy_lc_calibrate()
404 rtl_set_rfreg(hw, RF90_PATH_A, 0x00, MASK12BITS, in _rtl92ce_phy_lc_calibrate()
408 rtl_set_rfreg(hw, RF90_PATH_B, 0x00, MASK12BITS, in _rtl92ce_phy_lc_calibrate()
411 lc_cal = rtl_get_rfreg(hw, RF90_PATH_A, 0x18, MASK12BITS); in _rtl92ce_phy_lc_calibrate()
413 rtl_set_rfreg(hw, RF90_PATH_A, 0x18, MASK12BITS, lc_cal | 0x08000); in _rtl92ce_phy_lc_calibrate()
419 rtl_set_rfreg(hw, RF90_PATH_A, 0x00, MASK12BITS, rf_a_mode); in _rtl92ce_phy_lc_calibrate()
422 rtl_set_rfreg(hw, RF90_PATH_B, 0x00, MASK12BITS, in _rtl92ce_phy_lc_calibrate()
429 static void _rtl92ce_phy_set_rf_sleep(struct ieee80211_hw *hw) in _rtl92ce_phy_set_rf_sleep() argument
433 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92ce_phy_set_rf_sleep()
436 rtl_set_rfreg(hw, RF90_PATH_A, 0x00, RFREG_OFFSET_MASK, 0x00); in _rtl92ce_phy_set_rf_sleep()
438 u4b_tmp = rtl_get_rfreg(hw, RF90_PATH_A, 0, RFREG_OFFSET_MASK); in _rtl92ce_phy_set_rf_sleep()
441 rtl_set_rfreg(hw, RF90_PATH_A, 0x00, RFREG_OFFSET_MASK, 0x00); in _rtl92ce_phy_set_rf_sleep()
443 u4b_tmp = rtl_get_rfreg(hw, RF90_PATH_A, 0, RFREG_OFFSET_MASK); in _rtl92ce_phy_set_rf_sleep()
459 static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, in _rtl92ce_phy_set_rf_power_state() argument
462 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92ce_phy_set_rf_power_state()
463 struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); in _rtl92ce_phy_set_rf_power_state()
464 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in _rtl92ce_phy_set_rf_power_state()
465 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ce_phy_set_rf_power_state()
480 rtstatus = rtl_ps_enable_nic(hw); in _rtl92ce_phy_set_rf_power_state()
491 rtl92ce_phy_set_rf_on(hw); in _rtl92ce_phy_set_rf_power_state()
494 rtlpriv->cfg->ops->led_control(hw, in _rtl92ce_phy_set_rf_power_state()
497 rtlpriv->cfg->ops->led_control(hw, in _rtl92ce_phy_set_rf_power_state()
506 rtl_ps_disable_nic(hw); in _rtl92ce_phy_set_rf_power_state()
510 rtlpriv->cfg->ops->led_control(hw, in _rtl92ce_phy_set_rf_power_state()
513 rtlpriv->cfg->ops->led_control(hw, in _rtl92ce_phy_set_rf_power_state()
552 _rtl92ce_phy_set_rf_sleep(hw); in _rtl92ce_phy_set_rf_power_state()
566 bool rtl92c_phy_set_rf_power_state(struct ieee80211_hw *hw, in rtl92c_phy_set_rf_power_state() argument
569 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92c_phy_set_rf_power_state()
575 bresult = _rtl92ce_phy_set_rf_power_state(hw, rfpwr_state); in rtl92c_phy_set_rf_power_state()