rtl8xxxu: Fix LDPC RX hang issue on 8192eu
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 7 Apr 2016 18:19:29 +0000 (14:19 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Apr 2016 12:45:26 +0000 (15:45 +0300)
Implement workaround for LDPC RX hands on 8192eu. This was inspired by
workaround found in the 8192eu vendor driver.

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 fdd11ece3806daf33156aa627c62001d07dcd59d..ed266f081fd0de1a01f058b8365620fae9535036 100644 (file)
@@ -7234,6 +7234,16 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
        /* ack for xmit mgmt frames. */
        rtl8xxxu_write32(priv, REG_FWHW_TXQ_CTRL, val32);
 
+       if (priv->rtl_chip == RTL8192E) {
+               /*
+                * Fix LDPC rx hang issue.
+                */
+               val32 = rtl8xxxu_read32(priv, REG_AFE_MISC);
+               rtl8xxxu_write8(priv, REG_8192E_LDOV12_CTRL, 0x75);
+               val32 &= 0xfff00fff;
+               val32 |= 0x0007e000;
+               rtl8xxxu_write32(priv, REG_8192E_LDOV12_CTRL, val32);
+       }
 exit:
        return ret;
 }