2008-05-10 11:32:35

by Andrea Merello

[permalink] [raw]
Subject: PATCH Rtl8180 ch14 [2/3]

Rtl8180: fix wrong parameter in RF code function invokation for maxim radio

The max2820 RF code needs to invoke max2820_write_phy_antenna every time the
channel is being switch.

This should be done passing the channel number to that function.
Incorrectly we were passing the same value that is written on the
channel RF register.
This may cause problems when operating on ch 14.

This patch fixes it.

Thanks to Alessandro Di Marco who found this issue!


signed-off-by: Andrea Merello <[email protected]>
---

--- a/drivers/net/wireless/rtl8180_max2820.c 2008-02-02
14:48:52.000000000 +0100
+++ b/drivers/net/wireless/rtl8180_max2820.c 2008-02-02
14:55:29.000000000 +0100
@@ -86,7 +86,7 @@ static void max2820_rf_set_channel(struc
* sa2400, for MAXIM we do this directly from BB */
rtl8180_write_phy(dev, 3, txpw);

- max2820_write_phy_antenna(dev, chan);
+ max2820_write_phy_antenna(dev, chan_idx + 1);
write_max2820(dev, 3, chan);
}


2008-05-14 20:20:39

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] Rtl8180 max2820 ch14

On Sat, May 10, 2008 at 01:32:34PM +0200, Andrea Merello wrote:
> Rtl8180: fix wrong parameter in RF code function invokation for maxim radio
>
> The max2820 RF code needs to invoke max2820_write_phy_antenna every time the
> channel is being switch.
>
> This should be done passing the channel number to that function.
> Incorrectly we were passing the same value that is written on the
> channel RF register.
> This may cause problems when operating on ch 14.
>
> This patch fixes it.
>
> Thanks to Alessandro Di Marco who found this issue!
>
>
> signed-off-by: Andrea Merello <[email protected]>
> ---
>
> --- a/drivers/net/wireless/rtl8180_max2820.c 2008-02-02
> 14:48:52.000000000 +0100
> +++ b/drivers/net/wireless/rtl8180_max2820.c 2008-02-02
> 14:55:29.000000000 +0100
> @@ -86,7 +86,7 @@ static void max2820_rf_set_channel(struc
> * sa2400, for MAXIM we do this directly from BB */
> rtl8180_write_phy(dev, 3, txpw);
>
> - max2820_write_phy_antenna(dev, chan);
> + max2820_write_phy_antenna(dev, chan_idx + 1);
> write_max2820(dev, 3, chan);
> }

This one didn't trigger any warnings, but it was whitespace damaged.
I'll hold-off on applying this one since I presume you will be
resubmitting the other patches. I'll apply them all at once then.

John
--
John W. Linville
[email protected]