From: Jeff Chen <chunfan.chen@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: lukas@wunner.de, briannorris@chromium.org,
johannes@sipsolutions.net, francesco@dolcini.it,
Jeff Chen <jeff.chen_1@nxp.com>
Subject: [PATCH] wifi: mwifiex: append hotfix number to firmware version string
Date: Thu, 17 Sep 2026 11:23:50 +0800 [thread overview]
Message-ID: <20260917032350.2323119-1-chunfan.chen@gmail.com> (raw)
From: Jeff Chen <jeff.chen_1@nxp.com>
mwifiex_ret_get_hw_spec() parses and logs the FW_HOTFIX_VER_ID TLV,
but the hotfix value is not stored in the adapter structure. As a
result, the hotfix number never appears in the firmware version string
returned by mwifiex_drv_get_driver_version().
Store the hotfix version from FW_HOTFIX_VER_ID and append it to the
firmware version string.
Assisted-by: LLM sparse
Fixes: 7715d79553de ("wifi: mwifiex: Support firmware hotfix version in GET_HW_SPEC responses")
Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
---
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 10 ++++++++--
drivers/net/wireless/marvell/mwifiex/fw.h | 6 ++++++
drivers/net/wireless/marvell/mwifiex/init.c | 1 +
drivers/net/wireless/marvell/mwifiex/main.h | 1 +
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++-
5 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index 29e0f274575e..268a795db486 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -1594,11 +1594,17 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
api_rev->major_ver,
api_rev->minor_ver);
break;
- case FW_HOTFIX_VER_ID:
+ case FW_HOTFIX_VER_ID: {
+ struct hw_spec_fw_hotfix_ver *hf;
+
+ hf = (void *)tlv;
+ adapter->fw_hotfix_ver =
+ le16_to_cpu(hf->hotfix_ver);
mwifiex_dbg(adapter, INFO,
"Firmware hotfix version %d\n",
- api_rev->major_ver);
+ adapter->fw_hotfix_ver);
break;
+ }
default:
mwifiex_dbg(adapter, FATAL,
"Unknown api_id: %d\n",
diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index 93561116959a..f254d6d6e3eb 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -1104,6 +1104,12 @@ struct hw_spec_api_rev {
u8 minor_ver;
} __packed;
+struct hw_spec_fw_hotfix_ver {
+ struct mwifiex_ie_types_header header;
+ __le16 api_id;
+ __le16 hotfix_ver;
+} __packed;
+
struct host_cmd_ds_get_hw_spec {
__le16 hw_if_version;
__le16 version;
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
index 0c8925013724..e8a5f9b758d6 100644
--- a/drivers/net/wireless/marvell/mwifiex/init.c
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
@@ -296,6 +296,7 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
adapter->config_bands = 0;
adapter->adhoc_start_band = 0;
adapter->fw_release_number = 0;
+ adapter->fw_hotfix_ver = 0;
adapter->fw_cap_info = 0;
memset(&adapter->upld_buf, 0, sizeof(adapter->upld_buf));
adapter->event_cause = 0;
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
index 8e6238c01aa6..5dd01bacc7cb 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.h
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
@@ -1003,6 +1003,7 @@ struct mwifiex_adapter {
bool host_mlme_enabled;
struct ieee80211_txrx_stypes mwifiex_mgmt_stypes[NUM_NL80211_IFTYPES];
u8 fw_api_ver;
+ u16 fw_hotfix_ver;
u8 key_api_major_ver, key_api_minor_ver;
u8 max_p2p_conn, max_sta_conn;
struct memory_type_mapping *mem_type_mapping_tbl;
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index 19196848778c..1d3874734851 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -1144,7 +1144,8 @@ mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter, char *version,
char fw_ver[32];
ver.l = cpu_to_le32(adapter->fw_release_number);
- sprintf(fw_ver, "%u.%u.%u.p%u", ver.c[2], ver.c[1], ver.c[0], ver.c[3]);
+ sprintf(fw_ver, "%u.%u.%u.p%u.%u", ver.c[2], ver.c[1],
+ ver.c[0], ver.c[3], adapter->fw_hotfix_ver);
snprintf(version, max_len, driver_version, fw_ver);
base-commit: 3b35f726c20d138fafa154182ee926a419306269
--
2.34.1
next reply other threads:[~2026-09-17 3:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 3:23 Jeff Chen [this message]
2026-09-21 8:53 ` [PATCH] wifi: mwifiex: append hotfix number to firmware version string Johannes Berg
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=20260917032350.2323119-1-chunfan.chen@gmail.com \
--to=chunfan.chen@gmail.com \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=jeff.chen_1@nxp.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=lukas@wunner.de \
/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