drivers/net/wireless/marvell/libertas_tf/if_usb.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/marvell/libertas_tf/if_usb.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/marvell/libertas_tf/if_usb.h
Extension
.h
Size
1725 bytes
Lines
95
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct bootcmd {
	__le32	magic;
	uint8_t	cmd;
	uint8_t	pad[11];
};

#define BOOT_CMD_RESP_OK		0x0001
#define BOOT_CMD_RESP_FAIL		0x0000

struct bootcmdresp {
	__le32	magic;
	uint8_t	cmd;
	uint8_t	result;
	uint8_t	pad[2];
};

/** USB card description structure*/
struct if_usb_card {
	struct usb_device *udev;
	struct urb *rx_urb, *tx_urb, *cmd_urb;
	struct lbtf_private *priv;

	struct sk_buff *rx_skb;

	uint8_t ep_in;
	uint8_t ep_out;

	int8_t bootcmdresp;

	int ep_in_size;

	void *ep_out_buf;
	int ep_out_size;

	const struct firmware *fw;
	struct timer_list fw_timeout;
	wait_queue_head_t fw_wq;
	uint32_t fwseqnum;
	uint32_t totalbytes;
	uint32_t fwlastblksent;
	uint8_t CRC_OK;
	uint8_t fwdnldover;
	uint8_t fwfinalblk;

	__le16 boot2_version;
};

/** fwheader */
struct fwheader {
	__le32 dnldcmd;
	__le32 baseaddr;
	__le32 datalength;
	__le32 CRC;
};

#define FW_MAX_DATA_BLK_SIZE	600
/** FWData */
struct fwdata {
	struct fwheader hdr;
	__le32 seqnum;
	uint8_t data[];
};

/** fwsyncheader */
struct fwsyncheader {
	__le32 cmd;
	__le32 seqnum;
};

#define FW_HAS_DATA_TO_RECV		0x00000001
#define FW_HAS_LAST_BLOCK		0x00000004

Annotation

Implementation Notes