drivers/net/wireless/realtek/rtlwifi/rtl8723com/phy_common.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8723com/phy_common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8723com/phy_common.c- Extension
.c- Size
- 13489 bytes
- Lines
- 412
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.hphy_common.h../rtl8723ae/reg.hlinux/module.h
Detected Declarations
function rtl8723_phy_query_bb_regfunction rtl8723_phy_set_bb_regfunction rtl8723_phy_rf_serial_readfunction rtl8723_phy_rf_serial_writefunction rtl8723_phy_txpwr_idx_to_dbmfunction rtl8723_phy_init_bb_rf_reg_deffunction rtl8723_phy_set_sw_chnl_cmdarrayfunction rtl8723_phy_path_a_fill_iqk_matrixfunction rtl8723_save_adda_registersfunction rtl8723_phy_save_mac_registersfunction rtl8723_phy_reload_adda_registersfunction rtl8723_phy_reload_mac_registersfunction rtl8723_phy_path_adda_onfunction rtl8723_phy_mac_setting_calibrationfunction rtl8723_phy_path_a_standbyfunction rtl8723_phy_pi_mode_switchexport rtl8723_phy_query_bb_regexport rtl8723_phy_set_bb_regexport rtl8723_phy_rf_serial_readexport rtl8723_phy_rf_serial_writeexport rtl8723_phy_txpwr_idx_to_dbmexport rtl8723_phy_init_bb_rf_reg_defexport rtl8723_phy_set_sw_chnl_cmdarrayexport rtl8723_phy_path_a_fill_iqk_matrixexport rtl8723_save_adda_registersexport rtl8723_phy_save_mac_registersexport rtl8723_phy_reload_adda_registersexport rtl8723_phy_reload_mac_registersexport rtl8723_phy_path_adda_onexport rtl8723_phy_mac_setting_calibrationexport rtl8723_phy_path_a_standbyexport rtl8723_phy_pi_mode_switch
Annotated Snippet
if (!is2t) {
pathon = 0x0bdb25a0;
rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0b1b25a0);
} else {
rtl_set_bbreg(hw, addareg[0], MASKDWORD, pathon);
}
} else {
/* rtl8723be */
pathon = 0x01c00014;
rtl_set_bbreg(hw, addareg[0], MASKDWORD, pathon);
}
for (i = 1; i < IQK_ADDA_REG_NUM; i++)
rtl_set_bbreg(hw, addareg[i], MASKDWORD, pathon);
}
EXPORT_SYMBOL_GPL(rtl8723_phy_path_adda_on);
void rtl8723_phy_mac_setting_calibration(struct ieee80211_hw *hw,
u32 *macreg, u32 *macbackup)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
u32 i = 0;
rtl_write_byte(rtlpriv, macreg[i], 0x3F);
for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++)
rtl_write_byte(rtlpriv, macreg[i],
(u8) (macbackup[i] & (~BIT(3))));
rtl_write_byte(rtlpriv, macreg[i], (u8) (macbackup[i] & (~BIT(5))));
}
EXPORT_SYMBOL_GPL(rtl8723_phy_mac_setting_calibration);
void rtl8723_phy_path_a_standby(struct ieee80211_hw *hw)
{
rtl_set_bbreg(hw, 0xe28, MASKDWORD, 0x0);
rtl_set_bbreg(hw, 0x840, MASKDWORD, 0x00010000);
rtl_set_bbreg(hw, 0xe28, MASKDWORD, 0x80800000);
}
EXPORT_SYMBOL_GPL(rtl8723_phy_path_a_standby);
void rtl8723_phy_pi_mode_switch(struct ieee80211_hw *hw, bool pi_mode)
{
u32 mode;
mode = pi_mode ? 0x01000100 : 0x01000000;
rtl_set_bbreg(hw, 0x820, MASKDWORD, mode);
rtl_set_bbreg(hw, 0x828, MASKDWORD, mode);
}
EXPORT_SYMBOL_GPL(rtl8723_phy_pi_mode_switch);
Annotation
- Immediate include surface: `../wifi.h`, `phy_common.h`, `../rtl8723ae/reg.h`, `linux/module.h`.
- Detected declarations: `function rtl8723_phy_query_bb_reg`, `function rtl8723_phy_set_bb_reg`, `function rtl8723_phy_rf_serial_read`, `function rtl8723_phy_rf_serial_write`, `function rtl8723_phy_txpwr_idx_to_dbm`, `function rtl8723_phy_init_bb_rf_reg_def`, `function rtl8723_phy_set_sw_chnl_cmdarray`, `function rtl8723_phy_path_a_fill_iqk_matrix`, `function rtl8723_save_adda_registers`, `function rtl8723_phy_save_mac_registers`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.