2 * This file contains definitions for mwifiex USB interface driver.
4 * Copyright (C) 2012-2014, Marvell International Ltd.
6 * This software file (the "File") is distributed by Marvell International
7 * Ltd. under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
20 #ifndef _MWIFIEX_USB_H
21 #define _MWIFIEX_USB_H
23 #include <linux/usb.h>
25 #define USB8XXX_VID 0x1286
27 #define USB8766_PID_1 0x2041
28 #define USB8766_PID_2 0x2042
29 #define USB8797_PID_1 0x2043
30 #define USB8797_PID_2 0x2044
31 #define USB8897_PID_1 0x2045
32 #define USB8897_PID_2 0x2046
34 #define USB8XXX_FW_DNLD 1
35 #define USB8XXX_FW_READY 2
36 #define USB8XXX_FW_MAX_RETRY 3
38 #define MWIFIEX_TX_DATA_URB 6
39 #define MWIFIEX_RX_DATA_URB 6
40 #define MWIFIEX_USB_TIMEOUT 100
42 #define USB8766_DEFAULT_FW_NAME "mrvl/usb8766_uapsta.bin"
43 #define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin"
44 #define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin"
46 #define FW_DNLD_TX_BUF_SIZE 620
47 #define FW_DNLD_RX_BUF_SIZE 2048
48 #define FW_HAS_LAST_BLOCK 0x00000004
50 #define FW_DATA_XMIT_SIZE \
51 (sizeof(struct fw_header) + dlen + sizeof(u32))
54 struct mwifiex_adapter *adapter;
61 struct mwifiex_adapter *adapter;
62 struct usb_device *udev;
63 struct usb_interface *intf;
65 struct urb_context rx_cmd;
66 atomic_t rx_cmd_urb_pending;
67 struct urb_context rx_data_list[MWIFIEX_RX_DATA_URB];
70 atomic_t rx_data_urb_pending;
73 atomic_t tx_data_urb_pending;
74 atomic_t tx_cmd_urb_pending;
75 int bulk_out_maxpktsize;
76 struct urb_context tx_cmd;
78 struct urb_context tx_data_list[MWIFIEX_TX_DATA_URB];
88 struct fw_sync_header {
94 struct fw_header fw_hdr;
99 /* This function is called after the card has woken up. */
101 mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
106 #endif /*_MWIFIEX_USB_H */