[source] ath9k: fix more-data flag for buffered multicast packets

LEDE Commits lede-commits at lists.infradead.org
Mon Jul 24 01:49:01 PDT 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/22a74ed310fcda175105c46e22638ffe8e560bcd

commit 22a74ed310fcda175105c46e22638ffe8e560bcd
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 24 10:48:26 2017 +0200

    ath9k: fix more-data flag for buffered multicast packets
    
    The flag needs to be cleared for the last packet in the list, not the
    first one. Fixes some issues with multicast packet loss for powersave
    clients connected to an ath9k AP.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...ore-data-flag-for-buffered-multicast-pack.patch | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/package/kernel/mac80211/patches/331-ath9k-fix-more-data-flag-for-buffered-multicast-pack.patch b/package/kernel/mac80211/patches/331-ath9k-fix-more-data-flag-for-buffered-multicast-pack.patch
new file mode 100644
index 0000000..d09c82c
--- /dev/null
+++ b/package/kernel/mac80211/patches/331-ath9k-fix-more-data-flag-for-buffered-multicast-pack.patch
@@ -0,0 +1,38 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 23 Jul 2017 14:58:22 +0200
+Subject: [PATCH] ath9k: fix more-data flag for buffered multicast packets
+
+The flag needs to be cleared for the last packet in the list, not the
+first one. Fixes some issues with multicast packet loss for powersave
+clients connected to an ath9k AP.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -2451,7 +2451,6 @@ void ath_tx_cabq(struct ieee80211_hw *hw
+ 		.txq = sc->beacon.cabq
+ 	};
+ 	struct ath_tx_info info = {};
+-	struct ieee80211_hdr *hdr;
+ 	struct ath_buf *bf_tail = NULL;
+ 	struct ath_buf *bf;
+ 	LIST_HEAD(bf_q);
+@@ -2495,14 +2494,8 @@ void ath_tx_cabq(struct ieee80211_hw *hw
+ 	if (list_empty(&bf_q))
+ 		return;
+ 
+-	bf = list_first_entry(&bf_q, struct ath_buf, list);
+-	hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data;
+-
+-	if (hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) {
+-		hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_MOREDATA);
+-		dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
+-			sizeof(*hdr), DMA_TO_DEVICE);
+-	}
++	bf = list_last_entry(&bf_q, struct ath_buf, list);
++	ath9k_set_moredata(sc, bf, false);
+ 
+ 	ath_txq_lock(sc, txctl.txq);
+ 	ath_tx_fill_desc(sc, bf, txctl.txq, 0);



More information about the lede-commits mailing list