developer | c2cfe0f | 2023-09-22 04:11:09 +0800 | [diff] [blame] | 1 | From db3aa2948cee6fce2c2cc17d4c5a4a0c31b6365d Mon Sep 17 00:00:00 2001 |
| 2 | From: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 3 | Date: Wed, 6 Sep 2023 14:51:00 +0800 |
| 4 | Subject: [PATCH 10/22] wifi: mt76: mt7996: fill txd bandwidth filed value for |
| 5 | fixed rate frame |
| 6 | |
| 7 | Fill bw field value for fixed rate enabled frame to keep it be sent by bw20. |
| 8 | Without this change, the bw of fixed rate enabled frame will be decided |
| 9 | by hardware. |
| 10 | |
| 11 | Reported-by: Chank Chen <chank.chen@mediatek.com> |
| 12 | Signed-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 | |
| 18 | diff --git a/mt76_connac3_mac.h b/mt76_connac3_mac.h |
| 19 | index 87bfa441a..df6b02af9 100644 |
| 20 | --- 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) |
| 30 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
| 31 | index c20a6affc..38822402b 100644 |
| 32 | --- a/mt7996/mac.c |
| 33 | +++ b/mt7996/mac.c |
| 34 | @@ -912,7 +912,8 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
| 35 | 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 | -- |
| 45 | 2.39.2 |
| 46 | |