drivers/net/wireless/zydas/zd1211rw/zd_usb.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/zydas/zd1211rw/zd_usb.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/zydas/zd1211rw/zd_usb.h- Extension
.h- Size
- 6874 bytes
- Lines
- 281
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/netdevice.hlinux/spinlock.hlinux/skbuff.hlinux/usb.hzd_def.h
Detected Declarations
struct usb_req_read_regsstruct reg_datastruct usb_req_write_regsstruct usb_req_rfwritestruct usb_int_headerstruct usb_int_regsstruct usb_int_retry_failstruct read_regs_intstruct zd_ioreq16struct zd_ioreq32struct zd_usb_interruptstruct zd_usb_rxstruct zd_usb_txstruct zd_usbenum devicetypeenum endpointsenum control_requestsenum usb_int_idenum usb_int_flagsfunction zd_usb_ioread16
Annotated Snippet
struct usb_req_read_regs {
__le16 id;
__le16 addr[];
} __packed;
struct reg_data {
__le16 addr;
__le16 value;
} __packed;
struct usb_req_write_regs {
__le16 id;
struct reg_data reg_writes[];
} __packed;
enum {
RF_IF_LE = 0x02,
RF_CLK = 0x04,
RF_DATA = 0x08,
};
struct usb_req_rfwrite {
__le16 id;
__le16 value;
/* 1: 3683a */
/* 2: other (default) */
__le16 bits;
/* RF2595: 24 */
__le16 bit_values[];
/* (ZD_CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */
} __packed;
/* USB interrupt */
enum usb_int_id {
USB_INT_TYPE = 0x01,
USB_INT_ID_REGS = 0x90,
USB_INT_ID_RETRY_FAILED = 0xa0,
};
enum usb_int_flags {
USB_INT_READ_REGS_EN = 0x01,
};
struct usb_int_header {
u8 type; /* must always be 1 */
u8 id;
} __packed;
struct usb_int_regs {
struct usb_int_header hdr;
struct reg_data regs[];
} __packed;
struct usb_int_retry_fail {
struct usb_int_header hdr;
u8 new_rate;
u8 _dummy;
u8 addr[ETH_ALEN];
u8 ibss_wakeup_dest;
} __packed;
struct read_regs_int {
struct completion completion;
struct usb_req_read_regs *req;
unsigned int req_count;
/* Stores the USB int structure and contains the USB address of the
* first requested register before request.
*/
u8 buffer[USB_MAX_EP_INT_BUFFER];
int length;
__le16 cr_int_addr;
};
struct zd_ioreq16 {
zd_addr_t addr;
u16 value;
};
struct zd_ioreq32 {
zd_addr_t addr;
u32 value;
};
struct zd_usb_interrupt {
struct read_regs_int read_regs;
spinlock_t lock;
struct urb *urb;
void *buffer;
dma_addr_t buffer_dma;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/netdevice.h`, `linux/spinlock.h`, `linux/skbuff.h`, `linux/usb.h`, `zd_def.h`.
- Detected declarations: `struct usb_req_read_regs`, `struct reg_data`, `struct usb_req_write_regs`, `struct usb_req_rfwrite`, `struct usb_int_header`, `struct usb_int_regs`, `struct usb_int_retry_fail`, `struct read_regs_int`, `struct zd_ioreq16`, `struct zd_ioreq32`.
- 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.