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/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.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/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.patch')
-rw-r--r-- | package/kernel/mac80211/patches/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.patch b/package/kernel/mac80211/patches/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.patch new file mode 100644 index 0000000000..fd89360c30 --- /dev/null +++ b/package/kernel/mac80211/patches/651-0016-rtl8xxxu-Determine-the-need-for-SGI-before-handling-.patch @@ -0,0 +1,52 @@ +From 20296682e77606561c3899e6f2f4f881974472f3 Mon Sep 17 00:00:00 2001 +From: Jes Sorensen <Jes.Sorensen@redhat.com> +Date: Mon, 25 Jul 2016 13:14:02 -0400 +Subject: [PATCH] rtl8xxxu: Determine the need for SGI before handling specific + TX desc formats + +In order to be able to split out the TX descriptor handling code, +determine in advance the need to mark SGI. + +Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -4770,7 +4770,7 @@ static void rtl8xxxu_tx(struct ieee80211 + u16 rate_flag = tx_info->control.rates[0].flags; + int tx_desc_size = priv->fops->tx_desc_size; + int ret; +- bool usedesc40, ampdu_enable; ++ bool usedesc40, ampdu_enable, sgi = false; + + if (skb_headroom(skb) < tx_desc_size) { + dev_warn(dev, +@@ -4854,6 +4854,12 @@ static void rtl8xxxu_tx(struct ieee80211 + else + rate = tx_rate->hw_value; + ++ if (rate_flag & IEEE80211_TX_RC_SHORT_GI || ++ (ieee80211_is_data_qos(hdr->frame_control) && ++ sta && sta->ht_cap.cap & ++ (IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20))) ++ sgi = true; ++ + seq_number = IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); + if (!usedesc40) { + tx_desc->txdw5 = cpu_to_le32(rate); +@@ -4886,12 +4892,8 @@ static void rtl8xxxu_tx(struct ieee80211 + (sta && vif && vif->bss_conf.use_short_preamble)) + tx_desc->txdw4 |= cpu_to_le32(TXDESC32_SHORT_PREAMBLE); + +- if (rate_flag & IEEE80211_TX_RC_SHORT_GI || +- (ieee80211_is_data_qos(hdr->frame_control) && +- sta && sta->ht_cap.cap & +- (IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20))) { ++ if (sgi) + tx_desc->txdw5 |= cpu_to_le32(TXDESC32_SHORT_GI); +- } + + if (rate_flag & IEEE80211_TX_RC_USE_RTS_CTS) { + /* |