aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/usb.h')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.h b/drivers/net/wireless/brcm80211/brcmfmac/usb.h
new file mode 100644
index 000000000000..b31da7b83ff7
--- /dev/null
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.h
@@ -0,0 +1,84 @@
1/*
2 * Copyright (c) 2011 Broadcom Corporation
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16#ifndef BRCMFMAC_USB_H
17#define BRCMFMAC_USB_H
18
19enum brcmf_usb_state {
20 BCMFMAC_USB_STATE_DL_PENDING,
21 BCMFMAC_USB_STATE_DL_DONE,
22 BCMFMAC_USB_STATE_UP,
23 BCMFMAC_USB_STATE_DOWN,
24 BCMFMAC_USB_STATE_PNP_FWDL,
25 BCMFMAC_USB_STATE_DISCONNECT,
26 BCMFMAC_USB_STATE_SLEEP
27};
28
29enum brcmf_usb_pnp_state {
30 BCMFMAC_USB_PNP_DISCONNECT,
31 BCMFMAC_USB_PNP_SLEEP,
32 BCMFMAC_USB_PNP_RESUME,
33};
34
35struct brcmf_stats {
36 u32 tx_errors;
37 u32 tx_packets;
38 u32 tx_multicast;
39 u32 tx_ctlpkts;
40 u32 tx_ctlerrs;
41 u32 tx_dropped;
42 u32 tx_flushed;
43 u32 rx_errors;
44 u32 rx_packets;
45 u32 rx_multicast;
46 u32 rx_ctlpkts;
47 u32 rx_ctlerrs;
48 u32 rx_dropped;
49 u32 rx_flushed;
50
51};
52
53struct brcmf_usb_attrib {
54 int bustype;
55 int vid;
56 int pid;
57 int devid;
58 int chiprev; /* chip revsion number */
59 int mtu;
60 int nchan; /* Data Channels */
61 int has_2nd_bulk_in_ep;
62};
63
64struct brcmf_usbdev_info;
65
66struct brcmf_usbdev {
67 struct brcmf_bus *bus;
68 struct brcmf_usbdev_info *devinfo;
69 enum brcmf_usb_state state;
70 struct brcmf_stats stats;
71 int ntxq, nrxq, rxsize;
72 u32 bus_mtu;
73 struct brcmf_usb_attrib attrib;
74};
75
76/* IO Request Block (IRB) */
77struct brcmf_usbreq {
78 struct list_head list;
79 struct brcmf_usbdev_info *devinfo;
80 struct urb *urb;
81 struct sk_buff *skb;
82};
83
84#endif /* BRCMFMAC_USB_H */