Skip to content

Commit ca6cff1

Browse files
Rajkumar Manoharanlinvjw
authored andcommitted
ath9k_htc: load proper firmware for device ID 7015
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>
1 parent fe0dbcc commit ca6cff1

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

drivers/net/wireless/ath/ath9k/eeprom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
#define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1
192192

193193
#define AR9287_EEP_START_LOC 128
194+
#define AR9287_HTC_EEP_START_LOC 256
194195
#define AR9287_NUM_2G_CAL_PIERS 3
195196
#define AR9287_NUM_2G_CCK_TARGET_POWERS 3
196197
#define AR9287_NUM_2G_20_TARGET_POWERS 3

drivers/net/wireless/ath/ath9k/eeprom_9287.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
3434
struct ar9287_eeprom *eep = &ah->eeprom.map9287;
3535
struct ath_common *common = ath9k_hw_common(ah);
3636
u16 *eep_data;
37-
int addr, eep_start_loc = AR9287_EEP_START_LOC;
37+
int addr, eep_start_loc;
3838
eep_data = (u16 *)eep;
3939

40+
if (ah->hw_version.devid == 0x7015)
41+
eep_start_loc = AR9287_HTC_EEP_START_LOC;
42+
else
43+
eep_start_loc = AR9287_EEP_START_LOC;
44+
4045
if (!ath9k_hw_use_flash(ah)) {
4146
ath_print(common, ATH_DBG_EEPROM,
4247
"Reading from EEPROM, not flash\n");

drivers/net/wireless/ath/ath9k/hif_usb.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
799799
}
800800
kfree(buf);
801801

802-
if (hif_dev->device_id == 0x7010)
802+
if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
803803
firm_offset = AR7010_FIRMWARE_TEXT;
804804
else
805805
firm_offset = AR9271_FIRMWARE_TEXT;
@@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
901901

902902
switch(hif_dev->device_id) {
903903
case 0x7010:
904+
case 0x7015:
904905
case 0x9018:
905906
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
906907
hif_dev->fw_name = FIRMWARE_AR7010_1_1;
@@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
912913
break;
913914
}
914915

915-
if (!hif_dev->fw_name) {
916-
dev_err(&udev->dev, "Can't determine firmware !\n");
917-
goto err_htc_hw_alloc;
918-
}
919-
920916
ret = ath9k_hif_usb_dev_init(hif_dev);
921917
if (ret) {
922918
ret = -EINVAL;

drivers/net/wireless/ath/ath9k/htc_drv_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
245245

246246
switch(devid) {
247247
case 0x7010:
248+
case 0x7015:
248249
case 0x9018:
249250
priv->htc->credits = 45;
250251
break;

drivers/net/wireless/ath/ath9k/reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@
899899

900900
#define AR_DEVID_7010(_ah) \
901901
(((_ah)->hw_version.devid == 0x7010) || \
902+
((_ah)->hw_version.devid == 0x7015) || \
902903
((_ah)->hw_version.devid == 0x9018))
903904

904905
#define AR_RADIO_SREV_MAJOR 0xf0

0 commit comments

Comments
 (0)