diff options
author | Kristian Evensen <kristian.evensen@gmail.com> | 2014-11-20 10:52:58 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-11-20 16:14:39 -0500 |
commit | 9e6f3f472c8f95021ad048acc7cd3e40a827f8ce (patch) | |
tree | 7b2e0b66b2f078ba08ad034f794161d25dcfd820 | |
parent | ac96ce83ff21c9338afa0e81baabd902d9350015 (diff) |
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: Kristian Evensen <kristian.evensen@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/usb.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/usb.h | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/Kconfig b/drivers/net/wireless/mwifiex/Kconfig index e70d0df9b0da..aa01c9bc77f9 100644 --- a/drivers/net/wireless/mwifiex/Kconfig +++ b/drivers/net/wireless/mwifiex/Kconfig | |||
@@ -31,7 +31,7 @@ config MWIFIEX_PCIE | |||
31 | mwifiex_pcie. | 31 | mwifiex_pcie. |
32 | 32 | ||
33 | config MWIFIEX_USB | 33 | config MWIFIEX_USB |
34 | tristate "Marvell WiFi-Ex Driver for USB8797/8897" | 34 | tristate "Marvell WiFi-Ex Driver for USB8766/8797/8897" |
35 | depends on MWIFIEX && USB | 35 | depends on MWIFIEX && USB |
36 | select FW_LOADER | 36 | select FW_LOADER |
37 | ---help--- | 37 | ---help--- |
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c index 6cc8519c0f40..1b56495ec872 100644 --- a/drivers/net/wireless/mwifiex/usb.c +++ b/drivers/net/wireless/mwifiex/usb.c | |||
@@ -27,6 +27,11 @@ static struct mwifiex_if_ops usb_ops; | |||
27 | static struct semaphore add_remove_card_sem; | 27 | static struct semaphore add_remove_card_sem; |
28 | 28 | ||
29 | static struct usb_device_id mwifiex_usb_table[] = { | 29 | static struct usb_device_id mwifiex_usb_table[] = { |
30 | /* 8766 */ | ||
31 | {USB_DEVICE(USB8XXX_VID, USB8766_PID_1)}, | ||
32 | {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8766_PID_2, | ||
33 | USB_CLASS_VENDOR_SPEC, | ||
34 | USB_SUBCLASS_VENDOR_SPEC, 0xff)}, | ||
30 | /* 8797 */ | 35 | /* 8797 */ |
31 | {USB_DEVICE(USB8XXX_VID, USB8797_PID_1)}, | 36 | {USB_DEVICE(USB8XXX_VID, USB8797_PID_1)}, |
32 | {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8797_PID_2, | 37 | {USB_DEVICE_AND_INTERFACE_INFO(USB8XXX_VID, USB8797_PID_2, |
@@ -354,10 +359,12 @@ static int mwifiex_usb_probe(struct usb_interface *intf, | |||
354 | 359 | ||
355 | /* PID_1 is used for firmware downloading only */ | 360 | /* PID_1 is used for firmware downloading only */ |
356 | switch (id_product) { | 361 | switch (id_product) { |
362 | case USB8766_PID_1: | ||
357 | case USB8797_PID_1: | 363 | case USB8797_PID_1: |
358 | case USB8897_PID_1: | 364 | case USB8897_PID_1: |
359 | card->usb_boot_state = USB8XXX_FW_DNLD; | 365 | card->usb_boot_state = USB8XXX_FW_DNLD; |
360 | break; | 366 | break; |
367 | case USB8766_PID_2: | ||
361 | case USB8797_PID_2: | 368 | case USB8797_PID_2: |
362 | case USB8897_PID_2: | 369 | case USB8897_PID_2: |
363 | card->usb_boot_state = USB8XXX_FW_READY; | 370 | card->usb_boot_state = USB8XXX_FW_READY; |
@@ -786,6 +793,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) | |||
786 | adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K; | 793 | adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K; |
787 | strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); | 794 | strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); |
788 | break; | 795 | break; |
796 | case USB8766_PID_1: | ||
797 | case USB8766_PID_2: | ||
798 | adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K; | ||
799 | strcpy(adapter->fw_name, USB8766_DEFAULT_FW_NAME); | ||
800 | break; | ||
789 | case USB8797_PID_1: | 801 | case USB8797_PID_1: |
790 | case USB8797_PID_2: | 802 | case USB8797_PID_2: |
791 | default: | 803 | default: |
@@ -1060,5 +1072,6 @@ MODULE_AUTHOR("Marvell International Ltd."); | |||
1060 | MODULE_DESCRIPTION("Marvell WiFi-Ex USB Driver version" USB_VERSION); | 1072 | MODULE_DESCRIPTION("Marvell WiFi-Ex USB Driver version" USB_VERSION); |
1061 | MODULE_VERSION(USB_VERSION); | 1073 | MODULE_VERSION(USB_VERSION); |
1062 | MODULE_LICENSE("GPL v2"); | 1074 | MODULE_LICENSE("GPL v2"); |
1075 | MODULE_FIRMWARE(USB8766_DEFAULT_FW_NAME); | ||
1063 | MODULE_FIRMWARE(USB8797_DEFAULT_FW_NAME); | 1076 | MODULE_FIRMWARE(USB8797_DEFAULT_FW_NAME); |
1064 | MODULE_FIRMWARE(USB8897_DEFAULT_FW_NAME); | 1077 | MODULE_FIRMWARE(USB8897_DEFAULT_FW_NAME); |
diff --git a/drivers/net/wireless/mwifiex/usb.h b/drivers/net/wireless/mwifiex/usb.h index 4c41c2a193c5..a7cbba1355af 100644 --- a/drivers/net/wireless/mwifiex/usb.h +++ b/drivers/net/wireless/mwifiex/usb.h | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #define USB8XXX_VID 0x1286 | 25 | #define USB8XXX_VID 0x1286 |
26 | 26 | ||
27 | #define USB8766_PID_1 0x2041 | ||
28 | #define USB8766_PID_2 0x2042 | ||
27 | #define USB8797_PID_1 0x2043 | 29 | #define USB8797_PID_1 0x2043 |
28 | #define USB8797_PID_2 0x2044 | 30 | #define USB8797_PID_2 0x2044 |
29 | #define USB8897_PID_1 0x2045 | 31 | #define USB8897_PID_1 0x2045 |
@@ -37,6 +39,7 @@ | |||
37 | #define MWIFIEX_RX_DATA_URB 6 | 39 | #define MWIFIEX_RX_DATA_URB 6 |
38 | #define MWIFIEX_USB_TIMEOUT 100 | 40 | #define MWIFIEX_USB_TIMEOUT 100 |
39 | 41 | ||
42 | #define USB8766_DEFAULT_FW_NAME "mrvl/usb8766_uapsta.bin" | ||
40 | #define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin" | 43 | #define USB8797_DEFAULT_FW_NAME "mrvl/usb8797_uapsta.bin" |
41 | #define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin" | 44 | #define USB8897_DEFAULT_FW_NAME "mrvl/usb8897_uapsta.bin" |
42 | 45 | ||