diff options
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 |
commit | 092e77d94847c7d8530e160106442d97404c4513 (patch) | |
tree | a2e9d3d03eb58e274bad95620c68c677f7fa57fc /package/kernel/mac80211/patches/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch | |
parent | c1678f1fa0bfa3c53c706fad0897f9a0aec8dab2 (diff) | |
download | upstream-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/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch')
-rw-r--r-- | package/kernel/mac80211/patches/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch b/package/kernel/mac80211/patches/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch new file mode 100644 index 0000000000..c81044967f --- /dev/null +++ b/package/kernel/mac80211/patches/652-0063-rtl8xxxu-Handle-devices-with-a-smaller-LLT-buffer.patch @@ -0,0 +1,70 @@ +From 19caed8a5ff27226e22f95a6c082a093c0b7b23f Mon Sep 17 00:00:00 2001 +From: Jes Sorensen <Jes.Sorensen@redhat.com> +Date: Wed, 31 Aug 2016 16:31:38 -0400 +Subject: [PATCH] rtl8xxxu: Handle devices with a smaller LLT buffer + +The 8188e (except for I cut parts) seem to have a smaller LLT buffer +than all other known devices. + +Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 1 + + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 11 ++++++++--- + 3 files changed, 10 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +@@ -1409,6 +1409,7 @@ struct rtl8xxxu_fileops { + u8 page_num_hi; + u8 page_num_lo; + u8 page_num_norm; ++ u8 last_llt_entry; + }; + + extern int rtl8xxxu_debug; +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c +@@ -1454,4 +1454,5 @@ struct rtl8xxxu_fileops rtl8188eu_fops = + .page_num_hi = TX_PAGE_NUM_HI_PQ_8188E, + .page_num_lo = TX_PAGE_NUM_LO_PQ_8188E, + .page_num_norm = TX_PAGE_NUM_NORM_PQ_8188E, ++ .last_llt_entry = 176, + }; +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -2485,11 +2485,16 @@ static int rtl8xxxu_llt_write(struct rtl + int rtl8xxxu_init_llt_table(struct rtl8xxxu_priv *priv) + { + int ret; +- int i; ++ int i, last_entry; + u8 last_tx_page; + + last_tx_page = priv->fops->total_page_num; + ++ if (priv->fops->last_llt_entry) ++ last_entry = priv->fops->last_llt_entry; ++ else ++ last_entry = 255; ++ + for (i = 0; i < last_tx_page; i++) { + ret = rtl8xxxu_llt_write(priv, i, i + 1); + if (ret) +@@ -2501,14 +2506,14 @@ int rtl8xxxu_init_llt_table(struct rtl8x + goto exit; + + /* Mark remaining pages as a ring buffer */ +- for (i = last_tx_page + 1; i < 0xff; i++) { ++ for (i = last_tx_page + 1; i < last_entry; i++) { + ret = rtl8xxxu_llt_write(priv, i, (i + 1)); + if (ret) + goto exit; + } + + /* Let last entry point to the start entry of ring buffer */ +- ret = rtl8xxxu_llt_write(priv, 0xff, last_tx_page + 1); ++ ret = rtl8xxxu_llt_write(priv, last_entry, last_tx_page + 1); + if (ret) + goto exit; + |