drivers/net/wireless/purelifi/plfxlc/usb.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/purelifi/plfxlc/usb.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/purelifi/plfxlc/usb.h- Extension
.h- Size
- 5202 bytes
- Lines
- 199
- 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
linux/completion.hlinux/netdevice.hlinux/spinlock.hlinux/skbuff.hlinux/usb.hintf.h
Detected Declarations
struct plfxlc_usb_interruptstruct plfxlc_usb_rxstruct plf_stationstruct plfxlc_firmware_filestruct plfxlc_usb_txstruct plfxlc_usbenum endpointsenum devicetypefunction plfxlc_usb_to_usbdevfunction plfxlc_intf_to_hwfunction plfxlc_usb_to_hw
Annotated Snippet
struct plfxlc_usb_interrupt {
spinlock_t lock; /* spin lock for usb interrupt buffer */
struct urb *urb;
void *buffer;
int interval;
};
#define RX_URBS_COUNT 5
struct plfxlc_usb_rx {
spinlock_t lock; /* spin lock for rx urb */
struct mutex setup_mutex; /* mutex lockt for rx urb */
u8 fragment[2 * USB_MAX_RX_SIZE];
unsigned int fragment_length;
unsigned int usb_packet_size;
struct urb **urbs;
int urbs_count;
};
struct plf_station {
/* 7...3 | 2 | 1 | 0 |
* Reserved | Heartbeat | FIFO full | Connected |
*/
unsigned char flag;
unsigned char mac[ETH_ALEN];
struct sk_buff_head data_list;
};
struct plfxlc_firmware_file {
u32 total_files;
u32 total_size;
u32 size;
u32 start_addr;
u32 control_packets;
} __packed;
#define STATION_CONNECTED_FLAG 0x1
#define STATION_FIFO_FULL_FLAG 0x2
#define STATION_HEARTBEAT_FLAG 0x4
#define STATION_ACTIVE_FLAG 0xFD
#define PURELIFI_SERIAL_LEN 256
#define STA_BROADCAST_INDEX (AP_USER_LIMIT)
#define MAX_STA_NUM (AP_USER_LIMIT + 1)
struct plfxlc_usb_tx {
unsigned long enabled;
spinlock_t lock; /* spinlock for USB tx */
u8 mac_fifo_full;
struct sk_buff_head submitted_skbs;
struct usb_anchor submitted;
int submitted_urbs;
bool stopped;
struct timer_list tx_retry_timer;
struct plf_station station[MAX_STA_NUM];
};
/* Contains the usb parts. The structure doesn't require a lock because intf
* will not be changed after initialization.
*/
struct plfxlc_usb {
struct timer_list sta_queue_cleanup;
struct plfxlc_usb_rx rx;
struct plfxlc_usb_tx tx;
struct usb_interface *intf;
struct usb_interface *ez_usb;
u8 req_buf[64]; /* plfxlc_usb_iowrite16v needs 62 bytes */
u8 sidx; /* store last served */
bool rx_usb_enabled;
bool initialized;
bool was_running;
bool link_up;
};
enum endpoints {
EP_DATA_IN = 2,
EP_DATA_OUT = 8,
};
enum devicetype {
DEVICE_LIFI_X = 0,
DEVICE_LIFI_XC = 1,
DEVICE_LIFI_XL = 1,
};
enum {
PLF_BIT_ENABLED = 1,
PLF_BIT_MAX = 2,
};
Annotation
- Immediate include surface: `linux/completion.h`, `linux/netdevice.h`, `linux/spinlock.h`, `linux/skbuff.h`, `linux/usb.h`, `intf.h`.
- Detected declarations: `struct plfxlc_usb_interrupt`, `struct plfxlc_usb_rx`, `struct plf_station`, `struct plfxlc_firmware_file`, `struct plfxlc_usb_tx`, `struct plfxlc_usb`, `enum endpoints`, `enum devicetype`, `function plfxlc_usb_to_usbdev`, `function plfxlc_intf_to_hw`.
- 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.