Lines Matching refs:rtlpriv
65 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_query_bb_reg() local
68 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_query_bb_reg()
70 originalvalue = rtl_read_dword(rtlpriv, regaddr); in rtl88e_phy_query_bb_reg()
74 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_query_bb_reg()
85 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_bb_reg() local
88 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_set_bb_reg()
93 originalvalue = rtl_read_dword(rtlpriv, regaddr); in rtl88e_phy_set_bb_reg()
98 rtl_write_dword(rtlpriv, regaddr, data); in rtl88e_phy_set_bb_reg()
100 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_set_bb_reg()
108 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_query_rf_reg() local
112 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_query_rf_reg()
116 spin_lock_irqsave(&rtlpriv->locks.rf_lock, flags); in rtl88e_phy_query_rf_reg()
123 spin_unlock_irqrestore(&rtlpriv->locks.rf_lock, flags); in rtl88e_phy_query_rf_reg()
125 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_query_rf_reg()
135 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_rf_reg() local
139 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_set_rf_reg()
143 spin_lock_irqsave(&rtlpriv->locks.rf_lock, flags); in rtl88e_phy_set_rf_reg()
158 spin_unlock_irqrestore(&rtlpriv->locks.rf_lock, flags); in rtl88e_phy_set_rf_reg()
160 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in rtl88e_phy_set_rf_reg()
168 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_rf_serial_read() local
169 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_rf_serial_read()
179 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "return all one\n"); in _rtl88e_phy_rf_serial_read()
206 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in _rtl88e_phy_rf_serial_read()
218 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_rf_serial_write() local
219 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_rf_serial_write()
223 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "stop\n"); in _rtl88e_phy_rf_serial_write()
230 RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, in _rtl88e_phy_rf_serial_write()
248 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_mac_config() local
251 rtl_write_byte(rtlpriv, 0x04CA, 0x0B); in rtl88e_phy_mac_config()
258 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_bb_config() local
263 regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); in rtl88e_phy_bb_config()
264 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, in rtl88e_phy_bb_config()
267 rtl_write_byte(rtlpriv, REG_RF_CTRL, RF_EN | RF_RSTB | RF_SDMRSTB); in rtl88e_phy_bb_config()
268 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, in rtl88e_phy_bb_config()
271 tmp = rtl_read_dword(rtlpriv, 0x4c); in rtl88e_phy_bb_config()
272 rtl_write_dword(rtlpriv, 0x4c, tmp | BIT(23)); in rtl88e_phy_bb_config()
369 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_bb8188e_config_parafile() local
370 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_bb8188e_config_parafile()
376 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!"); in _rtl88e_phy_bb8188e_config_parafile()
386 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!"); in _rtl88e_phy_bb8188e_config_parafile()
392 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n"); in _rtl88e_phy_bb8188e_config_parafile()
403 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_config_mac_with_headerfile() local
408 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Read Rtl8188EMACPHY_Array\n"); in _rtl88e_phy_config_mac_with_headerfile()
411 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl88e_phy_config_mac_with_headerfile()
414 rtl_write_byte(rtlpriv, ptrarray[i], (u8)ptrarray[i + 1]); in _rtl88e_phy_config_mac_with_headerfile()
470 struct rtl_priv *rtlpriv = rtl_priv(hw); in handle_branch2() local
514 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in handle_branch2()
542 struct rtl_priv *rtlpriv = rtl_priv(hw); in store_pwrindex_rate_offset() local
543 struct rtl_phy *rtlphy = &rtlpriv->phy; in store_pwrindex_rate_offset()
548 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
555 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
562 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
569 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
576 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
583 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
590 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
601 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
608 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
615 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
622 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
629 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
636 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
643 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
650 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
657 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in store_pwrindex_rate_offset()
670 struct rtl_priv *rtlpriv = rtl_priv(hw); in phy_config_bb_with_pghdr() local
726 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, in phy_config_bb_with_pghdr()
793 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_config_rf_with_headerfile() local
800 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in rtl88e_phy_config_rf_with_headerfile()
802 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Radio No %x\n", rfpath); in rtl88e_phy_config_rf_with_headerfile()
818 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_get_hw_reg_originalvalue() local
819 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_get_hw_reg_originalvalue()
830 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in rtl88e_phy_get_hw_reg_originalvalue()
842 RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, in rtl88e_phy_get_hw_reg_originalvalue()
849 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_init_bb_rf_register_definition() local
850 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_init_bb_rf_register_definition()
935 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_get_txpower_level() local
936 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_get_txpower_level()
1021 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_ccxpower_index_check() local
1022 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_ccxpower_index_check()
1078 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_scan_operation_backup() local
1086 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl88e_phy_scan_operation_backup()
1093 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl88e_phy_scan_operation_backup()
1098 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, in rtl88e_phy_scan_operation_backup()
1107 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_bw_mode_callback() local
1109 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_set_bw_mode_callback()
1114 RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, in rtl88e_phy_set_bw_mode_callback()
1124 reg_bw_opmode = rtl_read_byte(rtlpriv, REG_BWOPMODE); in rtl88e_phy_set_bw_mode_callback()
1125 reg_prsr_rsc = rtl_read_byte(rtlpriv, REG_RRSR + 2); in rtl88e_phy_set_bw_mode_callback()
1130 rtl_write_byte(rtlpriv, REG_BWOPMODE, reg_bw_opmode); in rtl88e_phy_set_bw_mode_callback()
1134 rtl_write_byte(rtlpriv, REG_BWOPMODE, reg_bw_opmode); in rtl88e_phy_set_bw_mode_callback()
1137 rtl_write_byte(rtlpriv, REG_RRSR + 2, reg_prsr_rsc); in rtl88e_phy_set_bw_mode_callback()
1140 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, in rtl88e_phy_set_bw_mode_callback()
1165 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, in rtl88e_phy_set_bw_mode_callback()
1171 RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD, "\n"); in rtl88e_phy_set_bw_mode_callback()
1177 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_bw_mode() local
1178 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_set_bw_mode()
1188 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, in rtl88e_phy_set_bw_mode()
1197 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_sw_chnl_callback() local
1199 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_sw_chnl_callback()
1202 RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, in rtl88e_phy_sw_chnl_callback()
1221 RT_TRACE(rtlpriv, COMP_SCAN, DBG_TRACE, "\n"); in rtl88e_phy_sw_chnl_callback()
1226 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_sw_chnl() local
1227 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_sw_chnl()
1241 RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, in rtl88e_phy_sw_chnl()
1246 RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, in rtl88e_phy_sw_chnl()
1257 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_sw_chnl_step_by_step() local
1258 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_sw_chnl_step_by_step()
1306 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, in _rtl88e_phy_sw_chnl_step_by_step()
1324 rtl_write_dword(rtlpriv, currentcmd->para1, in _rtl88e_phy_sw_chnl_step_by_step()
1328 rtl_write_word(rtlpriv, currentcmd->para1, in _rtl88e_phy_sw_chnl_step_by_step()
1332 rtl_write_byte(rtlpriv, currentcmd->para1, in _rtl88e_phy_sw_chnl_step_by_step()
1348 RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, in _rtl88e_phy_sw_chnl_step_by_step()
1577 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_save_mac_registers() local
1581 macbackup[i] = rtl_read_byte(rtlpriv, macreg[i]); in _rtl88e_phy_save_mac_registers()
1582 macbackup[i] = rtl_read_dword(rtlpriv, macreg[i]); in _rtl88e_phy_save_mac_registers()
1598 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_reload_mac_registers() local
1602 rtl_write_byte(rtlpriv, macreg[i], (u8) macbackup[i]); in _rtl88e_phy_reload_mac_registers()
1603 rtl_write_dword(rtlpriv, macreg[i], macbackup[i]); in _rtl88e_phy_reload_mac_registers()
1627 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_mac_setting_calibration() local
1630 rtl_write_byte(rtlpriv, macreg[i], 0x3F); in _rtl88e_phy_mac_setting_calibration()
1633 rtl_write_byte(rtlpriv, macreg[i], in _rtl88e_phy_mac_setting_calibration()
1635 rtl_write_byte(rtlpriv, macreg[i], (u8) (macbackup[i] & (~BIT(5)))); in _rtl88e_phy_mac_setting_calibration()
1717 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_iq_calibrate() local
1718 struct rtl_phy *rtlphy = &rtlpriv->phy; in _rtl88e_phy_iq_calibrate()
1781 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl88e_phy_iq_calibrate()
1794 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl88e_phy_iq_calibrate()
1802 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl88e_phy_iq_calibrate()
1808 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl88e_phy_iq_calibrate()
1860 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "88ee IQK Finish!!\n"); in _rtl88e_phy_iq_calibrate()
1867 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_lc_calibrate() local
1869 tmpreg = rtl_read_byte(rtlpriv, 0xd03); in _rtl88e_phy_lc_calibrate()
1872 rtl_write_byte(rtlpriv, 0xd03, tmpreg & 0x8F); in _rtl88e_phy_lc_calibrate()
1874 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF); in _rtl88e_phy_lc_calibrate()
1897 rtl_write_byte(rtlpriv, 0xd03, tmpreg); in _rtl88e_phy_lc_calibrate()
1904 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0x00); in _rtl88e_phy_lc_calibrate()
1906 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "\n"); in _rtl88e_phy_lc_calibrate()
1913 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88e_phy_set_rfpath_switch() local
1916 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "\n"); in _rtl88e_phy_set_rfpath_switch()
1920 u1btmp = rtl_read_byte(rtlpriv, REG_LEDCFG0); in _rtl88e_phy_set_rfpath_switch()
1921 rtl_write_byte(rtlpriv, REG_LEDCFG0, u1btmp | BIT(7)); in _rtl88e_phy_set_rfpath_switch()
1962 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_iq_calibrate() local
1963 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_iq_calibrate()
2084 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_lc_calibrate() local
2085 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_lc_calibrate()
2086 struct rtl_hal *rtlhal = &rtlpriv->rtlhal; in rtl88e_phy_lc_calibrate()
2089 while (rtlpriv->mac80211.act_scanning && timecount < timeout) { in rtl88e_phy_lc_calibrate()
2095 RTPRINT(rtlpriv, FINIT, INIT_IQK, in rtl88e_phy_lc_calibrate()
2111 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_io_cmd() local
2112 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_set_io_cmd()
2115 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, in rtl88e_phy_set_io_cmd()
2121 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, in rtl88e_phy_set_io_cmd()
2126 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, in rtl88e_phy_set_io_cmd()
2131 RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, in rtl88e_phy_set_io_cmd()
2143 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, "IO Type(%#x)\n", iotype); in rtl88e_phy_set_io_cmd()
2149 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88e_phy_set_io() local
2150 struct rtl_phy *rtlphy = &rtlpriv->phy; in rtl88e_phy_set_io()
2151 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl88e_phy_set_io()
2153 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, in rtl88e_phy_set_io()
2169 RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, in rtl88e_phy_set_io()
2174 RT_TRACE(rtlpriv, COMP_CMD, DBG_TRACE, in rtl88e_phy_set_io()
2180 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl88ee_phy_set_rf_on() local
2182 rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x2b); in rtl88ee_phy_set_rf_on()
2183 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE3); in rtl88ee_phy_set_rf_on()
2185 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2); in rtl88ee_phy_set_rf_on()
2186 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE3); in rtl88ee_phy_set_rf_on()
2187 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0x00); in rtl88ee_phy_set_rf_on()
2192 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88ee_phy_set_rf_sleep() local
2194 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF); in _rtl88ee_phy_set_rf_sleep()
2196 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2); in _rtl88ee_phy_set_rf_sleep()
2197 rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x22); in _rtl88ee_phy_set_rf_sleep()
2203 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl88ee_phy_set_rf_power_state() local
2220 RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, in _rtl88ee_phy_set_rf_power_state()
2228 RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, in _rtl88ee_phy_set_rf_power_state()
2237 rtlpriv->cfg->ops->led_control(hw, in _rtl88ee_phy_set_rf_power_state()
2240 rtlpriv->cfg->ops->led_control(hw, in _rtl88ee_phy_set_rf_power_state()
2253 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, in _rtl88ee_phy_set_rf_power_state()
2262 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, in _rtl88ee_phy_set_rf_power_state()
2272 RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, in _rtl88ee_phy_set_rf_power_state()
2278 rtlpriv->cfg->ops->led_control(hw, in _rtl88ee_phy_set_rf_power_state()
2281 rtlpriv->cfg->ops->led_control(hw, in _rtl88ee_phy_set_rf_power_state()
2296 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, in _rtl88ee_phy_set_rf_power_state()
2305 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, in _rtl88ee_phy_set_rf_power_state()
2313 RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, in _rtl88ee_phy_set_rf_power_state()
2322 RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, in _rtl88ee_phy_set_rf_power_state()