acxpci.h: include struct acx_device but \#if 0 it
[acx-mac80211.git] / acxusb.h
blobc426bc19ab919d4db1f7b42ae32d87be2e7d78d2
1 #ifndef _ACXUSB_H_
2 #define _ACXUSB_H_
4 /*
5 * acxusb.h: USB specific constants and structures.
7 * Copyright (c) 2008 Francis Galiegue <fgaliegue@gmail.com> for the ACX100
8 * driver project.
10 * This file is licensed under the GPLv2. See the README file for details.
12 #ifdef ACX_MAC80211_USB
14 /* Used for usb_txbuffer.desc field */
15 #define USB_TXBUF_TXDESC 0xA
16 /* Size of header (everything up to data[]) */
17 #define USB_TXBUF_HDRSIZE 14
18 typedef struct usb_txbuffer {
19 u16 desc;
20 u16 mpdu_len;
21 u8 queue_index;
22 u8 rate;
23 u32 hostdata;
24 u8 ctrl1;
25 u8 ctrl2;
26 u16 data_len;
27 /* wlan packet content is placed here: */
28 u8 data[30 + 2312 + 4]; /*WLAN_A4FR_MAXLEN_WEP_FCS]*/
29 } __attribute__ ((packed)) usb_txbuffer_t;
31 /* USB returns either rx packets (see rxbuffer) or
32 ** these "tx status" structs: */
33 typedef struct usb_txstatus {
34 u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
35 u8 queue_index;
36 u8 mac_status; /* seen 0x20 on tx failure */
37 u32 hostdata;
38 u8 rate;
39 u8 ack_failures;
40 u8 rts_failures;
41 u8 rts_ok;
42 // struct ieee80211_tx_status txstatus;
43 // struct sk_buff *skb;
44 } __attribute__ ((packed)) usb_txstatus_t;
46 typedef struct usb_tx {
47 unsigned busy:1;
48 struct urb *urb;
49 acx_device_t *adev;
50 /* actual USB bulk output data block is here: */
51 usb_txbuffer_t bulkout;
52 } usb_tx_t;
54 struct usb_rx_plain {
55 unsigned busy:1;
56 struct urb *urb;
57 acx_device_t *adev;
58 rxbuffer_t bulkin;
61 typedef struct usb_rx {
62 unsigned busy:1;
63 struct urb *urb;
64 acx_device_t *adev;
65 rxbuffer_t bulkin;
66 /* Make entire structure 4k */
67 u8 padding[4*1024 - sizeof(struct usb_rx_plain)];
68 } usb_rx_t;
69 #endif /* ACX_USB */
70 #endif /* _ACXUSB_H_ */