rtl8xxxu: 80M spur hack is for 8723au only
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 29 Feb 2016 22:04:59 +0000 (17:04 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Mar 2016 13:29:07 +0000 (15:29 +0200)
Only apply the 80M spur hack for 8723au parts.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c

index 1d0869b55c643eabb52c51fa8724fec0ca95f9be..9ba4cadd1549d953179b6c6c2042b371438b5834 100644 (file)
@@ -6151,11 +6151,12 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
        if (ret)
                goto exit;
 
-       /* Reduce 80M spur */
-       rtl8xxxu_write32(priv, REG_AFE_XTAL_CTRL, 0x0381808d);
-       rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff83);
-       rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff82);
-       rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff83);
+       if (priv->rtlchip == 0x8723a) { /* Reduce 80M spur */
+               rtl8xxxu_write32(priv, REG_AFE_XTAL_CTRL, 0x0381808d);
+               rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff83);
+               rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff82);
+               rtl8xxxu_write32(priv, REG_AFE_PLL_CTRL, 0xf0ffff83);
+       }
 
        /* RFSW Control - clear bit 14 ?? */
        rtl8xxxu_write32(priv, REG_FPGA0_TX_INFO, 0x00000003);