rtl8xxxu: Handle BB init for 8192eu
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 7 Apr 2016 18:19:24 +0000 (14:19 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Apr 2016 12:45:21 +0000 (15:45 +0300)
The 8192eu does not use REG_AFE_PLL_CTRL in it's BB init sequence, so
provide device specific handling.

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 539f7b58bbf7739a6b8db40a5a4b17078df7406e..dc67f5b2dbaeda8f8c3e621a6e8f6efd688535b0 100644 (file)
@@ -3649,6 +3649,11 @@ static int rtl8xxxu_init_phy_bb(struct rtl8xxxu_priv *priv)
                rtl8xxxu_write16(priv, REG_SYS_FUNC, val16);
 
                rtl8xxxu_write32(priv, REG_S0S1_PATH_SWITCH, 0x00);
+       } else if (priv->rtl_chip == RTL8192E) {
+               val16 = rtl8xxxu_read16(priv, REG_SYS_FUNC);
+               val16 |= SYS_FUNC_BB_GLB_RSTN | SYS_FUNC_BBRSTB |
+                       SYS_FUNC_DIO_RF;
+               rtl8xxxu_write16(priv, REG_SYS_FUNC, val16);
        } else {
                val8 = rtl8xxxu_read8(priv, REG_AFE_PLL_CTRL);
                udelay(2);