drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c- Extension
.c- Size
- 6117 bytes
- Lines
- 248
- 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.hbrcmu_utils.hbrcmu_wifi.hbrcmu_d11.h
Detected Declarations
function Copyrightfunction d11n_bwfunction brcmu_d11n_encchspecfunction d11ac_bwfunction brcmu_d11ac_encchspecfunction brcmu_d11n_decchspecfunction brcmu_d11ac_decchspecfunction brcmu_d11_attachexport brcmu_d11_attach
Annotated Snippet
if (val == BRCMU_CHSPEC_D11N_SB_L) {
ch->sb = BRCMU_CHAN_SB_L;
ch->control_ch_num -= CH_10MHZ_APART;
} else {
ch->sb = BRCMU_CHAN_SB_U;
ch->control_ch_num += CH_10MHZ_APART;
}
break;
default:
WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
break;
}
switch (ch->chspec & BRCMU_CHSPEC_D11N_BND_MASK) {
case BRCMU_CHSPEC_D11N_BND_5G:
ch->band = BRCMU_CHAN_BAND_5G;
break;
case BRCMU_CHSPEC_D11N_BND_2G:
ch->band = BRCMU_CHAN_BAND_2G;
break;
default:
WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
break;
}
}
static void brcmu_d11ac_decchspec(struct brcmu_chan *ch)
{
u16 val;
ch->chnum = (u8)(ch->chspec & BRCMU_CHSPEC_CH_MASK);
ch->control_ch_num = ch->chnum;
switch (ch->chspec & BRCMU_CHSPEC_D11AC_BW_MASK) {
case BRCMU_CHSPEC_D11AC_BW_20:
ch->bw = BRCMU_CHAN_BW_20;
ch->sb = BRCMU_CHAN_SB_NONE;
break;
case BRCMU_CHSPEC_D11AC_BW_40:
ch->bw = BRCMU_CHAN_BW_40;
val = ch->chspec & BRCMU_CHSPEC_D11AC_SB_MASK;
if (val == BRCMU_CHSPEC_D11AC_SB_L) {
ch->sb = BRCMU_CHAN_SB_L;
ch->control_ch_num -= CH_10MHZ_APART;
} else if (val == BRCMU_CHSPEC_D11AC_SB_U) {
ch->sb = BRCMU_CHAN_SB_U;
ch->control_ch_num += CH_10MHZ_APART;
} else {
WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
}
break;
case BRCMU_CHSPEC_D11AC_BW_80:
ch->bw = BRCMU_CHAN_BW_80;
ch->sb = brcmu_maskget16(ch->chspec, BRCMU_CHSPEC_D11AC_SB_MASK,
BRCMU_CHSPEC_D11AC_SB_SHIFT);
switch (ch->sb) {
case BRCMU_CHAN_SB_LL:
ch->control_ch_num -= CH_30MHZ_APART;
break;
case BRCMU_CHAN_SB_LU:
ch->control_ch_num -= CH_10MHZ_APART;
break;
case BRCMU_CHAN_SB_UL:
ch->control_ch_num += CH_10MHZ_APART;
break;
case BRCMU_CHAN_SB_UU:
ch->control_ch_num += CH_30MHZ_APART;
break;
default:
WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
break;
}
break;
case BRCMU_CHSPEC_D11AC_BW_160:
ch->bw = BRCMU_CHAN_BW_160;
ch->sb = brcmu_maskget16(ch->chspec, BRCMU_CHSPEC_D11AC_SB_MASK,
BRCMU_CHSPEC_D11AC_SB_SHIFT);
switch (ch->sb) {
case BRCMU_CHAN_SB_LLL:
ch->control_ch_num -= CH_70MHZ_APART;
break;
case BRCMU_CHAN_SB_LLU:
ch->control_ch_num -= CH_50MHZ_APART;
break;
case BRCMU_CHAN_SB_LUL:
ch->control_ch_num -= CH_30MHZ_APART;
break;
case BRCMU_CHAN_SB_LUU:
ch->control_ch_num -= CH_10MHZ_APART;
break;
Annotation
- Immediate include surface: `linux/module.h`, `brcmu_utils.h`, `brcmu_wifi.h`, `brcmu_d11.h`.
- Detected declarations: `function Copyright`, `function d11n_bw`, `function brcmu_d11n_encchspec`, `function d11ac_bw`, `function brcmu_d11ac_encchspec`, `function brcmu_d11n_decchspec`, `function brcmu_d11ac_decchspec`, `function brcmu_d11_attach`, `export brcmu_d11_attach`.
- 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.