blob: 9f0aa6b970f7f6b84e70406103b6be271fa8ea81 [file] [log] [blame]
From db3aa2948cee6fce2c2cc17d4c5a4a0c31b6365d Mon Sep 17 00:00:00 2001
From: Howard Hsu <howard-yh.hsu@mediatek.com>
Date: Wed, 6 Sep 2023 14:51:00 +0800
Subject: [PATCH 10/22] wifi: mt76: mt7996: fill txd bandwidth filed value for
fixed rate frame
Fill bw field value for fixed rate enabled frame to keep it be sent by bw20.
Without this change, the bw of fixed rate enabled frame will be decided
by hardware.
Reported-by: Chank Chen <chank.chen@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
---
mt76_connac3_mac.h | 1 +
mt7996/mac.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/mt76_connac3_mac.h b/mt76_connac3_mac.h
index 87bfa441a..df6b02af9 100644
--- a/mt76_connac3_mac.h
+++ b/mt76_connac3_mac.h
@@ -239,6 +239,7 @@ enum tx_mgnt_type {
#define MT_TXD6_TX_SRC GENMASK(31, 30)
#define MT_TXD6_VTA BIT(28)
+#define MT_TXD6_FIXED_BW BIT(25)
#define MT_TXD6_BW GENMASK(25, 22)
#define MT_TXD6_TX_RATE GENMASK(21, 16)
#define MT_TXD6_TIMESTAMP_OFS_EN BIT(15)
diff --git a/mt7996/mac.c b/mt7996/mac.c
index c20a6affc..38822402b 100644
--- a/mt7996/mac.c
+++ b/mt7996/mac.c
@@ -912,7 +912,8 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
idx = mvif->basic_rates_idx;
}
- txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TX_RATE, idx));
+ val = FIELD_PREP(MT_TXD6_TX_RATE, idx) | MT_TXD6_FIXED_BW;
+ txwi[6] |= cpu_to_le32(val);
txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE);
}
}
--
2.39.2