drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c- Extension
.c- Size
- 49181 bytes
- Lines
- 1616
- 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../rtl8192ce/reg.h../rtl8192ce/def.hdm_common.hfw_common.hphy_common.hlinux/export.h
Detected Declarations
function rtl92c_phy_query_bb_regfunction rtl92c_phy_set_bb_regfunction _rtl92c_phy_fw_rf_serial_readfunction _rtl92c_phy_fw_rf_serial_writefunction _rtl92c_phy_rf_serial_readfunction _rtl92c_phy_rf_serial_writefunction _rtl92c_phy_bb_config_1tfunction rtl92c_phy_rf_configfunction _rtl92c_phy_bb8192c_config_parafilefunction _rtl92c_store_pwrindex_diffrate_offsetfunction rtl92c_phy_get_hw_reg_originalvaluefunction _rtl92c_phy_init_bb_rf_register_definitionfunction rtl92c_phy_get_txpower_levelfunction _rtl92c_get_txpower_indexfunction _rtl92c_ccxpower_index_checkfunction rtl92c_phy_set_txpower_levelfunction rtl92c_phy_update_txpower_dbmfunction _rtl92c_phy_dbm_to_txpwr_idxfunction _rtl92c_phy_txpwr_idx_to_dbmfunction rtl92c_phy_set_bw_modefunction rtl92c_phy_sw_chnl_callbackfunction rtl92c_phy_sw_chnlfunction _rtl92c_phy_sw_rf_setingfunction _rtl92c_phy_set_sw_chnl_cmdarrayfunction _rtl92c_phy_sw_chnl_step_by_stepfunction rtl8192_phy_check_is_legal_rfpathfunction _rtl92c_phy_path_a_iqkfunction _rtl92c_phy_path_b_iqkfunction _rtl92c_phy_path_a_fill_iqk_matrixfunction _rtl92c_phy_path_b_fill_iqk_matrixfunction _rtl92c_phy_save_adda_registersfunction _rtl92c_phy_save_mac_registersfunction _rtl92c_phy_reload_adda_registersfunction _rtl92c_phy_reload_mac_registersfunction _rtl92c_phy_path_adda_onfunction _rtl92c_phy_mac_setting_calibrationfunction _rtl92c_phy_path_a_standbyfunction _rtl92c_phy_pi_mode_switchfunction _rtl92c_phy_simularity_comparefunction _rtl92c_phy_iq_calibratefunction _rtl92c_phy_ap_calibratefunction rtl92c_phy_iq_calibratefunction rtl92c_phy_lc_calibratefunction rtl92c_phy_ap_calibratefunction rtl92c_phy_set_rfpath_switchfunction rtl92c_phy_set_io_cmdfunction rtl92c_phy_set_iofunction rtl92ce_phy_set_rf_on
Annotated Snippet
switch (*stage) {
case 0:
currentcmd = &precommoncmd[*step];
break;
case 1:
currentcmd = &rfdependcmd[*step];
break;
case 2:
currentcmd = &postcommoncmd[*step];
break;
default:
pr_err("Invalid 'stage' = %d, Check it!\n",
*stage);
return true;
}
if (currentcmd->cmdid == CMDID_END) {
if ((*stage) == 2) {
return true;
} else {
(*stage)++;
(*step) = 0;
continue;
}
}
switch (currentcmd->cmdid) {
case CMDID_SET_TXPOWEROWER_LEVEL:
rtl92c_phy_set_txpower_level(hw, channel);
break;
case CMDID_WRITEPORT_ULONG:
rtl_write_dword(rtlpriv, currentcmd->para1,
currentcmd->para2);
break;
case CMDID_WRITEPORT_USHORT:
rtl_write_word(rtlpriv, currentcmd->para1,
(u16) currentcmd->para2);
break;
case CMDID_WRITEPORT_UCHAR:
rtl_write_byte(rtlpriv, currentcmd->para1,
(u8)currentcmd->para2);
break;
case CMDID_RF_WRITEREG:
for (rfpath = 0; rfpath < num_total_rfpath; rfpath++) {
rtlphy->rfreg_chnlval[rfpath] =
((rtlphy->rfreg_chnlval[rfpath] &
0xfffffc00) | currentcmd->para2);
rtl_set_rfreg(hw, (enum radio_path)rfpath,
currentcmd->para1,
RFREG_OFFSET_MASK,
rtlphy->rfreg_chnlval[rfpath]);
}
_rtl92c_phy_sw_rf_seting(hw, channel);
break;
default:
rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
"switch case %#x not processed\n",
currentcmd->cmdid);
break;
}
break;
} while (true);
(*delay) = currentcmd->msdelay;
(*step)++;
return false;
}
bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw, u32 rfpath)
{
return true;
}
EXPORT_SYMBOL(rtl8192_phy_check_is_legal_rfpath);
static u8 _rtl92c_phy_path_a_iqk(struct ieee80211_hw *hw, bool config_pathb)
{
u32 reg_eac, reg_e94, reg_e9c, reg_ea4;
u8 result = 0x00;
rtl_set_bbreg(hw, 0xe30, MASKDWORD, 0x10008c1f);
rtl_set_bbreg(hw, 0xe34, MASKDWORD, 0x10008c1f);
rtl_set_bbreg(hw, 0xe38, MASKDWORD, 0x82140102);
rtl_set_bbreg(hw, 0xe3c, MASKDWORD,
config_pathb ? 0x28160202 : 0x28160502);
if (config_pathb) {
rtl_set_bbreg(hw, 0xe50, MASKDWORD, 0x10008c22);
rtl_set_bbreg(hw, 0xe54, MASKDWORD, 0x10008c22);
Annotation
- Immediate include surface: `../wifi.h`, `../rtl8192ce/reg.h`, `../rtl8192ce/def.h`, `dm_common.h`, `fw_common.h`, `phy_common.h`, `linux/export.h`.
- Detected declarations: `function rtl92c_phy_query_bb_reg`, `function rtl92c_phy_set_bb_reg`, `function _rtl92c_phy_fw_rf_serial_read`, `function _rtl92c_phy_fw_rf_serial_write`, `function _rtl92c_phy_rf_serial_read`, `function _rtl92c_phy_rf_serial_write`, `function _rtl92c_phy_bb_config_1t`, `function rtl92c_phy_rf_config`, `function _rtl92c_phy_bb8192c_config_parafile`, `function _rtl92c_store_pwrindex_diffrate_offset`.
- 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.