rtl8xxxu: Set TX page boundaries for 8192eu
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 7 Apr 2016 18:19:18 +0000 (14:19 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Apr 2016 12:45:15 +0000 (15:45 +0300)
The 8192eu also has it's own TRXFF boundary value to set.

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.h

index 63fa4c66794f9e31811efcf0088bd0adbd494461..5b2c1c80e49d2edeac8573c7d8503473d17da389 100644 (file)
@@ -6495,7 +6495,10 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
                /*
                 * Set TX buffer boundary
                 */
-               val8 = TX_TOTAL_PAGE_NUM + 1;
+               if (priv->rtl_chip == RTL8192E)
+                       val8 = TX_TOTAL_PAGE_NUM_8192E + 1;
+               else
+                       val8 = TX_TOTAL_PAGE_NUM + 1;
 
                if (priv->rtl_chip == RTL8723B)
                        val8 -= 1;
@@ -6532,6 +6535,8 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
         */
        if (priv->rtl_chip == RTL8723B)
                rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, 0x3f7f);
+       else if (priv->rtl_chip == RTL8192E)
+               rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, 0x3cff);
        else
                rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, 0x27ff);
        /*
index 94fc2172c0d06f5bd61ff2a12998ac9ffc7b8b27..63d72689481d9bd019e4055e35faba3198e69c78 100644 (file)
@@ -42,6 +42,7 @@
 #define REALTEK_USB_CMD_IDX            0x00
 
 #define TX_TOTAL_PAGE_NUM              0xf8
+#define TX_TOTAL_PAGE_NUM_8192E                0xf3
 /* (HPQ + LPQ + NPQ + PUBQ) = TX_TOTAL_PAGE_NUM */
 #define TX_PAGE_NUM_PUBQ               0xe7
 #define TX_PAGE_NUM_HI_PQ              0x0c