drivers/net/wireless/realtek/rtw89/rtw8852c.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtw89/rtw8852c.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtw89/rtw8852c.c- Extension
.c- Size
- 111636 bytes
- Lines
- 3329
- 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.hfw.hmac.hphy.hreg.hrtw8852c.hrtw8852c_rfk.hrtw8852c_table.hsar.hutil.h
Detected Declarations
struct rtw8852c_bb_gainstruct rtw8852c_bb_gain_bypassstruct rtw8852c_bb_gain_op1dbenum rtw8852c_rfe_srcfunction rtw8852c_pwr_on_funcfunction rtw8852c_pwr_off_funcfunction rtw8852c_efuse_parsing_tssifunction _decode_efuse_gainfunction rtw8852c_efuse_parsing_gain_offsetfunction rtw8852c_efuse_copy_sn_uuid_usbfunction rtw8852c_read_efusefunction rtw8852c_phycap_parsing_tssifunction rtw8852c_phycap_parsing_thermal_trimfunction rtw8852c_thermal_trimfunction rtw8852c_phycap_parsing_pa_bias_trimfunction rtw8852c_pa_bias_trimfunction rtw8852c_read_phycapfunction rtw8852c_power_trimfunction rtw8852c_set_channel_macfunction rtw8852c_ctrl_sco_cckfunction rtw8852c_set_gain_errorfunction rtw8852c_set_gain_offsetfunction rtw8852c_ctrl_chfunction rtw8852c_bw_settingfunction rtw8852c_edcca_per20_bitmap_sifsfunction rtw8852c_ctrl_bwfunction rtw8852c_spur_freqfunction rtw8852c_set_csi_tone_idxfunction rtw8852c_set_nbi_tone_idxfunction rtw8852c_spur_notchfunction rtw8852c_spur_eliminationfunction rtw8852c_5m_maskfunction rtw8852c_bb_reset_allfunction rtw8852c_bb_reset_enfunction rtw8852c_bb_resetfunction rtw8852c_bb_gpio_trswfunction rtw8852c_bb_gpio_rfmfunction rtw8852c_bb_gpio_initfunction rtw8852c_bb_macid_ctrl_initfunction rtw8852c_bb_sethwfunction rtw8852c_set_channel_bbfunction rtw8852c_set_channelfunction rtw8852c_dfs_enfunction rtw8852c_adc_enfunction rtw8852c_set_channel_helpfunction rtw8852c_rfk_initfunction rtw8852c_rfk_channelfunction rtw8852c_rfk_band_changed
Annotated Snippet
struct rtw8852c_bb_gain {
u32 gain_g[BB_PATH_NUM_8852C];
u32 gain_a[BB_PATH_NUM_8852C];
u32 gain_mask;
};
static const struct rtw8852c_bb_gain bb_gain_lna[LNA_GAIN_NUM] = {
{ .gain_g = {0x4678, 0x475C}, .gain_a = {0x45DC, 0x4740},
.gain_mask = 0x00ff0000 },
{ .gain_g = {0x4678, 0x475C}, .gain_a = {0x45DC, 0x4740},
.gain_mask = 0xff000000 },
{ .gain_g = {0x467C, 0x4760}, .gain_a = {0x4660, 0x4744},
.gain_mask = 0x000000ff },
{ .gain_g = {0x467C, 0x4760}, .gain_a = {0x4660, 0x4744},
.gain_mask = 0x0000ff00 },
{ .gain_g = {0x467C, 0x4760}, .gain_a = {0x4660, 0x4744},
.gain_mask = 0x00ff0000 },
{ .gain_g = {0x467C, 0x4760}, .gain_a = {0x4660, 0x4744},
.gain_mask = 0xff000000 },
{ .gain_g = {0x4680, 0x4764}, .gain_a = {0x4664, 0x4748},
.gain_mask = 0x000000ff },
};
static const struct rtw8852c_bb_gain bb_gain_tia[TIA_GAIN_NUM] = {
{ .gain_g = {0x4680, 0x4764}, .gain_a = {0x4664, 0x4748},
.gain_mask = 0x00ff0000 },
{ .gain_g = {0x4680, 0x4764}, .gain_a = {0x4664, 0x4748},
.gain_mask = 0xff000000 },
};
struct rtw8852c_bb_gain_bypass {
u32 gain_g[BB_PATH_NUM_8852C];
u32 gain_a[BB_PATH_NUM_8852C];
u32 gain_mask_g;
u32 gain_mask_a;
};
static
const struct rtw8852c_bb_gain_bypass bb_gain_bypass_lna[LNA_GAIN_NUM] = {
{ .gain_g = {0x4BB8, 0x4C7C}, .gain_a = {0x4BB4, 0x4C78},
.gain_mask_g = 0xff000000, .gain_mask_a = 0xff},
{ .gain_g = {0x4BBC, 0x4C80}, .gain_a = {0x4BB4, 0x4C78},
.gain_mask_g = 0xff, .gain_mask_a = 0xff00},
{ .gain_g = {0x4BBC, 0x4C80}, .gain_a = {0x4BB4, 0x4C78},
.gain_mask_g = 0xff00, .gain_mask_a = 0xff0000},
{ .gain_g = {0x4BBC, 0x4C80}, .gain_a = {0x4BB4, 0x4C78},
.gain_mask_g = 0xff0000, .gain_mask_a = 0xff000000},
{ .gain_g = {0x4BBC, 0x4C80}, .gain_a = {0x4BB8, 0x4C7C},
.gain_mask_g = 0xff000000, .gain_mask_a = 0xff},
{ .gain_g = {0x4BC0, 0x4C84}, .gain_a = {0x4BB8, 0x4C7C},
.gain_mask_g = 0xff, .gain_mask_a = 0xff00},
{ .gain_g = {0x4BC0, 0x4C84}, .gain_a = {0x4BB8, 0x4C7C},
.gain_mask_g = 0xff00, .gain_mask_a = 0xff0000},
};
struct rtw8852c_bb_gain_op1db {
struct {
u32 lna[BB_PATH_NUM_8852C];
u32 tia_lna[BB_PATH_NUM_8852C];
u32 mask;
} reg[LNA_GAIN_NUM];
u32 reg_tia0_lna6[BB_PATH_NUM_8852C];
u32 mask_tia0_lna6;
};
static const struct rtw8852c_bb_gain_op1db bb_gain_op1db_a = {
.reg = {
{ .lna = {0x4668, 0x474c}, .tia_lna = {0x4670, 0x4754},
.mask = 0xff},
{ .lna = {0x4668, 0x474c}, .tia_lna = {0x4670, 0x4754},
.mask = 0xff00},
{ .lna = {0x4668, 0x474c}, .tia_lna = {0x4670, 0x4754},
.mask = 0xff0000},
{ .lna = {0x4668, 0x474c}, .tia_lna = {0x4670, 0x4754},
.mask = 0xff000000},
{ .lna = {0x466c, 0x4750}, .tia_lna = {0x4674, 0x4758},
.mask = 0xff},
{ .lna = {0x466c, 0x4750}, .tia_lna = {0x4674, 0x4758},
.mask = 0xff00},
{ .lna = {0x466c, 0x4750}, .tia_lna = {0x4674, 0x4758},
.mask = 0xff0000},
},
.reg_tia0_lna6 = {0x4674, 0x4758},
.mask_tia0_lna6 = 0xff000000,
};
static void rtw8852c_set_gain_error(struct rtw89_dev *rtwdev,
enum rtw89_subband subband,
enum rtw89_rf_path path)
{
Annotation
- Immediate include surface: `chan.h`, `coex.h`, `debug.h`, `fw.h`, `mac.h`, `phy.h`, `reg.h`, `rtw8852c.h`.
- Detected declarations: `struct rtw8852c_bb_gain`, `struct rtw8852c_bb_gain_bypass`, `struct rtw8852c_bb_gain_op1db`, `enum rtw8852c_rfe_src`, `function rtw8852c_pwr_on_func`, `function rtw8852c_pwr_off_func`, `function rtw8852c_efuse_parsing_tssi`, `function _decode_efuse_gain`, `function rtw8852c_efuse_parsing_gain_offset`, `function rtw8852c_efuse_copy_sn_uuid_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.