drivers/net/wireless/realtek/rtl8xxxu/8192e.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtl8xxxu/8192e.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtl8xxxu/8192e.c- Extension
.c- Size
- 55507 bytes
- Lines
- 1769
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
regs.hrtl8xxxu.h
Detected Declarations
function rtl8192eu_identify_chipfunction rtl8192e_set_tx_powerfunction rtl8192eu_parse_efusefunction rtl8192eu_load_firmwarefunction rtl8192eu_init_phy_bbfunction rtl8192eu_init_phy_rffunction rtl8192eu_iqk_path_afunction rtl8192eu_rx_iqk_path_afunction rtl8192eu_iqk_path_bfunction rtl8192eu_rx_iqk_path_bfunction rtl8192eu_phy_iqcalibratefunction rtl8192eu_phy_iq_calibratefunction rtl8192e_crystal_afe_adjustfunction rtl8192e_disabled_to_emufunction rtl8192e_emu_to_activefunction rtl8192eu_active_to_lpsfunction rtl8192eu_active_to_emufunction rtl8192eu_emu_to_disabledfunction rtl8192eu_power_onfunction rtl8192eu_power_offfunction rtl8192e_enable_rffunction rtl8192e_cck_rssifunction rtl8192eu_led_brightness_set
Annotated Snippet
if (path_a_ok == 0x01) {
val32 = rtl8xxxu_read32(priv,
REG_TX_POWER_BEFORE_IQK_A);
result[t][0] = (val32 >> 16) & 0x3ff;
val32 = rtl8xxxu_read32(priv,
REG_TX_POWER_AFTER_IQK_A);
result[t][1] = (val32 >> 16) & 0x3ff;
break;
}
}
if (!path_a_ok)
dev_dbg(dev, "%s: Path A TX IQK failed!\n", __func__);
for (i = 0; i < retry; i++) {
path_a_ok = rtl8192eu_rx_iqk_path_a(priv);
if (path_a_ok == 0x03) {
val32 = rtl8xxxu_read32(priv,
REG_RX_POWER_BEFORE_IQK_A_2);
result[t][2] = (val32 >> 16) & 0x3ff;
val32 = rtl8xxxu_read32(priv,
REG_RX_POWER_AFTER_IQK_A_2);
result[t][3] = (val32 >> 16) & 0x3ff;
break;
}
}
if (!path_a_ok)
dev_dbg(dev, "%s: Path A RX IQK failed!\n", __func__);
if (priv->rf_paths > 1) {
/* Path A into standby */
rtl8xxxu_write32(priv, REG_FPGA0_IQK, 0x00000000);
rtl8xxxu_write_rfreg(priv, RF_A, RF6052_REG_AC, 0x10000);
rtl8xxxu_write32(priv, REG_FPGA0_IQK, 0x80800000);
/* Turn Path B ADDA on */
rtl8xxxu_path_adda_on(priv, adda_regs, false);
rtl8xxxu_write32(priv, REG_FPGA0_IQK, 0x80800000);
rtl8xxxu_write32(priv, REG_TX_IQK, 0x01007c00);
rtl8xxxu_write32(priv, REG_RX_IQK, 0x01004800);
for (i = 0; i < retry; i++) {
path_b_ok = rtl8192eu_iqk_path_b(priv);
if (path_b_ok == 0x01) {
val32 = rtl8xxxu_read32(priv, REG_TX_POWER_BEFORE_IQK_B);
result[t][4] = (val32 >> 16) & 0x3ff;
val32 = rtl8xxxu_read32(priv, REG_TX_POWER_AFTER_IQK_B);
result[t][5] = (val32 >> 16) & 0x3ff;
break;
}
}
if (!path_b_ok)
dev_dbg(dev, "%s: Path B IQK failed!\n", __func__);
for (i = 0; i < retry; i++) {
path_b_ok = rtl8192eu_rx_iqk_path_b(priv);
if (path_b_ok == 0x03) {
val32 = rtl8xxxu_read32(priv,
REG_RX_POWER_BEFORE_IQK_B_2);
result[t][6] = (val32 >> 16) & 0x3ff;
val32 = rtl8xxxu_read32(priv,
REG_RX_POWER_AFTER_IQK_B_2);
result[t][7] = (val32 >> 16) & 0x3ff;
break;
}
}
if (!path_b_ok)
dev_dbg(dev, "%s: Path B RX IQK failed!\n", __func__);
}
/* Back to BB mode, load original value */
rtl8xxxu_write32(priv, REG_FPGA0_IQK, 0x00000000);
if (t) {
/* Reload ADDA power saving parameters */
rtl8xxxu_restore_regs(priv, adda_regs, priv->adda_backup,
RTL8XXXU_ADDA_REGS);
/* Reload MAC parameters */
rtl8xxxu_restore_mac_regs(priv, iqk_mac_regs, priv->mac_backup);
/* Reload BB parameters */
rtl8xxxu_restore_regs(priv, iqk_bb_regs,
priv->bb_backup, RTL8XXXU_BB_REGS);
Annotation
- Immediate include surface: `regs.h`, `rtl8xxxu.h`.
- Detected declarations: `function rtl8192eu_identify_chip`, `function rtl8192e_set_tx_power`, `function rtl8192eu_parse_efuse`, `function rtl8192eu_load_firmware`, `function rtl8192eu_init_phy_bb`, `function rtl8192eu_init_phy_rf`, `function rtl8192eu_iqk_path_a`, `function rtl8192eu_rx_iqk_path_a`, `function rtl8192eu_iqk_path_b`, `function rtl8192eu_rx_iqk_path_b`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.