rt2x00: Don't disable G0 PA_PE bit in case of BT coexistence.
authorGertjan van Wingerde <gwingerde@gmail.com>
Wed, 18 May 2011 18:25:18 +0000 (20:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 1 Jun 2011 19:10:58 +0000 (15:10 -0400)
(split off from the earlier RT35xx patch submitted by Shiang)

Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 0fab3152f2c0c95bd93a4856ae851cc8308f89e7..2ed3fe0d62085a18484a47ffe0031cc8e30c5a0a 100644 (file)
@@ -1811,7 +1811,11 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
        rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN, 1);
        rt2x00_set_field32(&tx_pin, TX_PIN_CFG_RFTR_EN, 1);
        rt2x00_set_field32(&tx_pin, TX_PIN_CFG_TRSW_EN, 1);
-       rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G0_EN, rf->channel <= 14);
+       if (test_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags))
+               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G0_EN, 1);
+       else
+               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G0_EN,
+                                  rf->channel <= 14);
        rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A0_EN, rf->channel > 14);
 
        rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin);