* [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
@ 2009-11-09 21:59 Gertjan van Wingerde
2009-11-10 18:33 ` Ivo van Doorn
2009-11-11 22:07 ` John W. Linville
0 siblings, 2 replies; 7+ messages in thread
From: Gertjan van Wingerde @ 2009-11-09 21:59 UTC (permalink / raw)
To: users, linux-wireless
Cc: Ivo van Doorn, Bartlomiej Zolnierkiewicz, Gertjan van Wingerde
Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
devices.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2c91c44..446087e 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
unsigned int tx_pin;
u8 bbp;
- if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
- rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
- else
+ if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
+ (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
+ rt2x00_rf(&rt2x00dev->chip, RF3020) ||
+ rt2x00_rf(&rt2x00dev->chip, RF3021) ||
+ rt2x00_rf(&rt2x00dev->chip, RF3022)))
rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
+ else
+ rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
/*
* Change BBP settings
--
1.6.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
2009-11-09 21:59 Gertjan van Wingerde
@ 2009-11-10 18:33 ` Ivo van Doorn
2009-11-11 22:07 ` John W. Linville
1 sibling, 0 replies; 7+ messages in thread
From: Ivo van Doorn @ 2009-11-10 18:33 UTC (permalink / raw)
To: Gertjan van Wingerde; +Cc: users, linux-wireless, Bartlomiej Zolnierkiewicz
On Monday 09 November 2009, Gertjan van Wingerde wrote:
> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
> devices.
>
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 2c91c44..446087e 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> unsigned int tx_pin;
> u8 bbp;
>
> - if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
> - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
> - else
> + if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
> + (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3020) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3021) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3022)))
> rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
> + else
> + rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>
> /*
> * Change BBP settings
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
2009-11-09 21:59 Gertjan van Wingerde
2009-11-10 18:33 ` Ivo van Doorn
@ 2009-11-11 22:07 ` John W. Linville
2009-11-11 23:22 ` Gertjan van Wingerde
1 sibling, 1 reply; 7+ messages in thread
From: John W. Linville @ 2009-11-11 22:07 UTC (permalink / raw)
To: Gertjan van Wingerde
Cc: users, linux-wireless, Ivo van Doorn, Bartlomiej Zolnierkiewicz
On Mon, Nov 09, 2009 at 10:59:58PM +0100, Gertjan van Wingerde wrote:
> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
> devices.
>
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 2c91c44..446087e 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> unsigned int tx_pin;
> u8 bbp;
>
> - if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
> - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
> - else
> + if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
> + (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3020) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3021) ||
> + rt2x00_rf(&rt2x00dev->chip, RF3022)))
> rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
> + else
> + rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>
> /*
> * Change BBP settings
CC [M] drivers/net/wireless/rt2x00/rt2800lib.o
drivers/net/wireless/rt2x00/rt2800lib.c: In function ‘rt2800_config_channel’:
drivers/net/wireless/rt2x00/rt2800lib.c:809: error: ‘RF3070’ undeclared (first use in this function)
drivers/net/wireless/rt2x00/rt2800lib.c:809: error: (Each undeclared identifier is reported only once
drivers/net/wireless/rt2x00/rt2800lib.c:809: error: for each function it appears in.)
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
2009-11-11 22:07 ` John W. Linville
@ 2009-11-11 23:22 ` Gertjan van Wingerde
2009-11-11 23:35 ` John W. Linville
0 siblings, 1 reply; 7+ messages in thread
From: Gertjan van Wingerde @ 2009-11-11 23:22 UTC (permalink / raw)
To: John W. Linville
Cc: users, linux-wireless, Ivo van Doorn, Bartlomiej Zolnierkiewicz
On 11/11/09 23:07, John W. Linville wrote:
> On Mon, Nov 09, 2009 at 10:59:58PM +0100, Gertjan van Wingerde wrote:
>> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
>> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
>> devices.
>>
>> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>> ---
>> drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
>> 1 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
>> index 2c91c44..446087e 100644
>> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
>> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
>> @@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>> unsigned int tx_pin;
>> u8 bbp;
>>
>> - if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
>> - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>> - else
>> + if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
>> + (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
>> + rt2x00_rf(&rt2x00dev->chip, RF3020) ||
>> + rt2x00_rf(&rt2x00dev->chip, RF3021) ||
>> + rt2x00_rf(&rt2x00dev->chip, RF3022)))
>> rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
>> + else
>> + rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>>
>> /*
>> * Change BBP settings
>
> CC [M] drivers/net/wireless/rt2x00/rt2800lib.o
> drivers/net/wireless/rt2x00/rt2800lib.c: In function ‘rt2800_config_channel’:
> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: ‘RF3070’ undeclared (first use in this function)
> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: (Each undeclared identifier is reported only once
> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: for each function it appears in.)
>
Me very confused here. This patch doesn't even introduce the RF3070 symbol, nor can I see where it is used.
It does use symbol RT3070 on line 809, but that one is introduced in an earlier patch.
Ah, did you apply the RT3070 USB chipset detection patch before this one?
Still wouldn't explain the compile error on symbol RF3070 though.
---
Gertjan.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
2009-11-11 23:22 ` Gertjan van Wingerde
@ 2009-11-11 23:35 ` John W. Linville
2009-11-12 0:03 ` Gertjan van Wingerde
0 siblings, 1 reply; 7+ messages in thread
From: John W. Linville @ 2009-11-11 23:35 UTC (permalink / raw)
To: Gertjan van Wingerde
Cc: users, linux-wireless, Ivo van Doorn, Bartlomiej Zolnierkiewicz
On Thu, Nov 12, 2009 at 12:22:26AM +0100, Gertjan van Wingerde wrote:
> On 11/11/09 23:07, John W. Linville wrote:
> > On Mon, Nov 09, 2009 at 10:59:58PM +0100, Gertjan van Wingerde wrote:
> >> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
> >> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
> >> devices.
> >>
> >> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
> >> ---
> >> drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
> >> 1 files changed, 7 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> >> index 2c91c44..446087e 100644
> >> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> >> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> >> @@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> >> unsigned int tx_pin;
> >> u8 bbp;
> >>
> >> - if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
> >> - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
> >> - else
> >> + if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
> >> + (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
> >> + rt2x00_rf(&rt2x00dev->chip, RF3020) ||
> >> + rt2x00_rf(&rt2x00dev->chip, RF3021) ||
> >> + rt2x00_rf(&rt2x00dev->chip, RF3022)))
> >> rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
> >> + else
> >> + rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
> >>
> >> /*
> >> * Change BBP settings
> >
> > CC [M] drivers/net/wireless/rt2x00/rt2800lib.o
> > drivers/net/wireless/rt2x00/rt2800lib.c: In function ‘rt2800_config_channel’:
> > drivers/net/wireless/rt2x00/rt2800lib.c:809: error: ‘RF3070’ undeclared (first use in this function)
> > drivers/net/wireless/rt2x00/rt2800lib.c:809: error: (Each undeclared identifier is reported only once
> > drivers/net/wireless/rt2x00/rt2800lib.c:809: error: for each function it appears in.)
> >
>
> Me very confused here. This patch doesn't even introduce the RF3070 symbol, nor can I see where it is used.
> It does use symbol RT3070 on line 809, but that one is introduced in an earlier patch.
> Ah, did you apply the RT3070 USB chipset detection patch before this one?
>
> Still wouldn't explain the compile error on symbol RF3070 though.
RF3070 is a copy-n-paste error, sorry...the symbol is RT3070.
What patch introduces it?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
2009-11-11 23:35 ` John W. Linville
@ 2009-11-12 0:03 ` Gertjan van Wingerde
0 siblings, 0 replies; 7+ messages in thread
From: Gertjan van Wingerde @ 2009-11-12 0:03 UTC (permalink / raw)
To: John W. Linville
Cc: users, linux-wireless, Ivo van Doorn, Bartlomiej Zolnierkiewicz
On 11/12/09 00:35, John W. Linville wrote:
> On Thu, Nov 12, 2009 at 12:22:26AM +0100, Gertjan van Wingerde wrote:
>> On 11/11/09 23:07, John W. Linville wrote:
>>> On Mon, Nov 09, 2009 at 10:59:58PM +0100, Gertjan van Wingerde wrote:
>>>> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
>>>> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
>>>> devices.
>>>>
>>>> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>>> ---
>>>> drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++---
>>>> 1 files changed, 7 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
>>>> index 2c91c44..446087e 100644
>>>> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
>>>> @@ -806,10 +806,14 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>>>> unsigned int tx_pin;
>>>> u8 bbp;
>>>>
>>>> - if (rt2x00_rev(&rt2x00dev->chip) != RT3070_VERSION)
>>>> - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>>>> - else
>>>> + if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&
>>>> + (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
>>>> + rt2x00_rf(&rt2x00dev->chip, RF3020) ||
>>>> + rt2x00_rf(&rt2x00dev->chip, RF3021) ||
>>>> + rt2x00_rf(&rt2x00dev->chip, RF3022)))
>>>> rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info);
>>>> + else
>>>> + rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info);
>>>>
>>>> /*
>>>> * Change BBP settings
>>>
>>> CC [M] drivers/net/wireless/rt2x00/rt2800lib.o
>>> drivers/net/wireless/rt2x00/rt2800lib.c: In function ‘rt2800_config_channel’:
>>> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: ‘RF3070’ undeclared (first use in this function)
>>> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: (Each undeclared identifier is reported only once
>>> drivers/net/wireless/rt2x00/rt2800lib.c:809: error: for each function it appears in.)
>>>
>>
>> Me very confused here. This patch doesn't even introduce the RF3070 symbol, nor can I see where it is used.
>> It does use symbol RT3070 on line 809, but that one is introduced in an earlier patch.
>> Ah, did you apply the RT3070 USB chipset detection patch before this one?
>>
>> Still wouldn't explain the compile error on symbol RF3070 though.
>
> RF3070 is a copy-n-paste error, sorry...the symbol is RT3070.
>
> What patch introduces it?
>
The one I sent with subject: [PATCH v2] rt2x00: Properly detect Ralink RT3070 devices.
It can be found at:
http://marc.info/?l=linux-wireless&m=125788935007988&w=2
Sorry for not making these patch dependencies clear.
---
Gertjan.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rt2x00: Fix rt2800lib RF chip programming selection.
@ 2009-11-12 19:25 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-11-12 19:25 UTC (permalink / raw)
To: Gertjan van Wingerde; +Cc: users, linux-wireless, Ivo van Doorn
On Monday 09 November 2009 22:59:58 Gertjan van Wingerde wrote:
> Mirror the legacy Ralink driver with respect to rt2800 RF register programming. Execute
> rt2800_config_channel_rt3x for all RF2020, RF3020, RF3021 & RF3022 chipsets when operating on RT3070
> devices.
>
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
checkpatch.pl complains about:
ERROR: trailing whitespace
#27: FILE: drivers/net/wireless/rt2x00/rt2800lib.c:809:
+^Iif (rt2x00_rt(&rt2x00dev->chip, RT3070) &&^I$
ERROR: code indent should use tabs where possible
#28: FILE: drivers/net/wireless/rt2x00/rt2800lib.c:810:
+ (rt2x00_rf(&rt2x00dev->chip, RF2020) ||$
I fixed those while applying patch to rt2800 tree..
[ This was fixed later in "[PATCH v2] rt2x00: Initialize rf302x RF values
properly for rt2800pci." but we want all patches to be checkpatch.pl
clean as otherwise it is confusing for people doing automated checking ]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-12 19:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-12 19:25 [PATCH] rt2x00: Fix rt2800lib RF chip programming selection Bartlomiej Zolnierkiewicz
-- strict thread matches above, loose matches on Subject: below --
2009-11-09 21:59 Gertjan van Wingerde
2009-11-10 18:33 ` Ivo van Doorn
2009-11-11 22:07 ` John W. Linville
2009-11-11 23:22 ` Gertjan van Wingerde
2009-11-11 23:35 ` John W. Linville
2009-11-12 0:03 ` Gertjan van Wingerde
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).