rt2800: move 3352 specific bbp initialization
authorStanislaw Gruszka <stf_xl@wp.pl>
Sat, 18 May 2013 12:03:53 +0000 (14:03 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 May 2013 17:18:21 +0000 (13:18 -0400)
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index d0d65dd..2d00fd8 100644 (file)
@@ -4182,6 +4182,26 @@ static void rt2800_init_bbp_3352(struct rt2x00_dev *rt2x00dev)
        rt2800_bbp_write(rt2x00dev, 120, 0x50);
 
        rt2800_bbp_write(rt2x00dev, 137, 0x0f);
+
+       rt2800_bbp_write(rt2x00dev, 163, 0xbd);
+       /* Set ITxBF timeout to 0x9c40=1000msec */
+       rt2800_bbp_write(rt2x00dev, 179, 0x02);
+       rt2800_bbp_write(rt2x00dev, 180, 0x00);
+       rt2800_bbp_write(rt2x00dev, 182, 0x40);
+       rt2800_bbp_write(rt2x00dev, 180, 0x01);
+       rt2800_bbp_write(rt2x00dev, 182, 0x9c);
+       rt2800_bbp_write(rt2x00dev, 179, 0x00);
+       /* Reprogram the inband interface to put right values in RXWI */
+       rt2800_bbp_write(rt2x00dev, 142, 0x04);
+       rt2800_bbp_write(rt2x00dev, 143, 0x3b);
+       rt2800_bbp_write(rt2x00dev, 142, 0x06);
+       rt2800_bbp_write(rt2x00dev, 143, 0xa0);
+       rt2800_bbp_write(rt2x00dev, 142, 0x07);
+       rt2800_bbp_write(rt2x00dev, 143, 0xa1);
+       rt2800_bbp_write(rt2x00dev, 142, 0x08);
+       rt2800_bbp_write(rt2x00dev, 143, 0xa2);
+
+       rt2800_bbp_write(rt2x00dev, 148, 0xc8);
 }
 
 static void rt2800_init_bbp_3390(struct rt2x00_dev *rt2x00dev)
@@ -4465,28 +4485,6 @@ static void rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
                rt2800_bbp_write(rt2x00dev, 3, value);
        }
 
-       if (rt2x00_rt(rt2x00dev, RT3352)) {
-               rt2800_bbp_write(rt2x00dev, 163, 0xbd);
-               /* Set ITxBF timeout to 0x9c40=1000msec */
-               rt2800_bbp_write(rt2x00dev, 179, 0x02);
-               rt2800_bbp_write(rt2x00dev, 180, 0x00);
-               rt2800_bbp_write(rt2x00dev, 182, 0x40);
-               rt2800_bbp_write(rt2x00dev, 180, 0x01);
-               rt2800_bbp_write(rt2x00dev, 182, 0x9c);
-               rt2800_bbp_write(rt2x00dev, 179, 0x00);
-               /* Reprogram the inband interface to put right values in RXWI */
-               rt2800_bbp_write(rt2x00dev, 142, 0x04);
-               rt2800_bbp_write(rt2x00dev, 143, 0x3b);
-               rt2800_bbp_write(rt2x00dev, 142, 0x06);
-               rt2800_bbp_write(rt2x00dev, 143, 0xa0);
-               rt2800_bbp_write(rt2x00dev, 142, 0x07);
-               rt2800_bbp_write(rt2x00dev, 143, 0xa1);
-               rt2800_bbp_write(rt2x00dev, 142, 0x08);
-               rt2800_bbp_write(rt2x00dev, 143, 0xa2);
-
-               rt2800_bbp_write(rt2x00dev, 148, 0xc8);
-       }
-
        if (rt2x00_rt(rt2x00dev, RT5390) ||
            rt2x00_rt(rt2x00dev, RT5392)) {
                int ant, div_mode;