Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <dian_syuan0116@realtek.com>, <echuang@realtek.com>,
	<phhuang@realtek.com>, <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 02/15] wifi: rtw89: mlo: update link id to FW upon connection
Date: Wed, 9 Sep 2026 14:59:51 +0800	[thread overview]
Message-ID: <20260909070004.35353-3-pkshih@realtek.com> (raw)
In-Reply-To: <20260909070004.35353-1-pkshih@realtek.com>

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

Update link id to firmware so correct information can be referenced.
This is required for the new power save firmware feature.
Without this FW could try to maintain power state of a not existing
link and leads to unexpected errors.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/fw.c | 6 +++---
 drivers/net/wireless/realtek/rtw89/fw.h | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 6760e0053665..86db025afd7f 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -5193,10 +5193,10 @@ int rtw89_fw_h2c_join_info(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwv
 				      RTW89_H2C_JOININFO_W1_EMLSR_PADDING) |
 		     le32_encode_bits(IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US,
 				      RTW89_H2C_JOININFO_W1_EMLSR_TRANS_DELAY) |
-		     le32_encode_bits(0, RTW89_H2C_JOININFO_W2_MACID_EXT) |
-		     le32_encode_bits(0, RTW89_H2C_JOININFO_W2_MAIN_MACID_EXT);
+		     le32_encode_bits(rtwvif_link->link_id, RTW89_H2C_JOININFO_W1_LINK_ID);
 
-	h2c_v1->w2 = 0;
+	h2c_v1->w2 = le32_encode_bits(0, RTW89_H2C_JOININFO_W2_MACID_EXT) |
+		     le32_encode_bits(0, RTW89_H2C_JOININFO_W2_MAIN_MACID_EXT);
 
 done:
 	rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index f7d017d3ced0..6cb1f6dfb650 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -1858,6 +1858,11 @@ struct rtw89_h2c_join_v1 {
 #define RTW89_H2C_JOININFO_W1_INIT_PWR_STATE BIT(15)
 #define RTW89_H2C_JOININFO_W1_EMLSR_PADDING GENMASK(18, 16)
 #define RTW89_H2C_JOININFO_W1_EMLSR_TRANS_DELAY GENMASK(21, 19)
+#define RTW89_H2C_JOININFO_W1_IS_MLD_EXT BIT(22)
+#define RTW89_H2C_JOININFO_W1_SUPPORT_3LINKS BIT(23)
+#define RTW89_H2C_JOININFO_W1_IS_3RD_LINK BIT(24)
+#define RTW89_H2C_JOININFO_W1_LINK_ID GENMASK(28, 25)
+#define RTW89_H2C_JOININFO_W1_UPDATE_MODE GENMASK(31, 29)
 #define RTW89_H2C_JOININFO_W2_MACID_EXT GENMASK(7, 0)
 #define RTW89_H2C_JOININFO_W2_MAIN_MACID_EXT GENMASK(15, 8)
 
-- 
2.25.1


  parent reply	other threads:[~2026-09-09  7:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  6:59 [PATCH rtw-next 00/15] wifi: rtw89: correct MLO behavior, fix Coverity issues, and update hardware settings Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 01/15] wifi: rtw89: consider sta maximum AMSDU subframes number to decide TX work waiting Ping-Ke Shih
2026-09-09  6:59 ` Ping-Ke Shih [this message]
2026-09-09  6:59 ` [PATCH rtw-next 03/15] Revert "wifi: rtw89: fix unable to receive probe responses under MLO connection" Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 04/15] wifi: rtw89: modify active scan rule for 6GHz band Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 05/15] wifi: rtw89: fix ctrl_sco_cck for Wi-Fi 7 Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 06/15] wifi: rtw89: 8852a: prevent potential OOB in ctrl_sco_cck Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 07/15] wifi: rtw89: fw: cmd_ofld_flush always reset counter Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 08/15] wifi: rtw89: explicitly declare TX queue flags by DECLARE_BITMAP() Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 09/15] wifi: rtw89: 8922d: add extra data to PS H2C Ping-Ke Shih
2026-09-09  6:59 ` [PATCH rtw-next 10/15] wifi: rtw89: mac: change beamformee CSI direct forward to CMAC_TXDMA Ping-Ke Shih
2026-09-09  7:00 ` [PATCH rtw-next 11/15] wifi: rtw89: fw: extend ch_info format of hw_scan to v2 Ping-Ke Shih
2026-09-09  7:00 ` [PATCH rtw-next 12/15] wifi: rtw89: 8922d: update BA cam format to G7 Ping-Ke Shih
2026-09-09  7:00 ` [PATCH rtw-next 13/15] wifi: rtw89: 8851b: rfk: set DCK start and delay time Ping-Ke Shih
2026-09-09  7:00 ` [PATCH rtw-next 14/15] wifi: rtw89: 8852b: update default value for ANA SWR Ping-Ke Shih
2026-09-09  7:00 ` [PATCH rtw-next 15/15] wifi: rtw89: phy: correct PHY-1 EDCCA report register access 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=20260909070004.35353-3-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=dian_syuan0116@realtek.com \
    --cc=echuang@realtek.com \
    --cc=kevin_yang@realtek.com \
    --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