blob: d32dea5eaf3e6e146cf594af53de1a356e0648b1 [file] [log] [blame]
developer7e2761e2023-10-12 08:11:13 +08001From bae9e0c386cd710bdf414b0e0e097ea95812673e Mon Sep 17 00:00:00 2001
developerc2cfe0f2023-09-22 04:11:09 +08002From: Howard Hsu <howard-yh.hsu@mediatek.com>
3Date: Wed, 6 Sep 2023 14:51:00 +0800
developer7e2761e2023-10-12 08:11:13 +08004Subject: [PATCH 11/98] wifi: mt76: mt7996: fill txd bandwidth filed value for
developerc2cfe0f2023-09-22 04:11:09 +08005 fixed rate frame
6
7Fill bw field value for fixed rate enabled frame to keep it be sent by bw20.
8Without this change, the bw of fixed rate enabled frame will be decided
9by hardware.
10
11Reported-by: Chank Chen <chank.chen@mediatek.com>
12Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
13---
14 mt76_connac3_mac.h | 1 +
15 mt7996/mac.c | 3 ++-
16 2 files changed, 3 insertions(+), 1 deletion(-)
17
18diff --git a/mt76_connac3_mac.h b/mt76_connac3_mac.h
developer7e2761e2023-10-12 08:11:13 +080019index 87bfa44..df6b02a 100644
developerc2cfe0f2023-09-22 04:11:09 +080020--- a/mt76_connac3_mac.h
21+++ b/mt76_connac3_mac.h
22@@ -239,6 +239,7 @@ enum tx_mgnt_type {
23
24 #define MT_TXD6_TX_SRC GENMASK(31, 30)
25 #define MT_TXD6_VTA BIT(28)
26+#define MT_TXD6_FIXED_BW BIT(25)
27 #define MT_TXD6_BW GENMASK(25, 22)
28 #define MT_TXD6_TX_RATE GENMASK(21, 16)
29 #define MT_TXD6_TIMESTAMP_OFS_EN BIT(15)
30diff --git a/mt7996/mac.c b/mt7996/mac.c
developer7e2761e2023-10-12 08:11:13 +080031index 6688186..2c6bee4 100644
developerc2cfe0f2023-09-22 04:11:09 +080032--- a/mt7996/mac.c
33+++ b/mt7996/mac.c
developer7e2761e2023-10-12 08:11:13 +080034@@ -943,7 +943,8 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
developerc2cfe0f2023-09-22 04:11:09 +080035 idx = mvif->basic_rates_idx;
36 }
37
38- txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TX_RATE, idx));
39+ val = FIELD_PREP(MT_TXD6_TX_RATE, idx) | MT_TXD6_FIXED_BW;
40+ txwi[6] |= cpu_to_le32(val);
41 txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE);
42 }
43 }
44--
developer7e2761e2023-10-12 08:11:13 +0800452.18.0
developerc2cfe0f2023-09-22 04:11:09 +080046