From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <ku920601@realtek.com>
Subject: [PATCH rtw-next 08/10] wifi: rtw89: coex: Renaming drvinfo_type to drvinfo_ver
Date: Wed, 24 Jun 2026 11:39:39 +0800 [thread overview]
Message-ID: <20260624033941.45918-9-pkshih@realtek.com> (raw)
In-Reply-To: <20260624033941.45918-1-pkshih@realtek.com>
From: Ching-Te Ku <ku920601@realtek.com>
It's more closing to the original meaning. It is defined for rearranging
driver info index by firmware support version.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/coex.c | 84 +++++++++++------------
drivers/net/wireless/realtek/rtw89/core.h | 2 +-
2 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index dd9d6cbc2943..572eed7939e1 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -138,7 +138,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 7, .frptmap = 3, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_type = 1, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_ver = 1, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 8,
.fcxtrx = 0,
},
@@ -147,7 +147,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 7, .frptmap = 3, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_type = 1, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_ver = 1, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 8,
.fcxtrx = 0,
},
@@ -156,7 +156,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 8, .frptmap = 4, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 3, .drvinfo_type = 2, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 3, .drvinfo_ver = 2, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 1, .fcxmlo = 1, .bt_desired = 9,
.fcxtrx = 7,
},
@@ -165,7 +165,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 8, .frptmap = 4, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 3, .drvinfo_type = 2, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 3, .drvinfo_ver = 2, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 1, .fcxmlo = 1, .bt_desired = 9,
.fcxtrx = 0,
},
@@ -174,7 +174,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 8, .frptmap = 3, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 1, .drvinfo_type = 1, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 1, .drvinfo_ver = 1, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -183,7 +183,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 2, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 2, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 2, .frptmap = 3, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1800,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -192,7 +192,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 3, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1280,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1280,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -201,7 +201,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 2, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1280,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1280,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -210,7 +210,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 1, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 2, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1280,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1280,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -219,7 +219,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 7, .fcxnullsta = 7, .fcxmreg = 7, .fcxgpiodbg = 7,
.fcxbtver = 7, .fcxbtscan = 7, .fcxbtafh = 7, .fcxbtdevinfo = 7,
.fwlrole = 7, .frptmap = 3, .fcxctrl = 7, .fcxinit = 7,
- .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_type = 1, .info_buf = 1800,
+ .fwevntrptl = 1, .fwc2hfunc = 2, .drvinfo_ver = 1, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 8,
.fcxtrx = 0,
},
@@ -228,7 +228,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 2, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 2, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 2, .frptmap = 3, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1800,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -237,7 +237,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 3, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1800,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1800,
.max_role_num = 6, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -246,7 +246,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 1, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 1, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1280,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1280,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -255,7 +255,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 3, .fcxnullsta = 2, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 2, .fcxbtdevinfo = 1,
.fwlrole = 1, .frptmap = 3, .fcxctrl = 1, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 0, .drvinfo_type = 0, .info_buf = 1280,
+ .fwevntrptl = 0, .fwc2hfunc = 0, .drvinfo_ver = 0, .info_buf = 1280,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -264,7 +264,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 2, .fcxnullsta = 1, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 1, .fcxbtdevinfo = 1,
.fwlrole = 0, .frptmap = 0, .fcxctrl = 0, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 0, .drvinfo_type = 0, .info_buf = 1024,
+ .fwevntrptl = 0, .fwc2hfunc = 0, .drvinfo_ver = 0, .info_buf = 1024,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -275,7 +275,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {
.fcxstep = 2, .fcxnullsta = 1, .fcxmreg = 1, .fcxgpiodbg = 1,
.fcxbtver = 1, .fcxbtscan = 1, .fcxbtafh = 1, .fcxbtdevinfo = 1,
.fwlrole = 0, .frptmap = 0, .fcxctrl = 0, .fcxinit = 0,
- .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_type = 0, .info_buf = 1024,
+ .fwevntrptl = 0, .fwc2hfunc = 1, .drvinfo_ver = 0, .info_buf = 1024,
.max_role_num = 5, .fcxosi = 0, .fcxmlo = 0, .bt_desired = 7,
.fcxtrx = 0,
},
@@ -2789,62 +2789,62 @@ static void _fw_set_policy(struct rtw89_dev *rtwdev, u16 policy_type,
rtw89_set_coex_ctrl_lps(rtwdev, btc->lps);
}
-static void _fw_set_drv_info(struct rtw89_dev *rtwdev, u8 type)
+static void _fw_set_drv_info(struct rtw89_dev *rtwdev, u8 index)
{
struct rtw89_btc *btc = &rtwdev->btc;
const struct rtw89_btc_ver *ver = btc->ver;
- switch (type) {
+ switch (index) {
case CXDRVINFO_INIT:
if (ver->fcxinit == 7)
- rtw89_fw_h2c_cxdrv_init_v7(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_init_v7(rtwdev, index);
else
- rtw89_fw_h2c_cxdrv_init(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_init(rtwdev, index);
break;
case CXDRVINFO_ROLE:
if (ver->fwlrole == 0)
- rtw89_fw_h2c_cxdrv_role(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_role(rtwdev, index);
else if (ver->fwlrole == 1)
- rtw89_fw_h2c_cxdrv_role_v1(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_role_v1(rtwdev, index);
else if (ver->fwlrole == 2)
- rtw89_fw_h2c_cxdrv_role_v2(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_role_v2(rtwdev, index);
else if (ver->fwlrole == 7)
- rtw89_fw_h2c_cxdrv_role_v7(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_role_v7(rtwdev, index);
else if (ver->fwlrole == 8)
- rtw89_fw_h2c_cxdrv_role_v8(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_role_v8(rtwdev, index);
break;
case CXDRVINFO_CTRL:
- if (ver->drvinfo_type == 1)
- type = 2;
+ if (ver->drvinfo_ver == 1)
+ index = 2;
if (ver->fcxctrl == 7)
- rtw89_fw_h2c_cxdrv_ctrl_v7(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_ctrl_v7(rtwdev, index);
else
- rtw89_fw_h2c_cxdrv_ctrl(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_ctrl(rtwdev, index);
break;
case CXDRVINFO_TRX:
- if (ver->drvinfo_type == 1)
- type = 3;
+ if (ver->drvinfo_ver == 1)
+ index = 3;
if (ver->fcxtrx == 7)
- rtw89_fw_h2c_cxdrv_trx_v7(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_trx_v7(rtwdev, index);
else if (ver->fcxtrx == 9)
- rtw89_fw_h2c_cxdrv_trx_v9(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_trx_v9(rtwdev, index);
break;
case CXDRVINFO_RFK:
- if (ver->drvinfo_type == 1)
+ if (ver->drvinfo_ver == 1)
return;
- rtw89_fw_h2c_cxdrv_rfk(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_rfk(rtwdev, index);
break;
case CXDRVINFO_TXPWR:
- if (ver->drvinfo_type == 3)
- type = 4;
+ if (ver->drvinfo_ver == 3)
+ index = 4;
if (ver->fcxtrx == 7)
- rtw89_fw_h2c_cxtxpwr_v7(rtwdev, type);
+ rtw89_fw_h2c_cxtxpwr_v7(rtwdev, index);
else if (ver->fcxtrx == 9)
- rtw89_fw_h2c_cxtxpwr_v9(rtwdev, type);
+ rtw89_fw_h2c_cxtxpwr_v9(rtwdev, index);
break;
case CXDRVINFO_FDDT:
case CXDRVINFO_MLO:
@@ -2852,12 +2852,12 @@ static void _fw_set_drv_info(struct rtw89_dev *rtwdev, u8 type)
if (!ver->fcxosi)
return;
- if (ver->drvinfo_type == 2)
- type = 7;
+ if (ver->drvinfo_ver == 2)
+ index = 7;
else
return;
- rtw89_fw_h2c_cxdrv_osi_info(rtwdev, type);
+ rtw89_fw_h2c_cxdrv_osi_info(rtwdev, index);
break;
default:
break;
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index 70c6ee1a6da2..7a87ffc1931e 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -3365,7 +3365,7 @@ struct rtw89_btc_ver {
u8 fwevntrptl;
u8 fwc2hfunc;
- u8 drvinfo_type;
+ u8 drvinfo_ver;
u16 info_buf;
u8 max_role_num;
u8 fcxosi;
--
2.25.1
next prev parent reply other threads:[~2026-06-24 3:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 3:39 [PATCH rtw-next 00/10] wifi: rtw89: coex: update BT coexistence to support dual BT for RTL8922D Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 01/10] wifi: rtw89: coex: force to exit Wi-Fi LPS while Bluetooth profile exist Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 02/10] wifi: rtw89: coex: offset current BT info to BT0 for dual BT configuration Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 03/10] wifi: rtw89: coex: Move wifi related counters to wifi info Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 04/10] wifi: rtw89: coex: Extend bt_slot_req for dual MAC wifi Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 05/10] wifi: rtw89: coex: Move Bluetooth related counters to BT info Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 06/10] wifi: rtw89: coex: Refine third party module related coexistence Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 07/10] wifi: rtw89: coex: Add TX/RX RF parameter format version 9 Ping-Ke Shih
2026-06-24 3:39 ` Ping-Ke Shih [this message]
2026-06-24 3:39 ` [PATCH rtw-next 09/10] wifi: rtw89: coex: Add Wi-Fi firmware 0.35.94.1 support for RTL8922D Ping-Ke Shih
2026-06-24 3:39 ` [PATCH rtw-next 10/10] wifi: rtw89: coex: Add RTL8922D chip string 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=20260624033941.45918-9-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