2010-10-26 14:36:42

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH] ath9k_htc: Set proper firmware offset for AR7010 devices

This patch handles the firmware loading properly for
AR7010 HTC devices.

Signed-off-by: Rajkumar Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 728d904..6576f68 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -801,10 +801,16 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
}
kfree(buf);

- if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
+ switch (hif_dev->device_id) {
+ case 0x7010:
+ case 0x7015:
+ case 0x9018:
firm_offset = AR7010_FIRMWARE_TEXT;
- else
+ break;
+ default:
firm_offset = AR9271_FIRMWARE_TEXT;
+ break;
+ }

/*
* Issue FW download complete command to firmware.
--
1.7.3.2



2010-10-26 17:20:44

by Rajkumar Manoharan

[permalink] [raw]
Subject: RE: [PATCH] ath9k_htc: Set proper firmware offset for AR7010 devices

>On Tue, Oct 26, 2010 at 7:42 AM, Rajkumar Manoharan
><[email protected]> wrote:
>> This patch handles the firmware loading properly for
> >AR7010 HTC devices.

>This description is vague, you could have said instead that it treats
>0x9018 as a AR7010.
>
> Luis

0x9018 was already treated as AR7010 devices. But it is missed in firmware offset
selection. I'll resend the patch. Thanks for pointing out Luis :)

- Rajkumar

2010-10-26 15:42:44

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: Set proper firmware offset for AR7010 devices

On Tue, Oct 26, 2010 at 7:42 AM, Rajkumar Manoharan
<[email protected]> wrote:
> This patch handles the firmware loading properly for
> AR7010 HTC devices.

This description is vague, you could have said instead that it treats
0x9018 as a AR7010.

Luis

> Signed-off-by: Rajkumar Manoharan <[email protected]>
> ---
>  drivers/net/wireless/ath/ath9k/hif_usb.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 728d904..6576f68 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -801,10 +801,16 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
>        }
>        kfree(buf);
>
> -       if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
> +       switch (hif_dev->device_id) {
> +       case 0x7010:
> +       case 0x7015:
> +       case 0x9018:
>                firm_offset = AR7010_FIRMWARE_TEXT;
> -       else
> +               break;
> +       default:
>                firm_offset = AR9271_FIRMWARE_TEXT;
> +               break;
> +       }
>
>        /*
>         * Issue FW download complete command to firmware.
> --
> 1.7.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>