All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shayne Chen <shayne.chen@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	Bo Jiao <Bo.Jiao@mediatek.com>,
	linux-mediatek <linux-mediatek@lists.infradead.org>,
	Howard Hsu <howard-yh.hsu@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>
Subject: [PATCH 08/11] wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames
Date: Mon, 23 Oct 2023 23:38:51 +0800	[thread overview]
Message-ID: <20231023153854.10708-8-shayne.chen@mediatek.com> (raw)
In-Reply-To: <20231023153854.10708-1-shayne.chen@mediatek.com>

From: Howard Hsu <howard-yh.hsu@mediatek.com>

Always set the fixed_bw bitfield for fixed rate frames to keep it being
sent with specific bandwidth. Without this change, the bw of fixed rate
frames will still be decided by hardware.

Reported-by: Chank Chen <chank.chen@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h | 3 ++-
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c       | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
index 2250252b2047..36edf1d3dfca 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
@@ -239,7 +239,8 @@ enum tx_mgnt_type {
 
 #define MT_TXD6_TX_SRC			GENMASK(31, 30)
 #define MT_TXD6_VTA			BIT(28)
-#define MT_TXD6_BW			GENMASK(25, 22)
+#define MT_TXD6_FIXED_BW		BIT(25)
+#define MT_TXD6_BW			GENMASK(24, 22)
 #define MT_TXD6_TX_RATE			GENMASK(21, 16)
 #define MT_TXD6_TIMESTAMP_OFS_EN	BIT(15)
 #define MT_TXD6_TIMESTAMP_OFS_IDX	GENMASK(14, 10)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 18c7fef00fff..89e23a95ecc2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -943,7 +943,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


  parent reply	other threads:[~2023-10-23 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 15:38 [PATCH 01/11] wifi: mt76: mt7996: add support for variants with auxiliary RX path Shayne Chen
2023-10-23 15:38 ` [PATCH 02/11] wifi: mt76: mt7996: add TX statistics for EHT mode in debugfs Shayne Chen
2023-10-23 15:38 ` [PATCH 03/11] wifi: mt76: connac: add thermal protection support for mt7996 Shayne Chen
2023-10-23 15:38 ` [PATCH 04/11] wifi: mt76: mt7996: add thermal sensor device support Shayne Chen
2023-10-23 15:38 ` [PATCH 05/11] wifi: mt76: connac: add beacon duplicate TX mode support for mt7996 Shayne Chen
2023-10-23 15:38 ` [PATCH 06/11] wifi: mt76: mt7996: fix the size of struct bss_rate_tlv Shayne Chen
2023-10-23 15:38 ` [PATCH 07/11] wifi: mt76: mt7996: adjust WFDMA settings to improve performance Shayne Chen
2023-10-23 15:38 ` Shayne Chen [this message]
2023-10-23 15:38 ` [PATCH 09/11] wifi: mt76: mt7996: handle IEEE80211_RC_SMPS_CHANGED Shayne Chen
2023-10-23 15:38 ` [PATCH 10/11] wifi: mt76: mt7996: align the format of fixed rate command Shayne Chen
2023-10-23 15:38 ` [PATCH 11/11] wifi: mt76: mt7996: fix rate usage of inband discovery frames Shayne Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231023153854.10708-8-shayne.chen@mediatek.com \
    --to=shayne.chen@mediatek.com \
    --cc=Bo.Jiao@mediatek.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=howard-yh.hsu@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.