diff mbox

rt2x00: rt2800lib: fix RF registers for RT5390/RT5392

Message ID 524BEB7A.8040508@kevlo.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Kevin Lo Oct. 2, 2013, 9:46 a.m. UTC
Update rf registers to use the same values that the MediaTek/Ralink
reference driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 uses.

References:
   RF5390RegTable in chips/rt5390.c
   RF5392RegTable in chips/rt5390.c

Tested on TP-Link TL-WN727N and D-Link DWA-140 Rev.b3 usb wifi dongles.

Signed-off-by: Kevin Lo <kevlo@kevlo.org>
---

         rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
@@ -6487,7 +6487,7 @@ static void rt2800_init_rfcsr_5390(struct 
rt2x00_dev *rt2x00dev)
         rt2800_rfcsr_write(rt2x00dev, 56, 0x22);
         rt2800_rfcsr_write(rt2x00dev, 57, 0x80);
         rt2800_rfcsr_write(rt2x00dev, 58, 0x7f);
-       rt2800_rfcsr_write(rt2x00dev, 59, 0x63);
+       rt2800_rfcsr_write(rt2x00dev, 59, 0x8f);

         rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
         if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F))
@@ -6507,7 +6507,6 @@ static void rt2800_init_rfcsr_5392(struct 
rt2x00_dev *rt2x00dev)
         rt2800_rf_init_calibration(rt2x00dev, 2);

         rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
-       rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
         rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
         rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
         rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Stanislaw Gruszka Oct. 4, 2013, 1:57 p.m. UTC | #1
On Wed, Oct 02, 2013 at 05:46:34PM +0800, Kevin Lo wrote:
> Update rf registers to use the same values that the MediaTek/Ralink
> reference driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 uses.
> 
> References:
>   RF5390RegTable in chips/rt5390.c
>   RF5392RegTable in chips/rt5390.c
> 
> Tested on TP-Link TL-WN727N and D-Link DWA-140 Rev.b3 usb wifi dongles.
> 
> Signed-off-by: Kevin Lo <kevlo@kevlo.org>

Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John W. Linville Oct. 10, 2013, 5:45 p.m. UTC | #2
This patch is corrupt...

On Wed, Oct 02, 2013 at 05:46:34PM +0800, Kevin Lo wrote:
> Update rf registers to use the same values that the MediaTek/Ralink
> reference driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 uses.
> 
> References:
>   RF5390RegTable in chips/rt5390.c
>   RF5392RegTable in chips/rt5390.c
> 
> Tested on TP-Link TL-WN727N and D-Link DWA-140 Rev.b3 usb wifi dongles.
> 
> Signed-off-by: Kevin Lo <kevlo@kevlo.org>
> ---
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
> b/drivers/net/wireless/rt2x00/rt2800lib.c
> index f414978..0bbd1b5 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -6449,7 +6449,7 @@ static void rt2800_init_rfcsr_5390(struct
> rt2x00_dev *rt2x00dev)
>         rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
>         rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
> 
> -       rt2800_rfcsr_write(rt2x00dev, 30, 0x00);
> +       rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
>         rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
>         rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
>         rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
> @@ -6487,7 +6487,7 @@ static void rt2800_init_rfcsr_5390(struct
> rt2x00_dev *rt2x00dev)
>         rt2800_rfcsr_write(rt2x00dev, 56, 0x22);
>         rt2800_rfcsr_write(rt2x00dev, 57, 0x80);
>         rt2800_rfcsr_write(rt2x00dev, 58, 0x7f);
> -       rt2800_rfcsr_write(rt2x00dev, 59, 0x63);
> +       rt2800_rfcsr_write(rt2x00dev, 59, 0x8f);
> 
>         rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
>         if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F))
> @@ -6507,7 +6507,6 @@ static void rt2800_init_rfcsr_5392(struct
> rt2x00_dev *rt2x00dev)
>         rt2800_rf_init_calibration(rt2x00dev, 2);
> 
>         rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
> -       rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
>         rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
>         rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
>         rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
> 
>
diff mbox

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c 
b/drivers/net/wireless/rt2x00/rt2800lib.c
index f414978..0bbd1b5 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -6449,7 +6449,7 @@  static void rt2800_init_rfcsr_5390(struct 
rt2x00_dev *rt2x00dev)
         rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
         rt2800_rfcsr_write(rt2x00dev, 29, 0x10);

-       rt2800_rfcsr_write(rt2x00dev, 30, 0x00);
+       rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
         rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
         rt2800_rfcsr_write(rt2x00dev, 32, 0x80);