1 #ifndef _LIBERTAS_IF_USB_H
2 #define _LIBERTAS_IF_USB_H
4 #include <linux/list.h>
7 * This file contains definition for USB interface.
9 #define CMD_TYPE_REQUEST 0xF00DFACE
10 #define CMD_TYPE_DATA 0xBEADC0DE
11 #define CMD_TYPE_INDICATION 0xBEEFFACE
13 #define IPFIELD_ALIGN_OFFSET 2
15 #define BOOT_CMD_FW_BY_USB 0x01
16 #define BOOT_CMD_FW_IN_EEPROM 0x02
17 #define BOOT_CMD_UPDATE_BOOT2 0x03
18 #define BOOT_CMD_UPDATE_FW 0x04
19 #define BOOT_CMD_MAGIC_NUMBER 0x4C56524D /* M=>0x4D,R=>0x52,V=>0x56,L=>0x4C */
23 __le32 u32magicnumber
;
28 #define BOOT_CMD_RESP_OK 0x0001
29 #define BOOT_CMD_RESP_FAIL 0x0000
33 __le32 u32magicnumber
;
39 /* read callback private data */
41 struct usb_card_rec
*cardp
;
45 /** USB card description structure*/
47 struct list_head list
;
48 struct net_device
*eth_dev
;
49 struct usb_device
*udev
;
50 struct urb
*rx_urb
, *tx_urb
;
52 struct read_cb_info rinfo
;
55 u8 bulk_in_endpointAddr
;
59 u8 bulk_out_endpointAddr
;
61 const struct firmware
*fw
;
87 #define FW_MAX_DATA_BLK_SIZE 600
90 struct fwheader fwheader
;
92 u8 data
[FW_MAX_DATA_BLK_SIZE
];
101 #define FW_HAS_DATA_TO_RECV 0x00000001
102 #define FW_HAS_LAST_BLOCK 0x00000004
104 #define FW_DATA_XMIT_SIZE \
105 sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32)