Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <ku920601@realtek.com>
Subject: [PATCH rtw-next 07/13] wifi: rtw89: coex: Fix Wi-Fi role info H2C command header issue
Date: Fri, 17 Jul 2026 14:57:33 +0800	[thread overview]
Message-ID: <20260717065739.64124-8-pkshih@realtek.com> (raw)
In-Reply-To: <20260717065739.64124-1-pkshih@realtek.com>

From: Ching-Te Ku <ku920601@realtek.com>

The function to filled up H2C command data is the last step in the driver,
the next step is going to firmware. So the structure version number should
not included driver local branch number (like firmware is v5, but driver
branch to v105), it should be assigned as a explicit version number which
paired with firmware.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/fw.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 53ec6efb1cb2..34bc52519ea2 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -6255,6 +6255,10 @@ int rtw89_fw_h2c_cxdrv_role_v7(struct rtw89_dev *rtwdev, u8 type)
 	skb_put(skb, len);
 	h2c = (struct rtw89_h2c_cxrole_v7 *)skb->data;
 
+	h2c->hdr.type = type;
+	h2c->hdr.ver = 7;
+	h2c->hdr.len = len - H2C_LEN_CXDRVHDR_V7;
+
 	h2c->r.connect_cnt = r->connect_cnt;
 	h2c->r.link_mode = r->link_mode;
 	h2c->r.link_mode_chg = r->link_mode_chg;
@@ -6323,7 +6327,7 @@ int rtw89_fw_h2c_cxdrv_role_v8(struct rtw89_dev *rtwdev, u8 type)
 	h2c = (struct rtw89_h2c_cxrole_v8 *)skb->data;
 
 	h2c->hdr.type = type;
-	h2c->hdr.ver = rtwdev->btc.ver->fwlrole;
+	h2c->hdr.ver = 8;
 	h2c->hdr.len = len - H2C_LEN_CXDRVHDR_V7;
 	h2c->r.connect_cnt = r->connect_cnt;
 	h2c->r.link_mode = r->link_mode;
@@ -6397,7 +6401,7 @@ int rtw89_fw_h2c_cxdrv_role_v10(struct rtw89_dev *rtwdev, u8 type)
 	h2c = (struct rtw89_h2c_cxrole_v10 *)skb->data;
 
 	h2c->hdr.type = type;
-	h2c->hdr.ver = rtwdev->btc.ver->fwlrole;
+	h2c->hdr.ver = 10;
 	h2c->hdr.len = len - H2C_LEN_CXDRVHDR_V7;
 
 	for (j = RTW89_MAC_0; j <= RTW89_MAC_1; j++) {
-- 
2.25.1


  parent reply	other threads:[~2026-07-17  6:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  6:57 [PATCH rtw-next 00/13] wifi: rtw89: coex: add more firmware command and event formats for newer version Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 01/13] wifi: rtw89: coex: Add version 107 TX/RX info for firmware feature Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 02/13] wifi: rtw89: coex: Add version 9 report control info Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 03/13] wifi: rtw89: coex: Fix unexpected grant-signal assignee Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 04/13] wifi: rtw89: coex: Branch out version 105 firmware report map index Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 05/13] wifi: rtw89: coex: Refine chip initial related structure Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 06/13] wifi: rtw89: coex: Add driver info H2C command index version 103 Ping-Ke Shih
2026-07-17  6:57 ` Ping-Ke Shih [this message]
2026-07-17  6:57 ` [PATCH rtw-next 08/13] wifi: rtw89: coex: Add firmware 0.29.133.X support for RTL8852B family Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 09/13] wifi: rtw89: coex: Add TDMA version 4 Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 10/13] wifi: rtw89: coex: Add slots version 2 Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 11/13] wifi: rtw89: coex: Add cycle status report version 105 Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 12/13] wifi: rtw89: coex: Add wifi role info version 101 Ping-Ke Shih
2026-07-17  6:57 ` [PATCH rtw-next 13/13] wifi: rtw89: coex: Add firmware 0.27.97.X support for RTL8852C 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=20260717065739.64124-8-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=ku920601@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    /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