drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c- Extension
.c- Size
- 216548 bytes
- Lines
- 8037
- 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/pci_ids.hlinux/if_ether.hnet/cfg80211.hnet/mac80211.hbrcm_hw_ids.haiutils.hchipcommon.hrate.hscb.hphy/phy_hal.hchannel.hantsel.hstf.hampdu.hmac80211_if.hucode_loader.hmain.hsoc.hdma.hdebug.hbrcms_trace_events.h
Detected Declarations
struct d11initstruct edcf_acparamstruct plcp_signal_rate_lookupfunction brcms_ac_to_fifofunction brcms_fifo_to_acfunction brcms_basic_ratefunction frametypefunction get_sifsfunction brcms_deviceremovedfunction brcms_txpktpendtotfunction brcms_is_mband_unlockedfunction brcms_chspec_bwfunction brcms_c_detach_mfreefunction brcms_c_attach_mallocfunction brcms_b_update_slot_timingfunction brcms_c_calc_frame_timefunction brcms_c_write_initsfunction brcms_c_write_mhffunction brcms_c_ucode_bsinitfunction brcms_b_core_ioctlfunction brcms_b_core_phy_clkfunction brcms_c_setxbandfunction brcms_c_setband_inactfunction brcms_c_dotxstatusfunction beginningfunction brcms_b_txstatusfunction brcms_c_tbttfunction brcms_c_mhfdeffunction dmaregfunction brcms_b_attach_dmapiofunction brcms_b_detach_dmapiofunction brcms_b_info_initfunction brcms_b_wait_for_wakefunction brcms_b_clkctl_clkfunction brcms_b_mhffunction brcms_c_mctrl_resetfunction brcms_c_mctrl_writefunction brcms_b_mctrlfunction brcms_c_ucode_wake_override_setfunction brcms_c_ucode_wake_override_clearfunction brcms_c_ucode_mute_override_setfunction brcms_c_ucode_mute_override_clearfunction brcms_b_set_addrmatchfunction brcms_b_write_template_ramfunction brcms_b_set_cwminfunction brcms_b_set_cwmaxfunction brcms_b_bw_setfunction brcms_b_upd_synthpu
Annotated Snippet
struct d11init {
__le16 addr;
__le16 size;
__le32 value;
};
struct edcf_acparam {
u8 ACI;
u8 ECW;
u16 TXOP;
} __packed;
/* debug/trace */
uint brcm_msg_level;
/* TX FIFO number to WME/802.1E Access Category */
static const u8 wme_fifo2ac[] = {
IEEE80211_AC_BK,
IEEE80211_AC_BE,
IEEE80211_AC_VI,
IEEE80211_AC_VO,
IEEE80211_AC_BE,
IEEE80211_AC_BE
};
/* ieee80211 Access Category to TX FIFO number */
static const u8 wme_ac2fifo[] = {
TX_AC_VO_FIFO,
TX_AC_VI_FIFO,
TX_AC_BE_FIFO,
TX_AC_BK_FIFO
};
static const u16 xmtfifo_sz[][NFIFO] = {
/* corerev 17: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5},
/* corerev 18: */
{0, 0, 0, 0, 0, 0},
/* corerev 19: */
{0, 0, 0, 0, 0, 0},
/* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5},
/* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */
{9, 58, 22, 14, 14, 5},
/* corerev 22: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5},
/* corerev 23: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5},
/* corerev 24: 2304, 14848, 5632, 3584, 3584, 1280 */
{9, 58, 22, 14, 14, 5},
/* corerev 25: */
{0, 0, 0, 0, 0, 0},
/* corerev 26: */
{0, 0, 0, 0, 0, 0},
/* corerev 27: */
{0, 0, 0, 0, 0, 0},
/* corerev 28: 2304, 14848, 5632, 3584, 3584, 1280 */
{9, 58, 22, 14, 14, 5},
};
#ifdef DEBUG
static const char * const fifo_names[] = {
"AC_BK", "AC_BE", "AC_VI", "AC_VO", "BCMC", "ATIM" };
#else
static const char fifo_names[6][1];
#endif
#ifdef DEBUG
/* pointer to most recently allocated wl/wlc */
static struct brcms_c_info *wlc_info_dbg = (struct brcms_c_info *) (NULL);
#endif
/* Mapping of ieee80211 AC numbers to tx fifos */
static const u8 ac_to_fifo_mapping[IEEE80211_NUM_ACS] = {
[IEEE80211_AC_VO] = TX_AC_VO_FIFO,
[IEEE80211_AC_VI] = TX_AC_VI_FIFO,
[IEEE80211_AC_BE] = TX_AC_BE_FIFO,
[IEEE80211_AC_BK] = TX_AC_BK_FIFO,
};
/* Mapping of tx fifos to ieee80211 AC numbers */
static const u8 fifo_to_ac_mapping[IEEE80211_NUM_ACS] = {
[TX_AC_BK_FIFO] = IEEE80211_AC_BK,
[TX_AC_BE_FIFO] = IEEE80211_AC_BE,
[TX_AC_VI_FIFO] = IEEE80211_AC_VI,
[TX_AC_VO_FIFO] = IEEE80211_AC_VO,
};
static u8 brcms_ac_to_fifo(u8 ac)
{
Annotation
- Immediate include surface: `linux/pci_ids.h`, `linux/if_ether.h`, `net/cfg80211.h`, `net/mac80211.h`, `brcm_hw_ids.h`, `aiutils.h`, `chipcommon.h`, `rate.h`.
- Detected declarations: `struct d11init`, `struct edcf_acparam`, `struct plcp_signal_rate_lookup`, `function brcms_ac_to_fifo`, `function brcms_fifo_to_ac`, `function brcms_basic_rate`, `function frametype`, `function get_sifs`, `function brcms_deviceremoved`, `function brcms_txpktpendtot`.
- 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.