drivers/net/wireless/realtek/rtw89/rtw8922a.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtw89/rtw8922a.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtw89/rtw8922a.c- Extension
.c- Size
- 115671 bytes
- Lines
- 3320
- 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
chan.hcoex.hdebug.hefuse.hfw.hmac.hphy.hreg.hrtw8922a.hrtw8922a_rfk.hsar.hutil.h
Detected Declarations
struct rtw8922a_bb_gainstruct rtw8922a_bb_gain_bypassfunction rtw8922a_ctrl_btg_bt_rxfunction rtw8922a_pwr_on_funcfunction rtw8922a_pwr_off_funcfunction rtw8922a_efuse_parsing_tssifunction rtw8922a_efuse_parsing_gain_offsetfunction rtw8922a_read_efuse_mac_addrfunction rtw8922a_read_efuse_pci_sdiofunction rtw8922a_read_efuse_usbfunction rtw8922a_read_efuse_rffunction rtw8922a_read_efusefunction rtw8922a_phycap_parsing_thermal_trimfunction rtw8922a_phycap_parsing_pa_bias_trimfunction rtw8922a_pa_bias_trimfunction rtw8922a_phycap_parsing_pad_bias_trimfunction rtw8922a_pad_bias_trimfunction rtw8922a_read_phycapfunction rtw8922a_power_trimfunction rtw8922a_set_channel_macfunction rtw8922a_ctrl_sco_cckfunction rtw8922a_set_rpl_gainfunction rtw8922a_set_lna_tia_gainfunction rtw8922a_set_gainfunction rtw8922a_set_rx_gain_normal_cckfunction rtw8922a_set_rx_gain_normal_ofdmfunction rtw8922a_set_rx_gain_normalfunction rtw8922a_set_cck_parametersfunction rtw8922a_ctrl_chfunction rtw8922a_ctrl_bwfunction rtw8922a_spur_freqfunction rtw8922a_set_csi_tone_idxfunction rtw8922a_set_nbi_tone_idxfunction rtw8922a_spur_eliminationfunction rtw8922a_ctrl_afe_dacfunction rtw8922a_bbmcu_cr_initfunction rtw8922a_bb_preinitfunction rtw8922a_bb_postinitfunction rtw8922a_bb_reset_enfunction rtw8922a_ctrl_tx_path_tmacfunction rtw8922a_bb_resetfunction rtw8922a_tssi_resetfunction rtw8922a_ctrl_rx_path_tmacfunction rtw8922a_set_digital_pwr_compfunction rtw8922a_digital_pwr_compfunction rtw8922a_ctrl_mlofunction rtw8922a_bb_sethwfunction rtw8922a_ctrl_cck_en
Annotated Snippet
struct rtw8922a_bb_gain {
u32 gain_g[BB_PATH_NUM_8922A];
u32 gain_a[BB_PATH_NUM_8922A];
u32 gain_g_mask;
u32 gain_a_mask;
};
static const struct rtw89_reg_def rpl_comp_bw160[RTW89_BW20_SC_160M] = {
{ .addr = 0x41E8, .mask = 0xFF00},
{ .addr = 0x41E8, .mask = 0xFF0000},
{ .addr = 0x41E8, .mask = 0xFF000000},
{ .addr = 0x41EC, .mask = 0xFF},
{ .addr = 0x41EC, .mask = 0xFF00},
{ .addr = 0x41EC, .mask = 0xFF0000},
{ .addr = 0x41EC, .mask = 0xFF000000},
{ .addr = 0x41F0, .mask = 0xFF}
};
static const struct rtw89_reg_def rpl_comp_bw80[RTW89_BW20_SC_80M] = {
{ .addr = 0x41F4, .mask = 0xFF},
{ .addr = 0x41F4, .mask = 0xFF00},
{ .addr = 0x41F4, .mask = 0xFF0000},
{ .addr = 0x41F4, .mask = 0xFF000000}
};
static const struct rtw89_reg_def rpl_comp_bw40[RTW89_BW20_SC_40M] = {
{ .addr = 0x41F0, .mask = 0xFF0000},
{ .addr = 0x41F0, .mask = 0xFF000000}
};
static const struct rtw89_reg_def rpl_comp_bw20[RTW89_BW20_SC_20M] = {
{ .addr = 0x41F0, .mask = 0xFF00}
};
static const struct rtw8922a_bb_gain bb_gain_lna[LNA_GAIN_NUM] = {
{ .gain_g = {0x409c, 0x449c}, .gain_a = {0x406C, 0x446C},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF},
{ .gain_g = {0x409c, 0x449c}, .gain_a = {0x406C, 0x446C},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF0000},
{ .gain_g = {0x40a0, 0x44a0}, .gain_a = {0x4070, 0x4470},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF},
{ .gain_g = {0x40a0, 0x44a0}, .gain_a = {0x4070, 0x4470},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF0000},
{ .gain_g = {0x40a4, 0x44a4}, .gain_a = {0x4074, 0x4474},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF},
{ .gain_g = {0x40a4, 0x44a4}, .gain_a = {0x4074, 0x4474},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF0000},
{ .gain_g = {0x40a8, 0x44a8}, .gain_a = {0x4078, 0x4478},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF},
};
static const struct rtw8922a_bb_gain bb_gain_tia[TIA_GAIN_NUM] = {
{ .gain_g = {0x4054, 0x4454}, .gain_a = {0x4054, 0x4454},
.gain_g_mask = 0x7FC0000, .gain_a_mask = 0x1FF},
{ .gain_g = {0x4058, 0x4458}, .gain_a = {0x4054, 0x4454},
.gain_g_mask = 0x1FF, .gain_a_mask = 0x3FE00 },
};
static const struct rtw8922a_bb_gain bb_op1db_lna[LNA_GAIN_NUM] = {
{ .gain_g = {0x40ac, 0x44ac}, .gain_a = {0x4078, 0x4478},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF000000},
{ .gain_g = {0x40ac, 0x44ac}, .gain_a = {0x407c, 0x447c},
.gain_g_mask = 0xFF0000, .gain_a_mask = 0xFF},
{ .gain_g = {0x40ac, 0x44ac}, .gain_a = {0x407c, 0x447c},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF00},
{ .gain_g = {0x40b0, 0x44b0}, .gain_a = {0x407c, 0x447c},
.gain_g_mask = 0xFF, .gain_a_mask = 0xFF0000},
{ .gain_g = {0x40b0, 0x44b0}, .gain_a = {0x407c, 0x447c},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF000000},
{ .gain_g = {0x40b0, 0x44b0}, .gain_a = {0x4080, 0x4480},
.gain_g_mask = 0xFF0000, .gain_a_mask = 0xFF},
{ .gain_g = {0x40b0, 0x44b0}, .gain_a = {0x4080, 0x4480},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF00},
};
static const struct rtw8922a_bb_gain bb_op1db_tia_lna[TIA_LNA_OP1DB_NUM] = {
{ .gain_g = {0x40b4, 0x44b4}, .gain_a = {0x4080, 0x4480},
.gain_g_mask = 0xFF0000, .gain_a_mask = 0xFF000000},
{ .gain_g = {0x40b4, 0x44b4}, .gain_a = {0x4084, 0x4484},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF},
{ .gain_g = {0x40b8, 0x44b8}, .gain_a = {0x4084, 0x4484},
.gain_g_mask = 0xFF, .gain_a_mask = 0xFF00},
{ .gain_g = {0x40b8, 0x44b8}, .gain_a = {0x4084, 0x4484},
.gain_g_mask = 0xFF00, .gain_a_mask = 0xFF0000},
{ .gain_g = {0x40b8, 0x44b8}, .gain_a = {0x4084, 0x4484},
.gain_g_mask = 0xFF0000, .gain_a_mask = 0xFF000000},
{ .gain_g = {0x40b8, 0x44b8}, .gain_a = {0x4088, 0x4488},
.gain_g_mask = 0xFF000000, .gain_a_mask = 0xFF},
{ .gain_g = {0x40bc, 0x44bc}, .gain_a = {0x4088, 0x4488},
.gain_g_mask = 0xFF, .gain_a_mask = 0xFF00},
Annotation
- Immediate include surface: `chan.h`, `coex.h`, `debug.h`, `efuse.h`, `fw.h`, `mac.h`, `phy.h`, `reg.h`.
- Detected declarations: `struct rtw8922a_bb_gain`, `struct rtw8922a_bb_gain_bypass`, `function rtw8922a_ctrl_btg_bt_rx`, `function rtw8922a_pwr_on_func`, `function rtw8922a_pwr_off_func`, `function rtw8922a_efuse_parsing_tssi`, `function rtw8922a_efuse_parsing_gain_offset`, `function rtw8922a_read_efuse_mac_addr`, `function rtw8922a_read_efuse_pci_sdio`, `function rtw8922a_read_efuse_usb`.
- 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.