Commit 9e6f3f47 authored by Kristian Evensen's avatar Kristian Evensen Committed by John W. Linville

mwifiex: Add USB8766 support

Adds new VID/PID for the Marvell 88W8766. The kernel currently only supports
the device as PCI, but it is also available using USB. An example of a device
delivered with the 88W8766 as USB is the Globalscale Mirabox.

TX buffer size is set to driver default (2K), as we do not know the firmware
requirement.
Signed-off-by: default avatarKristian Evensen <kristian.evensen@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ac96ce83
...@@ -31,7 +31,7 @@ config MWIFIEX_PCIE ...@@ -31,7 +31,7 @@ config MWIFIEX_PCIE
mwifiex_pcie. mwifiex_pcie.
config MWIFIEX_USB config MWIFIEX_USB
tristate "Marvell WiFi-Ex Driver for USB8797/8897" tristate "Marvell WiFi-Ex Driver for USB8766/8797/8897"
depends on MWIFIEX && USB depends on MWIFIEX && USB
select FW_LOADER select FW_LOADER
---help--- ---help---
......
...@@ -27,6 +27,11 @@ static struct mwifiex_if_ops usb_ops; ...@@ -27,6 +27,11 @@ static struct mwifiex_if_ops usb_ops;
static struct semaphore add_remove_card_sem; static struct semaphore add_remove_card_sem;
static struct usb_device_id mwifiex_usb_table[] = { static struct usb_device_id mwifiex_usb_table[] = {
/* 8766 */
{USB_DEVICE(USB8XXX_VID, USB8766_PID_1)},
{USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8766_PID_2,
USB_CLASS_VENDOR_SPEC,
USB_SUBCLASS_VENDOR_SPEC, 0xff)},
/* 8797 */ /* 8797 */
{USB_DEVICE(USB8XXX_VID, USB8797_PID_1)}, {USB_DEVICE(USB8XXX_VID, USB8797_PID_1)},
{USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8797_PID_2, {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8797_PID_2,
...@@ -354,10 +359,12 @@ static int mwifiex_usb_probe(struct usb_interface *intf, ...@@ -354,10 +359,12 @@ static int mwifiex_usb_probe(struct usb_interface *intf,
/* PID_1 is used for firmware downloading only */ /* PID_1 is used for firmware downloading only */
switch (id_product) { switch (id_product) {
case USB8766_PID_1:
case USB8797_PID_1: case USB8797_PID_1:
case USB8897_PID_1: case USB8897_PID_1:
card->usb_boot_state = USB8XXX_FW_DNLD; card->usb_boot_state = USB8XXX_FW_DNLD;
break; break;
case USB8766_PID_2:
case USB8797_PID_2: case USB8797_PID_2:
case USB8897_PID_2: case USB8897_PID_2:
card->usb_boot_state = USB8XXX_FW_READY; card->usb_boot_state = USB8XXX_FW_READY;
...@@ -786,6 +793,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -786,6 +793,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K; adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K;
strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME);
break; break;
case USB8766_PID_1:
case USB8766_PID_2:
adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
strcpy(adapter->fw_name, USB8766_DEFAULT_FW_NAME);
break;
case USB8797_PID_1: case USB8797_PID_1:
case USB8797_PID_2: case USB8797_PID_2:
default: default:
...@@ -1060,5 +1072,6 @@ MODULE_AUTHOR("Marvell International Ltd."); ...@@ -1060,5 +1072,6 @@ MODULE_AUTHOR("Marvell International Ltd.");
MODULE_DESCRIPTION("Marvell WiFi-Ex USB Driver version" USB_VERSION); MODULE_DESCRIPTION("Marvell WiFi-Ex USB Driver version" USB_VERSION);
MODULE_VERSION(USB_VERSION); MODULE_VERSION(USB_VERSION);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_FIRMWARE(USB8766_DEFAULT_FW_NAME);
MODULE_FIRMWARE(USB8797_DEFAULT_FW_NAME); MODULE_FIRMWARE(USB8797_DEFAULT_FW_NAME);
MODULE_FIRMWARE(USB8897_DEFAULT_FW_NAME); MODULE_FIRMWARE(USB8897_DEFAULT_FW_NAME);
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#define USB8XXX_VID 0x1286 #define USB8XXX_VID 0x1286
#define USB8766_PID_1 0x2041
#define USB8766_PID_2 0x2042
#define USB8797_PID_1 0x2043 #define USB8797_PID_1 0x2043
#define USB8797_PID_2 0x2044 #define USB8797_PID_2 0x2044
#define USB8897_PID_1 0x2045 #define USB8897_PID_1 0x2045
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
#define MWIFIEX_RX_DATA_URB 6 #define MWIFIEX_RX_DATA_URB 6
#define MWIFIEX_USB_TIMEOUT 100 #define MWIFIEX_USB_TIMEOUT 100
#define USB8766_DEFAULT_FW_NAME "mrvl/usb8766_uapsta.bin"
#define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin" #define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin"
#define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin" #define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment