developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 1 | From 5e2177e77b9609185f748708332aa6a6fdf4d1f9 Mon Sep 17 00:00:00 2001 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Mon, 6 Mar 2023 15:52:26 +0800 |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 4 | Subject: [PATCH 14/39] wifi: mt76: mt7996: set wcid in txp |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 5 | |
| 6 | Set correct wcid in txp for SDO to get wtbl. |
| 7 | |
| 8 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 9 | Change-Id: Ie715a659ff52f2d85332158f273d0ee4fe9f4051 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 10 | --- |
| 11 | mt7996/mac.c | 8 +++++--- |
| 12 | 1 file changed, 5 insertions(+), 3 deletions(-) |
| 13 | |
| 14 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 15 | index 2da61d2..bddb84f 100644 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 16 | --- a/mt7996/mac.c |
| 17 | +++ b/mt7996/mac.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 18 | @@ -1166,10 +1166,12 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | txp->fw.token = cpu_to_le16(id); |
| 22 | - if (test_bit(MT_WCID_FLAG_4ADDR, &wcid->flags)) |
| 23 | - txp->fw.rept_wds_wcid = cpu_to_le16(wcid->idx); |
| 24 | - else |
| 25 | + if ((is_8023 && is_multicast_ether_addr(tx_info->skb->data)) || |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 26 | + (!is_8023 && is_multicast_ether_addr(hdr->addr1))) |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 27 | txp->fw.rept_wds_wcid = cpu_to_le16(0xfff); |
| 28 | + else |
| 29 | + txp->fw.rept_wds_wcid = cpu_to_le16(wcid->idx); |
| 30 | + |
| 31 | tx_info->skb = DMA_DUMMY_DATA; |
| 32 | |
| 33 | /* pass partial skb header to fw */ |
| 34 | -- |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 35 | 2.18.0 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 36 | |