]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ath9k_htc: load proper firmware for device ID 7015
authorRajkumar Manoharan <rmanoharan@atheros.com>
Fri, 13 Aug 2010 13:06:40 +0000 (18:36 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 13 Aug 2010 17:46:20 +0000 (13:46 -0400)
This patch handles the firmware loading properly
for device ID 7015.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/eeprom.h
drivers/net/wireless/ath/ath9k/eeprom_9287.c
drivers/net/wireless/ath/ath9k/hif_usb.c
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/reg.h

index 8750c558c221658302c18fabff9a25f83906b730..7f48df1e2903008f0a68bf991817bee64edf5b81 100644 (file)
 #define AR9287_EEP_NO_BACK_VER       AR9287_EEP_MINOR_VER_1
 
 #define AR9287_EEP_START_LOC            128
+#define AR9287_HTC_EEP_START_LOC        256
 #define AR9287_NUM_2G_CAL_PIERS         3
 #define AR9287_NUM_2G_CCK_TARGET_POWERS 3
 #define AR9287_NUM_2G_20_TARGET_POWERS  3
index 4a52cf03808b1aa207acb02fdd1f0394c38b73fa..dff2da777312bbb0e5b1c8902b370e79c41f75b4 100644 (file)
@@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
        struct ar9287_eeprom *eep = &ah->eeprom.map9287;
        struct ath_common *common = ath9k_hw_common(ah);
        u16 *eep_data;
-       int addr, eep_start_loc = AR9287_EEP_START_LOC;
+       int addr, eep_start_loc;
        eep_data = (u16 *)eep;
 
+       if (ah->hw_version.devid == 0x7015)
+               eep_start_loc = AR9287_HTC_EEP_START_LOC;
+       else
+               eep_start_loc = AR9287_EEP_START_LOC;
+
        if (!ath9k_hw_use_flash(ah)) {
                ath_print(common, ATH_DBG_EEPROM,
                          "Reading from EEPROM, not flash\n");
index 61c1bee3f26a1159b6ac869e621d1573e0250f5c..17e7a9a367e70340a42d13c57beb167bfd4979d3 100644 (file)
@@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
        }
        kfree(buf);
 
-       if (hif_dev->device_id == 0x7010)
+       if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
                firm_offset = AR7010_FIRMWARE_TEXT;
        else
                firm_offset = AR9271_FIRMWARE_TEXT;
@@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
 
        switch(hif_dev->device_id) {
        case 0x7010:
+       case 0x7015:
        case 0x9018:
                if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
                        hif_dev->fw_name = FIRMWARE_AR7010_1_1;
@@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
                break;
        }
 
-       if (!hif_dev->fw_name) {
-               dev_err(&udev->dev, "Can't determine firmware !\n");
-               goto err_htc_hw_alloc;
-       }
-
        ret = ath9k_hif_usb_dev_init(hif_dev);
        if (ret) {
                ret = -EINVAL;
index 148b43317fdb1d6b78502ff42d208b197be28c33..2d4279191d7a7d6d1690d12a809cf9eb6dd8ef8a 100644 (file)
@@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
 
        switch(devid) {
        case 0x7010:
+       case 0x7015:
        case 0x9018:
                priv->htc->credits = 45;
                break;
index 633e3d949ec09f172fab67d797ab449a557ae4f1..d01c4adab8d67bef80e37dce242c668210a783b4 100644 (file)
 
 #define AR_DEVID_7010(_ah) \
        (((_ah)->hw_version.devid == 0x7010) || \
+        ((_ah)->hw_version.devid == 0x7015) || \
         ((_ah)->hw_version.devid == 0x9018))
 
 #define AR_RADIO_SREV_MAJOR                   0xf0