drivers/net/wireless/realtek/rtl8xxxu/8192f.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtl8xxxu/8192f.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtl8xxxu/8192f.c- Extension
.c- Size
- 70813 bytes
- Lines
- 2093
- 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 rtl8192fu_identify_chipfunction rtl8192f_set_tx_powerfunction rtl8192f_revise_cck_tx_psffunction rtl8192fu_config_kfreefunction rtl8192fu_config_channelfunction rtl8192fu_init_aggregationfunction rtl8192fu_parse_efusefunction rtl8192fu_load_firmwarefunction rtl8192fu_init_phy_bbfunction rtl8192fu_init_phy_rffunction rtl8192f_phy_lc_calibratefunction rtl8192fu_iqk_path_afunction rtl8192fu_rx_iqk_path_afunction rtl8192fu_iqk_path_bfunction rtl8192fu_rx_iqk_path_bfunction rtl8192fu_phy_iqcalibratefunction rtl8192fu_phy_iq_calibratefunction rtl8192fu_disabled_to_emufunction rtl8192fu_emu_to_activefunction rtl8192fu_active_to_emufunction rtl8192fu_emu_to_disabledfunction rtl8192fu_active_to_lpsfunction rtl8192fu_power_onfunction rtl8192fu_power_offfunction rtl8192f_reset_8051function rtl8192f_enable_rffunction rtl8192f_disable_rffunction rtl8192f_usb_quirksfunction rtl8192f_set_crystal_capfunction rtl8192f_cck_rssifunction rtl8192fu_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;
} else {
result[t][0] = 0x100;
result[t][1] = 0x0;
}
}
for (i = 0; i < retry; i++) {
path_a_ok = rtl8192fu_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;
} else {
result[t][2] = 0x100;
result[t][3] = 0x0;
}
}
if (!path_a_ok)
dev_warn(dev, "%s: Path A IQK failed!\n", __func__);
if (priv->rf_paths > 1) {
for (i = 0; i < retry; i++) {
path_b_ok = rtl8192fu_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;
} else {
result[t][4] = 0x100;
result[t][5] = 0x0;
}
}
for (i = 0; i < retry; i++) {
path_b_ok = rtl8192fu_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;
} else {
result[t][6] = 0x100;
result[t][7] = 0x0;
}
}
if (!path_b_ok)
dev_warn(dev, "%s: Path B IQK failed!\n", __func__);
}
/* Back to BB mode, load original value */
rtl8xxxu_write32_mask(priv, REG_FPGA0_IQK, 0xffffff00, 0);
rtl8xxxu_write32(priv, REG_FPGA0_ANALOG4, 0xcc0000c0);
rtl8xxxu_write32(priv, REG_ANAPWR1, 0x44bbbb44);
rtl8xxxu_write32(priv, REG_RX_WAIT_CCA, 0x80408040);
rtl8xxxu_write32(priv, REG_OFDM0_TRX_PATH_ENABLE, 0x6f005433);
rtl8xxxu_write32(priv, REG_OFDM0_TR_MUX_PAR, 0x000004e4);
rtl8xxxu_write32(priv, REG_FPGA0_XCD_RF_SW_CTRL, 0x04003400);
rtl8xxxu_write32(priv, REG_FPGA0_XA_HSSI_PARM1, 0x01000100);
/* Reload ADDA power saving parameters */
rtl8xxxu_restore_regs(priv, adda_regs, priv->adda_backup,
ARRAY_SIZE(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 rtl8192fu_identify_chip`, `function rtl8192f_set_tx_power`, `function rtl8192f_revise_cck_tx_psf`, `function rtl8192fu_config_kfree`, `function rtl8192fu_config_channel`, `function rtl8192fu_init_aggregation`, `function rtl8192fu_parse_efuse`, `function rtl8192fu_load_firmware`, `function rtl8192fu_init_phy_bb`, `function rtl8192fu_init_phy_rf`.
- 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.