Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202847
b: refs/heads/master
c: b176286
h: refs/heads/master
i:
  202845: 797c70d
  202843: 6adf78d
  202839: 7796ff1
  202831: 7766b86
  202815: 8f036d8
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Jun 4, 2010
1 parent 5e06e5d commit 7ad27d0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbba8cd101c1230284ee46629c841481f7c34b68
refs/heads/master: b176286276f85e10e8ab3342730c5e39e1ce460b
15 changes: 14 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
static struct usb_device_id ath9k_hif_usb_ids[] = {
{ USB_DEVICE(0x0cf3, 0x9271) },
{ USB_DEVICE(0x0cf3, 0x1006) },
{ USB_DEVICE(0x0cf3, 0x7010) },
{ },
};

Expand Down Expand Up @@ -753,6 +754,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
size_t len = hif_dev->firmware->size;
u32 addr = AR9271_FIRMWARE;
u8 *buf = kzalloc(4096, GFP_KERNEL);
u32 firm_offset;

if (!buf)
return -ENOMEM;
Expand All @@ -776,13 +778,18 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
}
kfree(buf);

if (hif_dev->device_id == 0x7010)
firm_offset = AR7010_FIRMWARE_TEXT;
else
firm_offset = AR9271_FIRMWARE_TEXT;

/*
* Issue FW download complete command to firmware.
*/
err = usb_control_msg(hif_dev->udev, usb_sndctrlpipe(hif_dev->udev, 0),
FIRMWARE_DOWNLOAD_COMP,
0x40 | USB_DIR_OUT,
AR9271_FIRMWARE_TEXT >> 8, 0, NULL, 0, HZ);
firm_offset >> 8, 0, NULL, 0, HZ);
if (err)
return -EIO;

Expand Down Expand Up @@ -876,6 +883,12 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
case 0x1006:
hif_dev->fw_name = "ar9271.fw";
break;
case 0x7010:
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
hif_dev->fw_name = "ar7010_1_1.fw";
else
hif_dev->fw_name = "ar7010.fw";
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hif_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#define AR9271_FIRMWARE 0x501000
#define AR9271_FIRMWARE_TEXT 0x903000
#define AR7010_FIRMWARE_TEXT 0x906000

#define FIRMWARE_DOWNLOAD 0x30
#define FIRMWARE_DOWNLOAD_COMP 0x31
Expand Down

0 comments on commit 7ad27d0

Please sign in to comment.