All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
@ 2009-11-10 21:42 Gertjan van Wingerde
  2009-11-10 21:43 ` Ivo van Doorn
  2009-11-11  6:33 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Gertjan van Wingerde @ 2009-11-10 21:42 UTC (permalink / raw)
  To: users, linux-wireless
  Cc: Ivo van Doorn, Bartlomiej Zolnierkiewicz, Gertjan van Wingerde

Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---

Rebased to apply on top of Bart's second series of unification patches.

---
 drivers/net/wireless/rt2x00/rt2800lib.c |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index a848cf5..75d3d00 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1,5 +1,6 @@
 /*
 	Copyright (C) 2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+	Copyright (C) 2009 Gertjan van Wingerde <gwingerde@gmail.com>
 
 	Based on the original rt2800pci.c and rt2800usb.c.
 	  Copyright (C) 2009 Ivo van Doorn <IvDoorn@gmail.com>
@@ -806,8 +807,9 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 	unsigned int tx_pin;
 	u8 bbp;
 
-	if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&	
-           (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
+	if ((rt2x00_rt(&rt2x00dev->chip, RT3070) ||
+	     rt2x00_rt(&rt2x00dev->chip, RT3090)) &&
+	    (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
 	     rt2x00_rf(&rt2x00dev->chip, RF3020) ||
 	     rt2x00_rf(&rt2x00dev->chip, RF3021) ||
 	     rt2x00_rf(&rt2x00dev->chip, RF3022)))
@@ -1989,7 +1991,7 @@ static const struct rf_channel rf_vals[] = {
  * RF value list for rt3070
  * Supports: 2.4 GHz
  */
-static const struct rf_channel rf_vals_3070[] = {
+static const struct rf_channel rf_vals_302x[] = {
 	{1,  241, 2, 2 },
 	{2,  241, 2, 7 },
 	{3,  242, 2, 2 },
@@ -2046,26 +2048,19 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 
 	if (rt2x00_rf(chip, RF2820) ||
 	    rt2x00_rf(chip, RF2720) ||
-	    (rt2x00_intf_is_pci(rt2x00dev) &&
-	     (rt2x00_rf(chip, RF3020) ||
-	      rt2x00_rf(chip, RF3021) ||
-	      rt2x00_rf(chip, RF3022) ||
-	      rt2x00_rf(chip, RF2020) ||
-	      rt2x00_rf(chip, RF3052)))) {
+	    (rt2x00_intf_is_pci(rt2x00dev) && rt2x00_rf(chip, RF3052))) {
 		spec->num_channels = 14;
 		spec->channels = rf_vals;
-	} else if (rt2x00_rf(chip, RF2850) ||
-		   rt2x00_rf(chip, RF2750)) {
+	} else if (rt2x00_rf(chip, RF2850) || rt2x00_rf(chip, RF2750)) {
 		spec->supported_bands |= SUPPORT_BAND_5GHZ;
 		spec->num_channels = ARRAY_SIZE(rf_vals);
 		spec->channels = rf_vals;
-	} else if (rt2x00_intf_is_usb(rt2x00dev) &&
-		    (rt2x00_rf(chip, RF3020) ||
-		     rt2x00_rf(chip, RF2020) ||
-		     rt2x00_rf(chip, RF3021) ||
-		     rt2x00_rf(chip, RF3022))) {
-		spec->num_channels = ARRAY_SIZE(rf_vals_3070);
-		spec->channels = rf_vals_3070;
+	} else if (rt2x00_rf(chip, RF3020) ||
+		   rt2x00_rf(chip, RF2020) ||
+		   rt2x00_rf(chip, RF3021) ||
+		   rt2x00_rf(chip, RF3022)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_302x);
+		spec->channels = rf_vals_302x;
 	}
 
 	/*
-- 
1.6.5.2


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

* Re: [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
  2009-11-10 21:42 [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci Gertjan van Wingerde
@ 2009-11-10 21:43 ` Ivo van Doorn
  2009-11-11  6:33 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Ivo van Doorn @ 2009-11-10 21:43 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: users, linux-wireless, Bartlomiej Zolnierkiewicz

