rt2x00: rt2800lib: Fix rx path on SoC devices
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 26 Apr 2010 11:48:45 +0000 (13:48 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Apr 2010 18:21:24 +0000 (14:21 -0400)
Restore the rfcsr initialization for RT305x SoC devices which was removed
by "rt2x00: Finish rt3070 support in rt2800 register initialization.".

This fixes the rx path on SoC devices.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 2b9be79fc77fef05bf257bb1551ac67e7d03edba..adb690174d1db19a41cc298897e42ce7bcbdb028 100644 (file)
@@ -1707,7 +1707,8 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
        if (!rt2x00_rt(rt2x00dev, RT3070) &&
            !rt2x00_rt(rt2x00dev, RT3071) &&
            !rt2x00_rt(rt2x00dev, RT3090) &&
-           !rt2x00_rt(rt2x00dev, RT3390))
+           !rt2x00_rt(rt2x00dev, RT3390) &&
+           !(rt2x00_is_soc(rt2x00dev) && rt2x00_rt(rt2x00dev, RT2872)))
                return 0;
 
        /*
@@ -1775,6 +1776,37 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
                rt2800_rfcsr_write(rt2x00dev, 29, 0x8f);
                rt2800_rfcsr_write(rt2x00dev, 30, 0x20);
                rt2800_rfcsr_write(rt2x00dev, 31, 0x0f);
+       } else if (rt2x00_rt(rt2x00dev, RT2872)) {
+               rt2800_rfcsr_write(rt2x00dev, 0, 0x50);
+               rt2800_rfcsr_write(rt2x00dev, 1, 0x01);
+               rt2800_rfcsr_write(rt2x00dev, 2, 0xf7);
+               rt2800_rfcsr_write(rt2x00dev, 3, 0x75);
+               rt2800_rfcsr_write(rt2x00dev, 4, 0x40);
+               rt2800_rfcsr_write(rt2x00dev, 5, 0x03);
+               rt2800_rfcsr_write(rt2x00dev, 6, 0x02);
+               rt2800_rfcsr_write(rt2x00dev, 7, 0x50);
+               rt2800_rfcsr_write(rt2x00dev, 8, 0x39);
+               rt2800_rfcsr_write(rt2x00dev, 9, 0x0f);
+               rt2800_rfcsr_write(rt2x00dev, 10, 0x60);
+               rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
+               rt2800_rfcsr_write(rt2x00dev, 12, 0x75);
+               rt2800_rfcsr_write(rt2x00dev, 13, 0x75);
+               rt2800_rfcsr_write(rt2x00dev, 14, 0x90);
+               rt2800_rfcsr_write(rt2x00dev, 15, 0x58);
+               rt2800_rfcsr_write(rt2x00dev, 16, 0xb3);
+               rt2800_rfcsr_write(rt2x00dev, 17, 0x92);
+               rt2800_rfcsr_write(rt2x00dev, 18, 0x2c);
+               rt2800_rfcsr_write(rt2x00dev, 19, 0x02);
+               rt2800_rfcsr_write(rt2x00dev, 20, 0xba);
+               rt2800_rfcsr_write(rt2x00dev, 21, 0xdb);
+               rt2800_rfcsr_write(rt2x00dev, 22, 0x00);
+               rt2800_rfcsr_write(rt2x00dev, 23, 0x31);
+               rt2800_rfcsr_write(rt2x00dev, 24, 0x08);
+               rt2800_rfcsr_write(rt2x00dev, 25, 0x01);
+               rt2800_rfcsr_write(rt2x00dev, 26, 0x25);
+               rt2800_rfcsr_write(rt2x00dev, 27, 0x23);
+               rt2800_rfcsr_write(rt2x00dev, 28, 0x13);
+               rt2800_rfcsr_write(rt2x00dev, 29, 0x83);
        }
 
        if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {