drivers/net/wireless/broadcom/b43legacy/pio.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43legacy/pio.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/b43legacy/pio.h- Extension
.h- Size
- 4003 bytes
- Lines
- 159
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
b43legacy.hlinux/interrupt.hlinux/list.hlinux/skbuff.h
Detected Declarations
struct b43legacy_pioqueuestruct b43legacy_xmitstatusstruct b43legacy_pio_txpacketstruct b43legacy_pioqueuefunction b43legacy_pio_readfunction b43legacy_pio_writefunction b43legacy_pio_initfunction b43legacy_pio_freefunction b43legacy_pio_handle_txstatus
Annotated Snippet
struct b43legacy_pio_txpacket {
struct b43legacy_pioqueue *queue;
struct sk_buff *skb;
struct list_head list;
};
#define pio_txpacket_getindex(packet) ((int)((packet) - \
(packet)->queue->tx_packets_cache))
struct b43legacy_pioqueue {
struct b43legacy_wldev *dev;
u16 mmio_base;
bool tx_suspended;
bool tx_frozen;
bool need_workarounds; /* Workarounds needed for core.rev < 3 */
/* Adjusted size of the device internal TX buffer. */
u16 tx_devq_size;
/* Used octets of the device internal TX buffer. */
u16 tx_devq_used;
/* Used packet slots in the device internal TX buffer. */
u8 tx_devq_packets;
/* Packets from the txfree list can
* be taken on incoming TX requests.
*/
struct list_head txfree;
unsigned int nr_txfree;
/* Packets on the txqueue are queued,
* but not completely written to the chip, yet.
*/
struct list_head txqueue;
/* Packets on the txrunning queue are completely
* posted to the device. We are waiting for the txstatus.
*/
struct list_head txrunning;
struct tasklet_struct txtask;
struct b43legacy_pio_txpacket
tx_packets_cache[B43legacy_PIO_MAXTXPACKETS];
};
static inline
u16 b43legacy_pio_read(struct b43legacy_pioqueue *queue,
u16 offset)
{
return b43legacy_read16(queue->dev, queue->mmio_base + offset);
}
static inline
void b43legacy_pio_write(struct b43legacy_pioqueue *queue,
u16 offset, u16 value)
{
b43legacy_write16(queue->dev, queue->mmio_base + offset, value);
}
int b43legacy_pio_init(struct b43legacy_wldev *dev);
void b43legacy_pio_free(struct b43legacy_wldev *dev);
int b43legacy_pio_tx(struct b43legacy_wldev *dev,
struct sk_buff *skb);
void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev,
const struct b43legacy_txstatus *status);
void b43legacy_pio_rx(struct b43legacy_pioqueue *queue);
/* Suspend TX queue in hardware. */
void b43legacy_pio_tx_suspend(struct b43legacy_pioqueue *queue);
void b43legacy_pio_tx_resume(struct b43legacy_pioqueue *queue);
/* Suspend (freeze) the TX tasklet (software level). */
void b43legacy_pio_freeze_txqueues(struct b43legacy_wldev *dev);
void b43legacy_pio_thaw_txqueues(struct b43legacy_wldev *dev);
#else /* CONFIG_B43LEGACY_PIO */
static inline
int b43legacy_pio_init(struct b43legacy_wldev *dev)
{
return 0;
}
static inline
void b43legacy_pio_free(struct b43legacy_wldev *dev)
{
}
static inline
int b43legacy_pio_tx(struct b43legacy_wldev *dev,
struct sk_buff *skb)
{
return 0;
}
static inline
Annotation
- Immediate include surface: `b43legacy.h`, `linux/interrupt.h`, `linux/list.h`, `linux/skbuff.h`.
- Detected declarations: `struct b43legacy_pioqueue`, `struct b43legacy_xmitstatus`, `struct b43legacy_pio_txpacket`, `struct b43legacy_pioqueue`, `function b43legacy_pio_read`, `function b43legacy_pio_write`, `function b43legacy_pio_init`, `function b43legacy_pio_free`, `function b43legacy_pio_handle_txstatus`.
- 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.