drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c- Extension
.c- Size
- 937034 bytes
- Lines
- 28572
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/delay.hlinux/cordic.hbrcm_hw_ids.haiutils.hchipcommon.hpmu.hd11.hphy_shim.hphy_int.hphy_hal.hphy_radio.hphyreg_n.hphytbl_n.hsoc.h
Detected Declarations
struct nphy_iqcal_paramsstruct nphy_txiqcal_ladderstruct nphy_ipa_txcalgainsstruct nphy_papd_restore_statestruct nphy_ipa_txrxgainstruct chan_info_nphy_2055struct chan_info_nphy_radio205xstruct chan_info_nphy_radio2057struct chan_info_nphy_radio2057_rev5struct nphy_sfo_cfgfunction wlc_phy_bist_check_phyfunction wlc_phy_bphy_init_nphyfunction wlc_phy_table_write_nphyfunction wlc_phy_table_read_nphyfunction wlc_phy_static_table_download_nphyfunction wlc_phy_tbl_init_nphyfunction wlc_phy_write_txmacreg_nphyfunction wlc_phy_nphy_tkip_rifs_warfunction wlc_phy_txpwrctrl_config_nphyfunction wlc_phy_txpwr_srom_read_ppr_nphyfunction wlc_phy_txpwr_srom_read_nphyfunction wlc_phy_attach_nphyfunction get_rf_pwr_offsetfunction wlc_phy_update_mimoconfig_nphyfunction wlc_phy_ipa_set_tx_digi_filts_nphyfunction wlc_phy_ipa_restore_tx_digi_filts_nphyfunction wlc_phy_set_rfseq_nphyfunction wlc_phy_read_lpf_bw_ctl_nphyfunction wlc_phy_rfctrl_override_nphy_rev7function wlc_phy_adjust_lnagaintbl_nphyfunction wlc_phy_war_force_trsw_to_R_cliplo_nphyfunction wlc_phy_war_txchain_upd_nphyfunction wlc_phy_workarounds_nphy_gainctrl_2057_rev5function wlc_phy_workarounds_nphy_gainctrl_2057_rev6function wlc_phy_workarounds_nphy_gainctrlfunction wlc_phy_workarounds_nphy_rev7function wlc_phy_workarounds_nphy_rev3function wlc_phy_workarounds_nphy_rev1function wlc_phy_workarounds_nphyfunction wlc_phy_extpa_set_tx_digi_filts_nphyfunction wlc_phy_clip_det_nphyfunction wlc_phy_ipa_internal_tssi_setup_nphyfunction wlc_phy_rfctrl_override_nphyfunction wlc_phy_txpwrctrl_idle_tssi_nphyfunction wlc_phy_txpwr_limit_to_tbl_nphyfunction wlc_phy_txpwrctrl_pwr_setup_nphyfunction wlc_phy_restore_rssical_nphyfunction wlc_phy_internal_cal_txgain_nphy
Annotated Snippet
struct nphy_iqcal_params {
u16 txlpf;
u16 txgm;
u16 pga;
u16 pad;
u16 ipa;
u16 cal_gain;
u16 ncorr[5];
};
struct nphy_txiqcal_ladder {
u8 percent;
u8 g_env;
};
struct nphy_ipa_txcalgains {
struct nphy_txgains gains;
bool useindex;
u8 index;
};
struct nphy_papd_restore_state {
u16 fbmix[2];
u16 vga_master[2];
u16 intpa_master[2];
u16 afectrl[2];
u16 afeoverride[2];
u16 pwrup[2];
u16 atten[2];
u16 mm;
};
struct nphy_ipa_txrxgain {
u16 hpvga;
u16 lpf_biq1;
u16 lpf_biq0;
u16 lna2;
u16 lna1;
s8 txpwrindex;
};
#define NPHY_IPA_RXCAL_MAXGAININDEX (6 - 1)
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_5GHz[] = {
{0, 0, 0, 0, 0, 100},
{0, 0, 0, 0, 0, 50},
{0, 0, 0, 0, 0, -1},
{0, 0, 0, 3, 0, -1},
{0, 0, 3, 3, 0, -1},
{0, 2, 3, 3, 0, -1}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_2GHz[] = {
{0, 0, 0, 0, 0, 128},
{0, 0, 0, 0, 0, 70},
{0, 0, 0, 0, 0, 20},
{0, 0, 0, 3, 0, 20},
{0, 0, 3, 3, 0, 20},
{0, 2, 3, 3, 0, 20}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_5GHz_rev7[] = {
{0, 0, 0, 0, 0, 100},
{0, 0, 0, 0, 0, 50},
{0, 0, 0, 0, 0, -1},
{0, 0, 0, 3, 0, -1},
{0, 0, 3, 3, 0, -1},
{0, 0, 5, 3, 0, -1}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_2GHz_rev7[] = {
{0, 0, 0, 0, 0, 10},
{0, 0, 0, 1, 0, 10},
{0, 0, 1, 2, 0, 10},
{0, 0, 1, 3, 0, 10},
{0, 0, 4, 3, 0, 10},
{0, 0, 6, 3, 0, 10}
};
enum {
NPHY_RXCAL_GAIN_INIT = 0,
NPHY_RXCAL_GAIN_UP,
NPHY_RXCAL_GAIN_DOWN
};
#define wlc_phy_get_papd_nphy(pi) \
(read_phy_reg((pi), 0x1e7) & \
((0x1 << 15) | \
(0x1 << 14) | \
(0x1 << 13)))
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/delay.h`, `linux/cordic.h`, `brcm_hw_ids.h`, `aiutils.h`, `chipcommon.h`, `pmu.h`, `d11.h`.
- Detected declarations: `struct nphy_iqcal_params`, `struct nphy_txiqcal_ladder`, `struct nphy_ipa_txcalgains`, `struct nphy_papd_restore_state`, `struct nphy_ipa_txrxgain`, `struct chan_info_nphy_2055`, `struct chan_info_nphy_radio205x`, `struct chan_info_nphy_radio2057`, `struct chan_info_nphy_radio2057_rev5`, `struct nphy_sfo_cfg`.
- 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.