drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c- Extension
.c- Size
- 60697 bytes
- Lines
- 2498
- 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/bitops.hbrcm_hw_ids.hchipcommon.haiutils.hd11.hphy_shim.hphy_hal.hphy_int.hphy_radio.hphy_lcn.hphyreg_n.h
Detected Declarations
struct chan_info_basicfunction wlc_phyreg_enterfunction wlc_phyreg_exitfunction read_radio_regfunction write_radio_regfunction read_radio_idfunction and_radio_regfunction or_radio_regfunction xor_radio_regfunction mod_radio_regfunction read_phy_regfunction write_phy_regfunction and_phy_regfunction or_phy_regfunction mod_phy_regfunction wlc_set_phy_uninittedfunction wlc_phy_timercb_phycalfunction wlc_phy_get_radio_verfunction wlc_phy_attachfunction wlc_phy_detachfunction wlc_phy_get_phyversionfunction wlc_phy_get_encorefunction wlc_phy_get_coreflagsfunction wlc_phy_anacorefunction wlc_phy_clk_bwbitsfunction wlc_phy_por_informfunction wlc_phy_initcal_enablefunction wlc_phy_hw_clk_state_updfunction wlc_phy_hw_state_updfunction wlc_phy_initfunction wlc_phy_cal_initfunction wlc_phy_downfunction wlc_phy_table_addrfunction wlc_phy_table_data_writefunction wlc_phy_write_tablefunction wlc_phy_read_tablefunction wlc_phy_init_radio_regs_allbandsfunction wlc_phy_init_radio_regsfunction wlc_phy_do_dummy_txfunction wlc_phy_hold_updfunction wlc_phy_mute_updfunction wlc_phy_cal_txpower_recalc_swfunction wlc_phy_switch_radiofunction wlc_phy_bw_state_setfunction wlc_phy_chanspec_radio_setfunction wlc_phy_chanspec_getfunction wlc_phy_chanspec_setfunction wlc_phy_chanspec_ch14_widefilter_set
Annotated Snippet
struct chan_info_basic {
u16 chan;
u16 freq;
};
static const struct chan_info_basic chan_info_all[] = {
{1, 2412},
{2, 2417},
{3, 2422},
{4, 2427},
{5, 2432},
{6, 2437},
{7, 2442},
{8, 2447},
{9, 2452},
{10, 2457},
{11, 2462},
{12, 2467},
{13, 2472},
{14, 2484},
{34, 5170},
{38, 5190},
{42, 5210},
{46, 5230},
{36, 5180},
{40, 5200},
{44, 5220},
{48, 5240},
{52, 5260},
{56, 5280},
{60, 5300},
{64, 5320},
{100, 5500},
{104, 5520},
{108, 5540},
{112, 5560},
{116, 5580},
{120, 5600},
{124, 5620},
{128, 5640},
{132, 5660},
{136, 5680},
{140, 5700},
{149, 5745},
{153, 5765},
{157, 5785},
{161, 5805},
{165, 5825},
{184, 4920},
{188, 4940},
{192, 4960},
{196, 4980},
{200, 5000},
{204, 5020},
{208, 5040},
{212, 5060},
{216, 5080}
};
static const u8 ofdm_rate_lookup[] = {
BRCM_RATE_48M,
BRCM_RATE_24M,
BRCM_RATE_12M,
BRCM_RATE_6M,
BRCM_RATE_54M,
BRCM_RATE_36M,
BRCM_RATE_18M,
BRCM_RATE_9M
};
#define PHY_WREG_LIMIT 24
void wlc_phyreg_enter(struct brcms_phy_pub *pih)
{
struct brcms_phy *pi = container_of(pih, struct brcms_phy, pubpi_ro);
wlapi_bmac_ucode_wake_override_phyreg_set(pi->sh->physhim);
}
void wlc_phyreg_exit(struct brcms_phy_pub *pih)
{
struct brcms_phy *pi = container_of(pih, struct brcms_phy, pubpi_ro);
wlapi_bmac_ucode_wake_override_phyreg_clear(pi->sh->physhim);
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/delay.h`, `linux/bitops.h`, `brcm_hw_ids.h`, `chipcommon.h`, `aiutils.h`, `d11.h`, `phy_shim.h`.
- Detected declarations: `struct chan_info_basic`, `function wlc_phyreg_enter`, `function wlc_phyreg_exit`, `function read_radio_reg`, `function write_radio_reg`, `function read_radio_id`, `function and_radio_reg`, `function or_radio_reg`, `function xor_radio_reg`, `function mod_radio_reg`.
- 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.