blob: 15c49bd6c0be2c2f9ab02741dd619bd08253906e [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 112a2fd7458a1ee1a23b236c024bbc858b9d935e Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 15 Jul 2024 11:42:47 +0800
4Subject: [PATCH 179/199] mtk: mt76: mt7996: fill in sn into txd for MLD
5 multicast packet
6
7Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
8---
9 mt7996/mac.c | 9 +++++++--
10 1 file changed, 7 insertions(+), 2 deletions(-)
11
12diff --git a/mt7996/mac.c b/mt7996/mac.c
13index fae24cad..c91c550d 100644
14--- a/mt7996/mac.c
15+++ b/mt7996/mac.c
16@@ -681,6 +681,7 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi,
17 bool multicast = is_multicast_ether_addr(hdr->addr1);
18 u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
19 __le16 fc = hdr->frame_control, sc = hdr->seq_ctrl;
20+ u16 seqno = le16_to_cpu(sc);
21 u8 fc_type, fc_stype;
22 u32 val;
23
24@@ -739,9 +740,13 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi,
25 txwi[3] |= cpu_to_le32(MT_TXD3_REM_TX_COUNT);
26 }
27
28- if (info->flags & IEEE80211_TX_CTL_INJECTED) {
29- u16 seqno = le16_to_cpu(sc);
30+ if (ieee80211_vif_is_mld(info->control.vif) && multicast) {
31+ val = MT_TXD3_SN_VALID |
32+ FIELD_PREP(MT_TXD3_SEQ, IEEE80211_SEQ_TO_SN(seqno));
33+ txwi[3] |= cpu_to_le32(val);
34+ }
35
36+ if (info->flags & IEEE80211_TX_CTL_INJECTED) {
37 if (ieee80211_is_back_req(hdr->frame_control)) {
38 struct ieee80211_bar *bar;
39
40--
412.18.0
42