ath10k-ct: activate user space firmware loading again
[openwrt/staging/dedeckeh.git] / package / kernel / mac80211 / patches / 331-ath9k-fix-more-data-flag-for-buffered-multicast-pack.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sun, 23 Jul 2017 14:58:22 +0200
3 Subject: [PATCH] ath9k: fix more-data flag for buffered multicast packets
4
5 The flag needs to be cleared for the last packet in the list, not the
6 first one. Fixes some issues with multicast packet loss for powersave
7 clients connected to an ath9k AP.
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/drivers/net/wireless/ath/ath9k/xmit.c
13 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
14 @@ -2451,7 +2451,6 @@ void ath_tx_cabq(struct ieee80211_hw *hw
15 .txq = sc->beacon.cabq
16 };
17 struct ath_tx_info info = {};
18 - struct ieee80211_hdr *hdr;
19 struct ath_buf *bf_tail = NULL;
20 struct ath_buf *bf;
21 LIST_HEAD(bf_q);
22 @@ -2495,15 +2494,10 @@ void ath_tx_cabq(struct ieee80211_hw *hw
23 if (list_empty(&bf_q))
24 return;
25
26 - bf = list_first_entry(&bf_q, struct ath_buf, list);
27 - hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data;
28 -
29 - if (hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) {
30 - hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_MOREDATA);
31 - dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
32 - sizeof(*hdr), DMA_TO_DEVICE);
33 - }
34 + bf = list_last_entry(&bf_q, struct ath_buf, list);
35 + ath9k_set_moredata(sc, bf, false);
36
37 + bf = list_first_entry(&bf_q, struct ath_buf, list);
38 ath_txq_lock(sc, txctl.txq);
39 ath_tx_fill_desc(sc, bf, txctl.txq, 0);
40 ath_tx_txqaddbuf(sc, txctl.txq, &bf_q, false);