summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2016-02-29 23:05:31 +0100
committerKalle Valo <kvalo@codeaurora.org>2016-03-10 14:29:16 +0100
commita40ace4f01c77362553455a819eba407f7fccc76 (patch)
treec9ace2fd4ef19d393fd8a6ac0e93e92e8628d1a0 /drivers/net/wireless
parentrtl8xxxu: Add more 40 byte TX desc bit definitions (diff)
downloadlinux-a40ace4f01c77362553455a819eba407f7fccc76.tar.xz
linux-a40ace4f01c77362553455a819eba407f7fccc76.zip
rtl8xxxu: Set the correct TX descriptor bits for agg and break on 8723b
Fixup victim of the relocated bits for AGG_ENABLE/AGG_BREAK in the 40 byte TX descriptor Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 4cff2c94c88f..dd9addf7badf 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -6953,6 +6953,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
u16 rate_flag = tx_info->control.rates[0].flags;
int tx_desc_size = priv->fops->tx_desc_size;
int ret;
+ bool txdesc40, ampdu_enable;
if (skb_headroom(skb) < tx_desc_size) {
dev_warn(dev,
@@ -6980,6 +6981,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
if (ieee80211_is_action(hdr->frame_control))
rtl8xxxu_dump_action(dev, hdr);
+ txdesc40 = (tx_desc_size == 40);
tx_info->rate_driver_data[0] = hw;
if (control && control->sta)
@@ -7028,6 +7030,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
tx_desc->txdw5 |= cpu_to_le32(0x0001ff00);
/* (tx_info->flags & IEEE80211_TX_CTL_AMPDU) && */
+ ampdu_enable = false;
if (ieee80211_is_data_qos(hdr->frame_control) && sta) {
if (sta->ht_cap.ht_supported) {
u32 ampdu, val32;
@@ -7036,11 +7039,21 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
val32 = ampdu << TXDESC_AMPDU_DENSITY_SHIFT;
tx_desc->txdw2 |= cpu_to_le32(val32);
+ ampdu_enable = true;
+ }
+ }
+
+ if (!txdesc40) {
+ if (ampdu_enable)
tx_desc->txdw1 |= cpu_to_le32(TXDESC_AGG_ENABLE_8723A);
- } else
+ else
tx_desc->txdw1 |= cpu_to_le32(TXDESC_AGG_BREAK_8723A);
- } else
- tx_desc->txdw1 |= cpu_to_le32(TXDESC_AGG_BREAK_8723A);
+ } else {
+ if (ampdu_enable)
+ tx_desc->txdw2 |= cpu_to_le32(TXDESC_AGG_ENABLE_8723B);
+ else
+ tx_desc->txdw2 |= cpu_to_le32(TXDESC_AGG_BREAK_8723B);
+ };
if (ieee80211_is_data_qos(hdr->frame_control))
tx_desc->txdw4 |= cpu_to_le32(TXDESC_QOS);