drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c- Extension
.c- Size
- 27221 bytes
- Lines
- 857
- 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.h../core.hdef.hreg.hdm_common.hphy_common.hrf_common.h
Detected Declarations
function _rtl92d_phy_rf_serial_readfunction _rtl92d_phy_rf_serial_writefunction rtl92d_phy_query_rf_regfunction rtl92d_phy_set_rf_regfunction rtl92d_phy_init_bb_rf_register_definitionfunction rtl92d_store_pwrindex_diffrate_offsetfunction rtl92d_phy_get_hw_reg_originalvaluefunction _rtl92d_get_txpower_indexfunction _rtl92d_ccxpower_index_checkfunction _rtl92c_phy_get_rightchnlplacefunction rtl92d_phy_set_txpower_levelfunction rtl92d_phy_enable_rf_envfunction rtl92d_phy_restore_rf_envfunction rtl92d_get_rightchnlplace_for_iqkfunction rtl92d_phy_save_adda_registersfunction rtl92d_phy_save_mac_registersfunction rtl92d_phy_path_adda_onfunction rtl92d_phy_mac_setting_calibrationfunction _rtl92d_phy_get_absfunction _rtl92d_is_legal_5g_channelfunction rtl92d_phy_calc_curvindexfunction rtl92d_phy_reset_iqk_resultfunction rtl92d_phy_set_iofunction rtl92d_phy_set_io_cmdfunction rtl92d_phy_config_macphymodefunction rtl92d_phy_config_macphymode_infofunction rtl92d_get_chnlgroup_fromarrayfunction rtl92d_phy_get_chnlgroup_bypgfunction rtl92d_phy_config_maccoexist_rfpageexport rtl92d_phy_query_rf_regexport rtl92d_phy_set_rf_regexport rtl92d_phy_init_bb_rf_register_definitionexport rtl92d_store_pwrindex_diffrate_offsetexport rtl92d_phy_get_hw_reg_originalvalueexport rtl92d_phy_set_txpower_levelexport rtl92d_phy_enable_rf_envexport rtl92d_phy_restore_rf_envexport rtl92d_get_rightchnlplace_for_iqkexport rtl92d_phy_save_adda_registersexport rtl92d_phy_save_mac_registersexport rtl92d_phy_path_adda_onexport rtl92d_phy_mac_setting_calibrationexport rtl92d_phy_calc_curvindexexport rtl92d_phy_reset_iqk_resultexport rtl92d_phy_set_io_cmdexport rtl92d_phy_config_macphymodeexport rtl92d_phy_config_macphymode_infoexport rtl92d_get_chnlgroup_fromarray
Annotated Snippet
if (bitmask != RFREG_OFFSET_MASK) {
original_value = _rtl92d_phy_rf_serial_read(hw,
rfpath,
regaddr);
bitshift = calculate_bit_shift(bitmask);
data = ((original_value & (~bitmask)) |
(data << bitshift));
}
_rtl92d_phy_rf_serial_write(hw, rfpath, regaddr, data);
}
rtl92d_pci_unlock(rtlpriv);
rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE,
"regaddr(%#x), bitmask(%#x), data(%#x), rfpath(%#x)\n",
regaddr, bitmask, data, rfpath);
}
EXPORT_SYMBOL_GPL(rtl92d_phy_set_rf_reg);
void rtl92d_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &rtlpriv->phy;
/* RF Interface Sowrtware Control */
/* 16 LSBs if read 32-bit from 0x870 */
rtlphy->phyreg_def[RF90_PATH_A].rfintfs = RFPGA0_XAB_RFINTERFACESW;
/* 16 MSBs if read 32-bit from 0x870 (16-bit for 0x872) */
rtlphy->phyreg_def[RF90_PATH_B].rfintfs = RFPGA0_XAB_RFINTERFACESW;
/* 16 LSBs if read 32-bit from 0x874 */
rtlphy->phyreg_def[RF90_PATH_C].rfintfs = RFPGA0_XCD_RFINTERFACESW;
/* 16 MSBs if read 32-bit from 0x874 (16-bit for 0x876) */
rtlphy->phyreg_def[RF90_PATH_D].rfintfs = RFPGA0_XCD_RFINTERFACESW;
/* RF Interface Readback Value */
/* 16 LSBs if read 32-bit from 0x8E0 */
rtlphy->phyreg_def[RF90_PATH_A].rfintfi = RFPGA0_XAB_RFINTERFACERB;
/* 16 MSBs if read 32-bit from 0x8E0 (16-bit for 0x8E2) */
rtlphy->phyreg_def[RF90_PATH_B].rfintfi = RFPGA0_XAB_RFINTERFACERB;
/* 16 LSBs if read 32-bit from 0x8E4 */
rtlphy->phyreg_def[RF90_PATH_C].rfintfi = RFPGA0_XCD_RFINTERFACERB;
/* 16 MSBs if read 32-bit from 0x8E4 (16-bit for 0x8E6) */
rtlphy->phyreg_def[RF90_PATH_D].rfintfi = RFPGA0_XCD_RFINTERFACERB;
/* RF Interface Output (and Enable) */
/* 16 LSBs if read 32-bit from 0x860 */
rtlphy->phyreg_def[RF90_PATH_A].rfintfo = RFPGA0_XA_RFINTERFACEOE;
/* 16 LSBs if read 32-bit from 0x864 */
rtlphy->phyreg_def[RF90_PATH_B].rfintfo = RFPGA0_XB_RFINTERFACEOE;
/* RF Interface (Output and) Enable */
/* 16 MSBs if read 32-bit from 0x860 (16-bit for 0x862) */
rtlphy->phyreg_def[RF90_PATH_A].rfintfe = RFPGA0_XA_RFINTERFACEOE;
/* 16 MSBs if read 32-bit from 0x864 (16-bit for 0x866) */
rtlphy->phyreg_def[RF90_PATH_B].rfintfe = RFPGA0_XB_RFINTERFACEOE;
/* Addr of LSSI. Write RF register by driver */
/* LSSI Parameter */
rtlphy->phyreg_def[RF90_PATH_A].rf3wire_offset =
RFPGA0_XA_LSSIPARAMETER;
rtlphy->phyreg_def[RF90_PATH_B].rf3wire_offset =
RFPGA0_XB_LSSIPARAMETER;
/* RF parameter */
/* BB Band Select */
rtlphy->phyreg_def[RF90_PATH_A].rflssi_select = RFPGA0_XAB_RFPARAMETER;
rtlphy->phyreg_def[RF90_PATH_B].rflssi_select = RFPGA0_XAB_RFPARAMETER;
rtlphy->phyreg_def[RF90_PATH_C].rflssi_select = RFPGA0_XCD_RFPARAMETER;
rtlphy->phyreg_def[RF90_PATH_D].rflssi_select = RFPGA0_XCD_RFPARAMETER;
/* Tx AGC Gain Stage (same for all path. Should we remove this?) */
/* Tx gain stage */
rtlphy->phyreg_def[RF90_PATH_A].rftxgain_stage = RFPGA0_TXGAINSTAGE;
/* Tx gain stage */
rtlphy->phyreg_def[RF90_PATH_B].rftxgain_stage = RFPGA0_TXGAINSTAGE;
/* Tx gain stage */
rtlphy->phyreg_def[RF90_PATH_C].rftxgain_stage = RFPGA0_TXGAINSTAGE;
/* Tx gain stage */
rtlphy->phyreg_def[RF90_PATH_D].rftxgain_stage = RFPGA0_TXGAINSTAGE;
/* Transceiver A~D HSSI Parameter-1 */
/* wire control parameter1 */
rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para1 = RFPGA0_XA_HSSIPARAMETER1;
/* wire control parameter1 */
rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para1 = RFPGA0_XB_HSSIPARAMETER1;
/* Transceiver A~D HSSI Parameter-2 */
/* wire control parameter2 */
rtlphy->phyreg_def[RF90_PATH_A].rfhssi_para2 = RFPGA0_XA_HSSIPARAMETER2;
/* wire control parameter2 */
rtlphy->phyreg_def[RF90_PATH_B].rfhssi_para2 = RFPGA0_XB_HSSIPARAMETER2;
Annotation
- Immediate include surface: `../wifi.h`, `../core.h`, `def.h`, `reg.h`, `dm_common.h`, `phy_common.h`, `rf_common.h`.
- Detected declarations: `function _rtl92d_phy_rf_serial_read`, `function _rtl92d_phy_rf_serial_write`, `function rtl92d_phy_query_rf_reg`, `function rtl92d_phy_set_rf_reg`, `function rtl92d_phy_init_bb_rf_register_definition`, `function rtl92d_store_pwrindex_diffrate_offset`, `function rtl92d_phy_get_hw_reg_originalvalue`, `function _rtl92d_get_txpower_index`, `function _rtl92d_ccxpower_index_check`, `function _rtl92c_phy_get_rightchnlplace`.
- 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.