linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates
@ 2008-09-28 22:24 Nick Kossifidis
  2008-10-05  0:37 ` Bob Copeland
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Kossifidis @ 2008-09-28 22:24 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless; +Cc: linville, jirislaby, mcgrof, me, nbd

 * Fix srev reporting during attach

 Changes-Licensed-under: ISC
 Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>

---
 drivers/net/wireless/ath5k/base.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index c8bb9bf..905076a 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -396,7 +396,11 @@ ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val)
 	for (i = 0; i < ARRAY_SIZE(srev_names); i++) {
 		if (srev_names[i].sr_type != type)
 			continue;
-		if ((val & 0xff) < srev_names[i + 1].sr_val) {
+
+		if ((val & 0xf0) == srev_names[i].sr_val)
+			name = srev_names[i].sr_name;
+
+		if ((val & 0xff) == srev_names[i].sr_val) {
 			name = srev_names[i].sr_name;
 			break;
 		}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates
  2008-09-28 22:24 [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates Nick Kossifidis
@ 2008-10-05  0:37 ` Bob Copeland
  2008-10-05  1:02   ` Luis R. Rodriguez
  2008-10-05  1:25   ` [ath5k-devel] " Nick Kossifidis
  0 siblings, 2 replies; 5+ messages in thread
From: Bob Copeland @ 2008-10-05  0:37 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless, linville, jirislaby, mcgrof, nbd

On Mon, Sep 29, 2008 at 01:24:44AM +0300, Nick Kossifidis wrote:
>  * Fix srev reporting during attach
> 
>  Changes-Licensed-under: ISC
>  Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>

This now identifies my card as 5414, whereas ath5k used to call it 5424 
(mac srev 0xa3, phy 0x61).  

But, madwifi has:
 #define AR5K_SREV_VER_AR5424     0xa3 /* PCI-E */

It still works so not a major problem, but who's right?

> @@ -396,7 +396,11 @@ ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val)
>  	for (i = 0; i < ARRAY_SIZE(srev_names); i++) {
>  		if (srev_names[i].sr_type != type)
>  			continue;
> -		if ((val & 0xff) < srev_names[i + 1].sr_val) {
> +
> +		if ((val & 0xf0) == srev_names[i].sr_val)
> +			name = srev_names[i].sr_name;
> +
> +		if ((val & 0xff) == srev_names[i].sr_val) {
>  			name = srev_names[i].sr_name;
>  			break;
>  		}
> 

-- 
Bob Copeland %% www.bobcopeland.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates
  2008-10-05  0:37 ` Bob Copeland
@ 2008-10-05  1:02   ` Luis R. Rodriguez
  2008-10-05  1:25   ` [ath5k-devel] " Nick Kossifidis
  1 sibling, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2008-10-05  1:02 UTC (permalink / raw)
  To: Bob Copeland; +Cc: ath5k-devel, linux-wireless, linville, jirislaby, nbd

On Sat, Oct 4, 2008 at 5:37 PM, Bob Copeland <me@bobcopeland.com> wrote:
> On Mon, Sep 29, 2008 at 01:24:44AM +0300, Nick Kossifidis wrote:
>>  * Fix srev reporting during attach
>>
>>  Changes-Licensed-under: ISC
>>  Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
>
> This now identifies my card as 5414, whereas ath5k used to call it 5424
> (mac srev 0xa3, phy 0x61).
>
> But, madwifi has:
>  #define AR5K_SREV_VER_AR5424     0xa3 /* PCI-E */
>
> It still works so not a major problem, but who's right?

Since legacy-hal.tar.bz2 comes directly from our latest codebase I
expect that to have the latest correct information. If there are
doubts that is another thing and we can look into it.

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ath5k-devel] [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates
  2008-10-05  0:37 ` Bob Copeland
  2008-10-05  1:02   ` Luis R. Rodriguez
@ 2008-10-05  1:25   ` Nick Kossifidis
  2008-10-05  1:34     ` Luis R. Rodriguez
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Kossifidis @ 2008-10-05  1:25 UTC (permalink / raw)
  To: Bob Copeland
  Cc: ath5k-devel, linux-wireless, linville, jirislaby, mcgrof, nbd

2008/10/5 Bob Copeland <me@bobcopeland.com>:
> On Mon, Sep 29, 2008 at 01:24:44AM +0300, Nick Kossifidis wrote:
>>  * Fix srev reporting during attach
>>
>>  Changes-Licensed-under: ISC
>>  Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
>
> This now identifies my card as 5414, whereas ath5k used to call it 5424
> (mac srev 0xa3, phy 0x61).
>
> But, madwifi has:
>  #define AR5K_SREV_VER_AR5424     0xa3 /* PCI-E */
>
> It still works so not a major problem, but who's right?
>
>> @@ -396,7 +396,11 @@ ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val)
>>       for (i = 0; i < ARRAY_SIZE(srev_names); i++) {
>>               if (srev_names[i].sr_type != type)
>>                       continue;
>> -             if ((val & 0xff) < srev_names[i + 1].sr_val) {
>> +
>> +             if ((val & 0xf0) == srev_names[i].sr_val)
>> +                     name = srev_names[i].sr_name;
>> +
>> +             if ((val & 0xff) == srev_names[i].sr_val) {
>>                       name = srev_names[i].sr_name;
>>                       break;
>>               }
>>
>

Well acording to legacy-hal (ar5212reg.h):

5424 (condor) version = 9
5414 (eagle) version = 10
Yours is 0xa0 -> 5414

5424 radio version = 0xa0
5414 radio version = 0x60
yours is 0x61 -> 5414

It's also weird to me, since 5414 is pci/mini-pci and 5424 is pci-e
and even if OEMs just made 5414s with pci-e support (eg. with a
pci2pci-e bridge) and branded them as 5424s or something like that,
then your chip shouldn't have problem when reseting pci core so i
guess there is a 5414 version that has pci-e HIU. They both belong to
AR5006 series btw so they have the known pci-id mess.

I got the srev values used before legacy-hal by doing a search on logs
on madwifi's trac so they seem to match user reports but i guess
legacy-hal is more accurate. For the driver 5424 is 5414 with some
pci-e extras (power saving etc).

Luis Is there a pci-e version of 5414 ? Is 5424 the pci-e version of
5414 or it's another chip ?

-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ath5k-devel] [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates
  2008-10-05  1:25   ` [ath5k-devel] " Nick Kossifidis
@ 2008-10-05  1:34     ` Luis R. Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2008-10-05  1:34 UTC (permalink / raw)
  To: Nick Kossifidis
  Cc: Bob Copeland, ath5k-devel, linux-wireless, linville, jirislaby,
	nbd

On Sat, Oct 4, 2008 at 6:25 PM, Nick Kossifidis <mickflemm@gmail.com>
> Luis Is there a pci-e version of 5414 ? Is 5424 the pci-e version of
> 5414 or it's another chip ?

I am not sure, I'll  have to check or ask.

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-05  1:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 22:24 [PATCH 4/5] ath5k: Fix SREV reporting after SREV updates Nick Kossifidis
2008-10-05  0:37 ` Bob Copeland
2008-10-05  1:02   ` Luis R. Rodriguez
2008-10-05  1:25   ` [ath5k-devel] " Nick Kossifidis
2008-10-05  1:34     ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).