drivers/net/wireless/realtek/rtw88/rtw8723d.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtw88/rtw8723d.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtw88/rtw8723d.c- Extension
.c- Size
- 67743 bytes
- Lines
- 2213
- 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
linux/module.hmain.hcoex.hfw.htx.hrx.hphy.hrtw8723x.hrtw8723d.hrtw8723d_table.hmac.hreg.hdebug.h
Detected Declarations
struct rtw_8723d_iqk_cfgfunction rtw8723d_pwrtrack_initfunction rtw8723d_phy_set_paramfunction query_phy_status_page0function query_phy_status_page1function query_phy_statusfunction rtw8723d_check_spur_ov_thresfunction rtw8723d_cfg_notchfunction rtw8723d_spur_calfunction rtw8723d_set_channel_rffunction rtw8723d_set_channel_bbfunction rtw8723d_set_channelfunction rtw8723d_shutdownfunction rtw8723d_iqk_check_tx_failedfunction rtw8723d_iqk_check_rx_failedfunction rtw8723d_iqk_one_shotfunction rtw8723d_iqk_txrx_path_postfunction rtw8723d_iqk_tx_pathfunction rtw8723d_iqk_rx_pathfunction rtw8723d_iqk_fill_s1_matrixfunction rtw8723d_iqk_fill_s0_matrixfunction rtw8723d_iqk_config_macfunction rtw8723d_iqk_rf_standbyfunction rtw8723d_iqk_precfg_pathfunction rtw8723d_iqk_one_roundfunction rtw8723d_phy_calibrationfunction rtw8723d_phy_cck_pd_setfunction rtw8723d_coex_cfg_gnt_fixfunction rtw8723d_coex_cfg_rfe_typefunction rtw8723d_coex_cfg_wl_tx_powerfunction rtw8723d_coex_cfg_wl_rx_gainfunction rtw8723d_set_iqk_matrix_by_resultfunction rtw8723d_set_iqk_matrixfunction rtw8723d_pwrtrack_set_ofdm_pwrfunction rtw8723d_pwrtrack_set_cck_pwrfunction rtw8723d_pwrtrack_setfunction rtw8723d_phy_pwrtrackfunction rtw8723d_pwr_trackexport rtw8723d_hw_spec
Annotated Snippet
struct rtw_8723d_iqk_cfg {
const char *name;
u32 val_bb_sel_btg;
u32 reg_lutwe;
u32 val_txiqk_pi;
u32 reg_padlut;
u32 reg_gaintx;
u32 reg_bspad;
u32 val_wlint;
u32 val_wlsel;
u32 val_iqkpts;
};
static const struct rtw_8723d_iqk_cfg iqk_tx_cfg[PATH_NR] = {
[PATH_S1] = {
.name = "S1",
.val_bb_sel_btg = 0x99000000,
.reg_lutwe = RF_LUTWE,
.val_txiqk_pi = 0x8214019f,
.reg_padlut = RF_LUTDBG,
.reg_gaintx = RF_GAINTX,
.reg_bspad = RF_BSPAD,
.val_wlint = 0xe0d,
.val_wlsel = 0x60d,
.val_iqkpts = 0xfa000000,
},
[PATH_S0] = {
.name = "S0",
.val_bb_sel_btg = 0x99000280,
.reg_lutwe = RF_LUTWE2,
.val_txiqk_pi = 0x8214018a,
.reg_padlut = RF_TXADBG,
.reg_gaintx = RF_TRXIQ,
.reg_bspad = RF_TXATANK,
.val_wlint = 0xe6d,
.val_wlsel = 0x66d,
.val_iqkpts = 0xf9000000,
},
};
static u8 rtw8723d_iqk_check_tx_failed(struct rtw_dev *rtwdev,
const struct rtw_8723d_iqk_cfg *iqk_cfg)
{
s32 tx_x, tx_y;
u32 tx_fail;
rtw_dbg(rtwdev, RTW_DBG_RFK, "[IQK] 0xeac = 0x%x\n",
rtw_read32(rtwdev, REG_IQK_RES_RY));
rtw_dbg(rtwdev, RTW_DBG_RFK, "[IQK] 0xe94 = 0x%x, 0xe9c = 0x%x\n",
rtw_read32(rtwdev, REG_IQK_RES_TX),
rtw_read32(rtwdev, REG_IQK_RES_TY));
rtw_dbg(rtwdev, RTW_DBG_RFK,
"[IQK] 0xe90(before IQK)= 0x%x, 0xe98(after IQK) = 0x%x\n",
rtw_read32(rtwdev, 0xe90),
rtw_read32(rtwdev, 0xe98));
tx_fail = rtw_read32_mask(rtwdev, REG_IQK_RES_RY, BIT_IQK_TX_FAIL);
tx_x = rtw_read32_mask(rtwdev, REG_IQK_RES_TX, BIT_MASK_RES_TX);
tx_y = rtw_read32_mask(rtwdev, REG_IQK_RES_TY, BIT_MASK_RES_TY);
if (!tx_fail && tx_x != IQK_TX_X_ERR && tx_y != IQK_TX_Y_ERR)
return IQK_TX_OK;
rtw_dbg(rtwdev, RTW_DBG_RFK, "[IQK] %s TXIQK is failed\n",
iqk_cfg->name);
return 0;
}
static u8 rtw8723d_iqk_check_rx_failed(struct rtw_dev *rtwdev,
const struct rtw_8723d_iqk_cfg *iqk_cfg)
{
s32 rx_x, rx_y;
u32 rx_fail;
rtw_dbg(rtwdev, RTW_DBG_RFK, "[IQK] 0xea4 = 0x%x, 0xeac = 0x%x\n",
rtw_read32(rtwdev, REG_IQK_RES_RX),
rtw_read32(rtwdev, REG_IQK_RES_RY));
rtw_dbg(rtwdev, RTW_DBG_RFK,
"[IQK] 0xea0(before IQK)= 0x%x, 0xea8(after IQK) = 0x%x\n",
rtw_read32(rtwdev, 0xea0),
rtw_read32(rtwdev, 0xea8));
rx_fail = rtw_read32_mask(rtwdev, REG_IQK_RES_RY, BIT_IQK_RX_FAIL);
rx_x = rtw_read32_mask(rtwdev, REG_IQK_RES_RX, BIT_MASK_RES_RX);
rx_y = rtw_read32_mask(rtwdev, REG_IQK_RES_RY, BIT_MASK_RES_RY);
rx_y = abs(iqkxy_to_s32(rx_y));
if (!rx_fail && rx_x < IQK_RX_X_UPPER && rx_x > IQK_RX_X_LOWER &&
Annotation
- Immediate include surface: `linux/module.h`, `main.h`, `coex.h`, `fw.h`, `tx.h`, `rx.h`, `phy.h`, `rtw8723x.h`.
- Detected declarations: `struct rtw_8723d_iqk_cfg`, `function rtw8723d_pwrtrack_init`, `function rtw8723d_phy_set_param`, `function query_phy_status_page0`, `function query_phy_status_page1`, `function query_phy_status`, `function rtw8723d_check_spur_ov_thres`, `function rtw8723d_cfg_notch`, `function rtw8723d_spur_cal`, `function rtw8723d_set_channel_rf`.
- 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.