drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c- Extension
.c- Size
- 91087 bytes
- Lines
- 2727
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.h../pci.h../ps.h../core.h../rtl8192d/reg.h../rtl8192d/def.h../rtl8192d/dm_common.h../rtl8192d/phy_common.h../rtl8192d/rf_common.hphy.hrf.hdm.htable.hsw.hhw.h
Detected Declarations
function rtl92d_phy_query_bb_regfunction rtl92d_phy_set_bb_regfunction rtl92d_phy_mac_configfunction _rtl92d_phy_config_bb_with_headerfilefunction _rtl92d_phy_config_bb_with_pgheaderfilefunction _rtl92d_phy_bb_configfunction rtl92d_phy_bb_configfunction rtl92d_phy_rf_configfunction rtl92d_phy_config_rf_with_headerfilefunction rtl92d_phy_set_bw_modefunction _rtl92d_phy_stop_trx_before_changebandfunction rtl92d_phy_switch_wirelessbandfunction _rtl92d_phy_reload_imr_settingfunction _rtl92d_phy_switch_rf_settingfunction _rtl92d_phy_patha_iqkfunction _rtl92d_phy_patha_iqk_5g_normalfunction _rtl92d_phy_pathb_iqkfunction _rtl92d_phy_pathb_iqk_5g_normalfunction _rtl92d_phy_reload_adda_registersfunction _rtl92d_phy_reload_mac_registersfunction _rtl92d_phy_patha_standbyfunction _rtl92d_phy_pimode_switchfunction _rtl92d_phy_iq_calibratefunction _rtl92d_phy_iq_calibrate_5g_normalfunction _rtl92d_phy_simularity_comparefunction _rtl92d_phy_patha_fill_iqk_matrixfunction _rtl92d_phy_pathb_fill_iqk_matrixfunction rtl92d_phy_iq_calibratefunction rtl92d_phy_reload_iqk_settingfunction _rtl92d_phy_reload_lck_settingfunction _rtl92d_phy_lc_calibrate_swfunction _rtl92d_phy_lc_calibratefunction rtl92d_phy_lc_calibratefunction _rtl92d_phy_set_sw_chnl_cmdarrayfunction _rtl92d_phy_sw_chnl_step_by_stepfunction rtl92d_phy_sw_chnlfunction _rtl92d_phy_set_rfonfunction _rtl92d_phy_set_rfsleepfunction rtl92d_phy_set_rf_power_statefunction rtl92d_phy_set_poweronfunction rtl92d_update_bbrf_configurationfunction rtl92d_phy_check_poweroff
Annotated Snippet
if (rtlhal->current_bandtype == BAND_ON_2_4G) {
agctab_arraylen = AGCTAB_2G_ARRAYLENGTH;
agctab_array_table = rtl8192de_agctab_2garray;
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
" ===> phy:MAC1, Rtl819XAGCTAB_2GArray\n");
} else {
agctab_5garraylen = AGCTAB_5G_ARRAYLENGTH;
agctab_5garray_table = rtl8192de_agctab_5garray;
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
" ===> phy:MAC1, Rtl819XAGCTAB_5GArray\n");
}
}
phy_reg_arraylen = PHY_REG_2T_ARRAYLENGTH;
phy_regarray_table = rtl8192de_phy_reg_2tarray;
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
" ===> phy:Rtl819XPHY_REG_Array_PG\n");
if (configtype == BASEBAND_CONFIG_PHY_REG) {
for (i = 0; i < phy_reg_arraylen; i = i + 2) {
rtl_addr_delay(phy_regarray_table[i]);
rtl_set_bbreg(hw, phy_regarray_table[i], MASKDWORD,
phy_regarray_table[i + 1]);
udelay(1);
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"The phy_regarray_table[0] is %x Rtl819XPHY_REGArray[1] is %x\n",
phy_regarray_table[i],
phy_regarray_table[i + 1]);
}
} else if (configtype == BASEBAND_CONFIG_AGC_TAB) {
if (rtlhal->interfaceindex == 0) {
for (i = 0; i < agctab_arraylen; i = i + 2) {
rtl_set_bbreg(hw, agctab_array_table[i],
MASKDWORD,
agctab_array_table[i + 1]);
/* Add 1us delay between BB/RF register
* setting. */
udelay(1);
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"The Rtl819XAGCTAB_Array_Table[0] is %u Rtl819XPHY_REGArray[1] is %u\n",
agctab_array_table[i],
agctab_array_table[i + 1]);
}
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Normal Chip, MAC0, load Rtl819XAGCTAB_Array\n");
} else {
if (rtlhal->current_bandtype == BAND_ON_2_4G) {
for (i = 0; i < agctab_arraylen; i = i + 2) {
rtl_set_bbreg(hw, agctab_array_table[i],
MASKDWORD,
agctab_array_table[i + 1]);
/* Add 1us delay between BB/RF register
* setting. */
udelay(1);
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"The Rtl819XAGCTAB_Array_Table[0] is %u Rtl819XPHY_REGArray[1] is %u\n",
agctab_array_table[i],
agctab_array_table[i + 1]);
}
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Load Rtl819XAGCTAB_2GArray\n");
} else {
for (i = 0; i < agctab_5garraylen; i = i + 2) {
rtl_set_bbreg(hw,
agctab_5garray_table[i],
MASKDWORD,
agctab_5garray_table[i + 1]);
/* Add 1us delay between BB/RF registeri
* setting. */
udelay(1);
rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
"The Rtl819XAGCTAB_5GArray_Table[0] is %u Rtl819XPHY_REGArray[1] is %u\n",
agctab_5garray_table[i],
agctab_5garray_table[i + 1]);
}
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
"Load Rtl819XAGCTAB_5GArray\n");
}
}
}
return true;
}
static bool _rtl92d_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
u8 configtype)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
int i;
u32 *phy_regarray_table_pg;
u16 phy_regarray_pg_len;
Annotation
- Immediate include surface: `../wifi.h`, `../pci.h`, `../ps.h`, `../core.h`, `../rtl8192d/reg.h`, `../rtl8192d/def.h`, `../rtl8192d/dm_common.h`, `../rtl8192d/phy_common.h`.
- Detected declarations: `function rtl92d_phy_query_bb_reg`, `function rtl92d_phy_set_bb_reg`, `function rtl92d_phy_mac_config`, `function _rtl92d_phy_config_bb_with_headerfile`, `function _rtl92d_phy_config_bb_with_pgheaderfile`, `function _rtl92d_phy_bb_config`, `function rtl92d_phy_bb_config`, `function rtl92d_phy_rf_config`, `function rtl92d_phy_config_rf_with_headerfile`, `function rtl92d_phy_set_bw_mode`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.