On Tuesday 10 November 2009, Gertjan van Wingerde wrote:
> Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.
> 
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>

Acked-by: Ivo van Doorn <IvDoorn@gmail.com>

> ---
> 
> Rebased to apply on top of Bart's second series of unification patches.
> 
> ---
>  drivers/net/wireless/rt2x00/rt2800lib.c |   31 +++++++++++++------------------
>  1 files changed, 13 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index a848cf5..75d3d00 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1,5 +1,6 @@
>  /*
>  	Copyright (C) 2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> +	Copyright (C) 2009 Gertjan van Wingerde <gwingerde@gmail.com>
>  
>  	Based on the original rt2800pci.c and rt2800usb.c.
>  	  Copyright (C) 2009 Ivo van Doorn <IvDoorn@gmail.com>
> @@ -806,8 +807,9 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>  	unsigned int tx_pin;
>  	u8 bbp;
>  
> -	if (rt2x00_rt(&rt2x00dev->chip, RT3070) &&	
> -           (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
> +	if ((rt2x00_rt(&rt2x00dev->chip, RT3070) ||
> +	     rt2x00_rt(&rt2x00dev->chip, RT3090)) &&
> +	    (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
>  	     rt2x00_rf(&rt2x00dev->chip, RF3020) ||
>  	     rt2x00_rf(&rt2x00dev->chip, RF3021) ||
>  	     rt2x00_rf(&rt2x00dev->chip, RF3022)))
> @@ -1989,7 +1991,7 @@ static const struct rf_channel rf_vals[] = {
>   * RF value list for rt3070
>   * Supports: 2.4 GHz
>   */
> -static const struct rf_channel rf_vals_3070[] = {
> +static const struct rf_channel rf_vals_302x[] = {
>  	{1,  241, 2, 2 },
>  	{2,  241, 2, 7 },
>  	{3,  242, 2, 2 },
> @@ -2046,26 +2048,19 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
>  
>  	if (rt2x00_rf(chip, RF2820) ||
>  	    rt2x00_rf(chip, RF2720) ||
> -	    (rt2x00_intf_is_pci(rt2x00dev) &&
> -	     (rt2x00_rf(chip, RF3020) ||
> -	      rt2x00_rf(chip, RF3021) ||
> -	      rt2x00_rf(chip, RF3022) ||
> -	      rt2x00_rf(chip, RF2020) ||
> -	      rt2x00_rf(chip, RF3052)))) {
> +	    (rt2x00_intf_is_pci(rt2x00dev) && rt2x00_rf(chip, RF3052))) {
>  		spec->num_channels = 14;
>  		spec->channels = rf_vals;
> -	} else if (rt2x00_rf(chip, RF2850) ||
> -		   rt2x00_rf(chip, RF2750)) {
> +	} else if (rt2x00_rf(chip, RF2850) || rt2x00_rf(chip, RF2750)) {
>  		spec->supported_bands |= SUPPORT_BAND_5GHZ;
>  		spec->num_channels = ARRAY_SIZE(rf_vals);
>  		spec->channels = rf_vals;
> -	} else if (rt2x00_intf_is_usb(rt2x00dev) &&
> -		    (rt2x00_rf(chip, RF3020) ||
> -		     rt2x00_rf(chip, RF2020) ||
> -		     rt2x00_rf(chip, RF3021) ||
> -		     rt2x00_rf(chip, RF3022))) {
> -		spec->num_channels = ARRAY_SIZE(rf_vals_3070);
> -		spec->channels = rf_vals_3070;
> +	} else if (rt2x00_rf(chip, RF3020) ||
> +		   rt2x00_rf(chip, RF2020) ||
> +		   rt2x00_rf(chip, RF3021) ||
> +		   rt2x00_rf(chip, RF3022)) {
> +		spec->num_channels = ARRAY_SIZE(rf_vals_302x);
> +		spec->channels = rf_vals_302x;
>  	}
>  
>  	/*



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

* Re: [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
  2009-11-10 21:42 [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci Gertjan van Wingerde
  2009-11-10 21:43 ` Ivo van Doorn
@ 2009-11-11  6:33 ` Kalle Valo
  2009-11-11 14:28   ` John W. Linville
  1 sibling, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2009-11-11  6:33 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: users, linux-wireless, Ivo van Doorn, Bartlomiej Zolnierkiewicz

Gertjan van Wingerde <gwingerde@gmail.com> writes:

> Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.
>
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>

Please line wrap commit logs. 72 characters or so per line is a good
limit.

-- 
Kalle Valo

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

* Re: [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
  2009-11-11  6:33 ` Kalle Valo
@ 2009-11-11 14:28   ` John W. Linville
  2009-11-11 20:16     ` Gertjan van Wingerde
  0 siblings, 1 reply; 6+ messages in thread
From: John W. Linville @ 2009-11-11 14:28 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Gertjan van Wingerde, users, linux-wireless, Ivo van Doorn,
	Bartlomiej Zolnierkiewicz

On Wed, Nov 11, 2009 at 08:33:15AM +0200, Kalle Valo wrote:
> Gertjan van Wingerde <gwingerde@gmail.com> writes:
> 
> > Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.
> >
> > Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
> 
> Please line wrap commit logs. 72 characters or so per line is a good
> limit.

Yes, ACK.

-- 
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] 6+ messages in thread

* Re: [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
  2009-11-11 14:28   ` John W. Linville
@ 2009-11-11 20:16     ` Gertjan van Wingerde
  2009-11-12 19:32       ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 6+ messages in thread
From: Gertjan van Wingerde @ 2009-11-11 20:16 UTC (permalink / raw)
  To: John W. Linville
  Cc: Kalle Valo, users, linux-wireless, Ivo van Doorn,
	Bartlomiej Zolnierkiewicz

On 11/11/09 15:28, John W. Linville wrote:
> On Wed, Nov 11, 2009 at 08:33:15AM +0200, Kalle Valo wrote:
>> Gertjan van Wingerde <gwingerde@gmail.com> writes:
>>
>>> Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.
>>>
>>> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>
>> Please line wrap commit logs. 72 characters or so per line is a good
>> limit.
> 
> Yes, ACK.
> 

I'm terribly sorry about that. I still have to get used to my new big wide-screen monitor, and the windows of wider than 80 characters :-(

I'll keep it in mind for my next patch submissions.

---
Gertjan.

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

* Re: [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci.
  2009-11-11 20:16     ` Gertjan van Wingerde
@ 2009-11-12 19:32       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-11-12 19:32 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: John W. Linville, Kalle Valo, users, linux-wireless, Ivo van Doorn

On Wednesday 11 November 2009 21:16:49 Gertjan van Wingerde wrote:
> On 11/11/09 15:28, John W. Linville wrote:
> > On Wed, Nov 11, 2009 at 08:33:15AM +0200, Kalle Valo wrote:
> >> Gertjan van Wingerde <gwingerde@gmail.com> writes:
> >>
> >>> Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset.
> >>>
> >>> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
> >>
> >> Please line wrap commit logs. 72 characters or so per line is a good
> >> limit.
> > 
> > Yes, ACK.
> > 
> 
> I'm terribly sorry about that. I still have to get used to my new big wide-screen monitor, and the windows of wider than 80 characters :-(
> 
> I'll keep it in mind for my next patch submissions.

I've been fixing this in rt2800 tree for all patches.. ;)

-- 
Bartlomiej Zolnierkiewicz

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

end of thread, other threads:[~2009-11-12 19:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 21:42 [PATCH v2] rt2x00: Initialize rf302x RF values properly for rt2800pci Gertjan van Wingerde
2009-11-10 21:43 ` Ivo van Doorn
2009-11-11  6:33 ` Kalle Valo
2009-11-11 14:28   ` John W. Linville
2009-11-11 20:16     ` Gertjan van Wingerde
2009-11-12 19:32       ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.