drivers/net/wireless/broadcom/b43legacy/b43legacy.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43legacy/b43legacy.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/b43legacy/b43legacy.h- Extension
.h- Size
- 27278 bytes
- Lines
- 860
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/hw_random.hlinux/kernel.hlinux/spinlock.hlinux/interrupt.hlinux/stringify.hlinux/netdevice.hlinux/pci.hlinux/atomic.hlinux/io.hlinux/ssb/ssb.hlinux/ssb/ssb_driver_chipcommon.hlinux/completion.hnet/mac80211.hdebugfs.hleds.hrfkill.hphy.h
Detected Declarations
struct net_devicestruct pci_devstruct b43legacy_dmaringstruct b43legacy_pioqueuestruct b43legacy_fw_headerstruct b43legacy_ivstruct b43legacy_lopairstruct b43legacy_phystruct b43legacy_dmastruct b43legacy_piostruct b43legacy_noise_calculationstruct b43legacy_statsstruct b43legacy_keystruct b43legacy_wldevstruct b43legacy_qos_paramsstruct b43legacy_wlstruct b43legacy_firmwarestruct b43legacy_wldevfunction __b43legacy_warn_on_dummyfunction b43legacy_using_piofunction b43legacy_using_piofunction b43legacy_using_piofunction b43legacy_is_modefunction is_bcm_board_vendorfunction b43legacy_read16function b43legacy_write16function b43legacy_read32function b43legacy_write32
Annotated Snippet
struct b43legacy_fw_header {
/* File type */
u8 type;
/* File format version */
u8 ver;
u8 __padding[2];
/* Size of the data. For ucode and PCM this is in bytes.
* For IV this is number-of-ivs. */
__be32 size;
} __packed;
/* Initial Value file format */
#define B43legacy_IV_OFFSET_MASK 0x7FFF
#define B43legacy_IV_32BIT 0x8000
struct b43legacy_iv {
__be16 offset_size;
union {
__be16 d16;
__be32 d32;
} __packed data;
} __packed;
#define B43legacy_PHYMODE(phytype) (1 << (phytype))
#define B43legacy_PHYMODE_B B43legacy_PHYMODE \
((B43legacy_PHYTYPE_B))
#define B43legacy_PHYMODE_G B43legacy_PHYMODE \
((B43legacy_PHYTYPE_G))
/* Value pair to measure the LocalOscillator. */
struct b43legacy_lopair {
s8 low;
s8 high;
u8 used:1;
};
#define B43legacy_LO_COUNT (14*4)
struct b43legacy_phy {
/* Possible PHYMODEs on this PHY */
u8 possible_phymodes;
/* GMODE bit enabled in MACCTL? */
bool gmode;
/* Analog Type */
u8 analog;
/* B43legacy_PHYTYPE_ */
u8 type;
/* PHY revision number. */
u8 rev;
u16 antenna_diversity;
u16 savedpctlreg;
/* Radio versioning */
u16 radio_manuf; /* Radio manufacturer */
u16 radio_ver; /* Radio version */
u8 calibrated:1;
u8 radio_rev; /* Radio revision */
bool dyn_tssi_tbl; /* tssi2dbm is kmalloc()ed. */
/* ACI (adjacent channel interference) flags. */
bool aci_enable;
bool aci_wlan_automatic;
bool aci_hw_rssi;
/* Radio switched on/off */
bool radio_on;
struct {
/* Values saved when turning the radio off.
* They are needed when turning it on again. */
bool valid;
u16 rfover;
u16 rfoverval;
} radio_off_context;
u16 minlowsig[2];
u16 minlowsigpos[2];
/* LO Measurement Data.
* Use b43legacy_get_lopair() to get a value.
*/
struct b43legacy_lopair *_lo_pairs;
/* TSSI to dBm table in use */
const s8 *tssi2dbm;
/* idle TSSI value */
s8 idle_tssi;
/* Target idle TSSI */
int tgt_idle_tssi;
/* Current idle TSSI */
int cur_idle_tssi;
Annotation
- Immediate include surface: `linux/hw_random.h`, `linux/kernel.h`, `linux/spinlock.h`, `linux/interrupt.h`, `linux/stringify.h`, `linux/netdevice.h`, `linux/pci.h`, `linux/atomic.h`.
- Detected declarations: `struct net_device`, `struct pci_dev`, `struct b43legacy_dmaring`, `struct b43legacy_pioqueue`, `struct b43legacy_fw_header`, `struct b43legacy_iv`, `struct b43legacy_lopair`, `struct b43legacy_phy`, `struct b43legacy_dma`, `struct b43legacy_pio`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.