From: Jes Sorensen Date: Thu, 7 Apr 2016 18:19:18 +0000 (-0400) Subject: rtl8xxxu: Set TX page boundaries for 8192eu X-Git-Tag: v4.14-rc1~3245^2~146^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80805aa5f33e315df23b6420c64f96a28dfcbb9a;p=platform%2Fkernel%2Flinux-rpi.git rtl8xxxu: Set TX page boundaries for 8192eu The 8192eu also has it's own TRXFF boundary value to set. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index 63fa4c6..5b2c1c8 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c @@ -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); /* diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h index 94fc217..63d7268 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h @@ -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