rtl8xxxu: Kludge to drop incorrect USB OUT EP for 8192EU
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 29 Feb 2016 22:04:08 +0000 (17:04 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Mar 2016 13:28:54 +0000 (15:28 +0200)
The 8192eu (and some other parts) will report an incorrect USB OUT
EP. This tells the chip to drop it - as per the 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
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h

index 68d6bb89f719743218db48a573ea5227c7933210..b6d8014b83354a933fff0f7198544aaae68d9791 100644 (file)
@@ -4362,6 +4362,12 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
                }
        }
 
+       if (priv->rtlchip == 0x8192e) {
+               val32 = rtl8xxxu_read32(priv, REG_TXDMA_OFFSET_CHK);
+               val32 |= TXDMA_OFFSET_DROP_DATA_EN;
+               rtl8xxxu_write32(priv, REG_TXDMA_OFFSET_CHK, val32);
+       }
+
        ret = rtl8xxxu_init_mac(priv, rtl8723a_mac_init_table);
        dev_dbg(dev, "%s: init_mac %i\n", __func__, ret);
        if (ret)
index b83bd34bdd76c698d20841bb8edd85bd3ba73384..226a1fa7d8b9af9300f60c7678b4d42d2f237c28 100644 (file)
 #define REG_FIFOPAGE                   0x0204
 #define REG_TDECTRL                    0x0208
 #define REG_TXDMA_OFFSET_CHK           0x020c
+#define  TXDMA_OFFSET_DROP_DATA_EN     BIT(9)
 #define REG_TXDMA_STATUS               0x0210
 #define REG_RQPN_NPQ                   0x0214
 #define  RQPN_NPQ_SHIFT                        0