aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-06-29 17:04:05 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-09-15 20:23:46 +0200
commit092e77d94847c7d8530e160106442d97404c4513 (patch)
treea2e9d3d03eb58e274bad95620c68c677f7fa57fc /package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch
parentc1678f1fa0bfa3c53c706fad0897f9a0aec8dab2 (diff)
downloadupstream-092e77d94847c7d8530e160106442d97404c4513.tar.gz
upstream-092e77d94847c7d8530e160106442d97404c4513.tar.bz2
upstream-092e77d94847c7d8530e160106442d97404c4513.zip
rtl8xxxu: add support for rtl8188eu
Patches by Jes Sorensen: https://git.kernel.org/cgit/linux/kernel/git/jes/linux.git/ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch')
-rw-r--r--package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch b/package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch
new file mode 100644
index 0000000000..ccd68ec792
--- /dev/null
+++ b/package/kernel/mac80211/patches/650-0011-rtl8xxxu-Allocate-larger-RX-skbs-when-aggregation-is.patch
@@ -0,0 +1,65 @@
+From 48c31d0cdbadc082abfcf88c2bd161fab4000bb4 Mon Sep 17 00:00:00 2001
+From: Jes Sorensen <Jes.Sorensen@redhat.com>
+Date: Sat, 21 May 2016 13:43:51 -0400
+Subject: [PATCH] rtl8xxxu: Allocate larger RX skbs when aggregation is enabled
+
+This adds support for allocating larger skbs for devices which
+indicate they support it.
+
+Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
+---
+ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 ++
+ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 13 +++++++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+@@ -1247,6 +1247,7 @@ struct rtl8xxxu_priv {
+ u32 ep_tx_normal_queue:1;
+ u32 ep_tx_low_queue:1;
+ u32 has_xtalk:1;
++ u32 rx_buf_aggregation:1;
+ u8 xtalk;
+ unsigned int pipe_interrupt;
+ unsigned int pipe_in;
+@@ -1330,6 +1331,7 @@ struct rtl8xxxu_fileops {
+ void (*report_connect) (struct rtl8xxxu_priv *priv,
+ u8 macid, bool connect);
+ int writeN_block_size;
++ int rx_agg_buf_size;
+ char tx_desc_size;
+ char rx_desc_size;
+ char has_s0s1;
+--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+@@ -64,8 +64,6 @@ module_param_named(ht40_2g, rtl8xxxu_ht4
+ MODULE_PARM_DESC(ht40_2g, "Enable HT40 support on the 2.4GHz band");
+
+ #define USB_VENDOR_ID_REALTEK 0x0bda
+-/* Minimum IEEE80211_MAX_FRAME_LEN */
+-#define RTL_RX_BUFFER_SIZE IEEE80211_MAX_FRAME_LEN
+ #define RTL8XXXU_RX_URBS 32
+ #define RTL8XXXU_RX_URB_PENDING_WATER 8
+ #define RTL8XXXU_TX_URBS 64
+@@ -5271,12 +5269,19 @@ cleanup:
+ static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,
+ struct rtl8xxxu_rx_urb *rx_urb)
+ {
++ struct rtl8xxxu_fileops *fops = priv->fops;
+ struct sk_buff *skb;
+ int skb_size;
+ int ret, rx_desc_sz;
+
+- rx_desc_sz = priv->fops->rx_desc_size;
+- skb_size = rx_desc_sz + RTL_RX_BUFFER_SIZE;
++ rx_desc_sz = fops->rx_desc_size;
++
++ if (priv->rx_buf_aggregation && fops->rx_agg_buf_size)
++ skb_size = fops->rx_agg_buf_size;
++ else
++ skb_size = IEEE80211_MAX_FRAME_LEN;
++ skb_size += rx_desc_sz;
++
+ skb = __netdev_alloc_skb(NULL, skb_size, GFP_KERNEL);
+ if (!skb)
+ return -ENOMEM;