diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2010-12-07 16:31:38 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 17:08:06 -0500 |
commit | 0b5ead91cda63e0db964dadc77601233434f60cb (patch) | |
tree | 989e877003120c769f8d155dee129033f96029f2 /drivers/net/wireless/ath/ath9k/hif_usb.c | |
parent | c658e5db01117bf2a321a9a782754dd5b10e2f15 (diff) | |
download | blackbird-op-linux-0b5ead91cda63e0db964dadc77601233434f60cb.tar.gz blackbird-op-linux-0b5ead91cda63e0db964dadc77601233434f60cb.zip |
ath9k_htc: Cleanup device identification
ath.ko is a common module shared between ath5k, ar9170usb, ath9k and ath9k_htc.
Adding driver specific data to the shared structure would impact all the
drivers. Handling USB device recognition for devices specific to ath9k_htc
can be handled within the driver itself.
Also, AR7010 refers to the processor used in both AR9280/AR9287 based
devices. Rename the device enumerations accordingly.
While at it, check properly for the bus type when choosing the EEPROM
base address for UB95.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8946e8ad1b85..cc1e5b3444a4 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -28,16 +28,7 @@ MODULE_FIRMWARE(FIRMWARE_AR9271); static struct usb_device_id ath9k_hif_usb_ids[] = { { USB_DEVICE(0x0cf3, 0x9271) }, /* Atheros */ { USB_DEVICE(0x0cf3, 0x1006) }, /* Atheros */ - { USB_DEVICE(0x0cf3, 0x7010), - .driver_info = AR7010_DEVICE }, - /* Atheros */ - { USB_DEVICE(0x0cf3, 0x7015), - .driver_info = AR7010_DEVICE | AR9287_DEVICE }, - /* Atheros */ { USB_DEVICE(0x0846, 0x9030) }, /* Netgear N150 */ - { USB_DEVICE(0x0846, 0x9018), - .driver_info = AR7010_DEVICE }, - /* Netgear WNDA3200 */ { USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */ { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ @@ -46,13 +37,20 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { { USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */ { USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */ { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ - { USB_DEVICE(0x083A, 0xA704), - .driver_info = AR7010_DEVICE }, - /* SMC Networks */ { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ + + { USB_DEVICE(0x0cf3, 0x7015), + .driver_info = AR9287_USB }, /* Atheros */ { USB_DEVICE(0x1668, 0x1200), - .driver_info = AR7010_DEVICE | AR9287_DEVICE }, - /* Verizon */ + .driver_info = AR9287_USB }, /* Verizon */ + + { USB_DEVICE(0x0cf3, 0x7010), + .driver_info = AR9280_USB }, /* Atheros */ + { USB_DEVICE(0x0846, 0x9018), + .driver_info = AR9280_USB }, /* Netgear WNDA3200 */ + { USB_DEVICE(0x083A, 0xA704), + .driver_info = AR9280_USB }, /* SMC Networks */ + { }, }; @@ -818,7 +816,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev, } kfree(buf); - if (drv_info & AR7010_DEVICE) + if (IS_AR7010_DEVICE(drv_info)) firm_offset = AR7010_FIRMWARE_TEXT; else firm_offset = AR9271_FIRMWARE_TEXT; @@ -934,7 +932,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, /* Find out which firmware to load */ - if (id->driver_info & AR7010_DEVICE) + if (IS_AR7010_DEVICE(id->driver_info)) if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) hif_dev->fw_name = FIRMWARE_AR7010_1_1; else @@ -1034,7 +1032,7 @@ static int ath9k_hif_usb_resume(struct usb_interface *interface) if (hif_dev->firmware) { ret = ath9k_hif_usb_download_fw(hif_dev, - htc_handle->drv_priv->ah->common.driver_info); + htc_handle->drv_priv->ah->hw_version.usbdev); if (ret) goto fail_resume; } else { |