linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <kvalo@kernel.org>
Cc: <gary.chang@realtek.com>, <phhuang@realtek.com>,
	<linux-wireless@vger.kernel.org>
Subject: [PATCH 4/8] wifi: rtw89: disable RTS when broadcast/multicast
Date: Fri, 19 Jan 2024 16:14:57 +0800	[thread overview]
Message-ID: <20240119081501.25223-5-pkshih@realtek.com> (raw)
In-Reply-To: <20240119081501.25223-1-pkshih@realtek.com>

From: Po-Hao Huang <phhuang@realtek.com>

RTS switch should not be enabled for broadcast and multicast. This
could cause incorrect behavior during AP mode, so we fix it.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index dfca642a7570..6e52c4f82011 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -1176,7 +1176,8 @@ static __le32 rtw89_build_txwd_info2_v1(struct rtw89_tx_desc_info *desc_info)
 
 static __le32 rtw89_build_txwd_info4(struct rtw89_tx_desc_info *desc_info)
 {
-	u32 dword = FIELD_PREP(RTW89_TXWD_INFO4_RTS_EN, 1) |
+	bool rts_en = !desc_info->is_bmc;
+	u32 dword = FIELD_PREP(RTW89_TXWD_INFO4_RTS_EN, rts_en) |
 		    FIELD_PREP(RTW89_TXWD_INFO4_HW_RTS_EN, 1);
 
 	return cpu_to_le32(dword);
@@ -1329,7 +1330,8 @@ static __le32 rtw89_build_txwd_info2_v2(struct rtw89_tx_desc_info *desc_info)
 
 static __le32 rtw89_build_txwd_info4_v2(struct rtw89_tx_desc_info *desc_info)
 {
-	u32 dword = FIELD_PREP(BE_TXD_INFO4_RTS_EN, 1) |
+	bool rts_en = !desc_info->is_bmc;
+	u32 dword = FIELD_PREP(BE_TXD_INFO4_RTS_EN, rts_en) |
 		    FIELD_PREP(BE_TXD_INFO4_HW_RTS_EN, 1);
 
 	return cpu_to_le32(dword);
-- 
2.25.1


  parent reply	other threads:[~2024-01-19  8:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  8:14 [PATCH 0/8] wifi: rtw89: refine hardware scan and concurrent Ping-Ke Shih
2024-01-19  8:14 ` [PATCH 1/8] wifi: rtw89: refine add_chan H2C command to encode_bits Ping-Ke Shih
2024-01-23 11:38   ` Kalle Valo
2024-01-19  8:14 ` [PATCH 2/8] wifi: rtw89: refine hardware scan C2H events Ping-Ke Shih
2024-01-19  8:14 ` [PATCH 3/8] wifi: rtw89: Set default CQM config if not present Ping-Ke Shih
2024-01-19  8:14 ` Ping-Ke Shih [this message]
2024-01-19  8:14 ` [PATCH 5/8] wifi: rtw89: fix null pointer access when abort scan Ping-Ke Shih
2024-01-19  8:14 ` [PATCH 6/8] wifi: rtw89: add wait/completion for " Ping-Ke Shih
2024-01-19  8:15 ` [PATCH 7/8] wifi: rtw89: fix HW scan timeout due to TSF sync issue Ping-Ke Shih
2024-01-19  8:15 ` [PATCH 8/8] wifi: rtw89: fix disabling concurrent mode TX hang issue Ping-Ke Shih

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=20240119081501.25223-5-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=gary.chang@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=phhuang@realtek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).