* [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy
@ 2026-03-26 15:21 Bitterblue Smith
2026-03-27 0:26 ` Jeff Johnson
2026-04-02 2:44 ` Ping-Ke Shih
0 siblings, 2 replies; 4+ messages in thread
From: Bitterblue Smith @ 2026-03-26 15:21 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih
Let userspace tools like lshw show the firmware version by filling the
fw_version member of struct wiphy.
Before:
configuration: broadcast=yes driver=rtw88_8814au
driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
wireless=IEEE 802.11
After:
configuration: broadcast=yes driver=rtw88_8814au
driverversion=6.19.6-arch1-1 firmware=33.6.0 link=no multicast=yes
wireless=IEEE 802.11
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v2:
- Use local wiphy variable.
---
drivers/net/wireless/realtek/rtw88/main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index c4f9758b4e96..cd9254370fcc 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1805,6 +1805,7 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)
{
struct rtw_fw_state *fw = context;
struct rtw_dev *rtwdev = fw->rtwdev;
+ struct wiphy *wiphy = rtwdev->hw->wiphy;
if (!firmware || !firmware->data) {
rtw_err(rtwdev, "failed to request firmware\n");
@@ -1819,6 +1820,11 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)
rtw_info(rtwdev, "%sFirmware version %u.%u.%u, H2C version %u\n",
fw->type == RTW_WOWLAN_FW ? "WOW " : "",
fw->version, fw->sub_version, fw->sub_index, fw->h2c_version);
+
+ if (fw->type == RTW_NORMAL_FW)
+ snprintf(wiphy->fw_version, sizeof(wiphy->fw_version),
+ "%u.%u.%u",
+ fw->version, fw->sub_version, fw->sub_index);
}
static int rtw_load_firmware(struct rtw_dev *rtwdev, enum rtw_fw_type type)
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy
2026-03-26 15:21 [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy Bitterblue Smith
@ 2026-03-27 0:26 ` Jeff Johnson
2026-03-27 6:23 ` Ping-Ke Shih
2026-04-02 2:44 ` Ping-Ke Shih
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Johnson @ 2026-03-27 0:26 UTC (permalink / raw)
To: Bitterblue Smith, linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih
On 3/26/2026 8:21 AM, Bitterblue Smith wrote:
> Let userspace tools like lshw show the firmware version by filling the
> fw_version member of struct wiphy.
>
> Before:
>
> configuration: broadcast=yes driver=rtw88_8814au
> driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
> wireless=IEEE 802.11
>
> After:
>
> configuration: broadcast=yes driver=rtw88_8814au
> driverversion=6.19.6-arch1-1 firmware=33.6.0 link=no multicast=yes
> wireless=IEEE 802.11
>
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> ---
> v2:
> - Use local wiphy variable.
> ---
> drivers/net/wireless/realtek/rtw88/main.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index c4f9758b4e96..cd9254370fcc 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -1805,6 +1805,7 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)
> {
> struct rtw_fw_state *fw = context;
> struct rtw_dev *rtwdev = fw->rtwdev;
> + struct wiphy *wiphy = rtwdev->hw->wiphy;
>
> if (!firmware || !firmware->data) {
> rtw_err(rtwdev, "failed to request firmware\n");
> @@ -1819,6 +1820,11 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)
> rtw_info(rtwdev, "%sFirmware version %u.%u.%u, H2C version %u\n",
> fw->type == RTW_WOWLAN_FW ? "WOW " : "",
> fw->version, fw->sub_version, fw->sub_index, fw->h2c_version);
> +
> + if (fw->type == RTW_NORMAL_FW)
> + snprintf(wiphy->fw_version, sizeof(wiphy->fw_version),
> + "%u.%u.%u",
> + fw->version, fw->sub_version, fw->sub_index);
> }
>
> static int rtw_load_firmware(struct rtw_dev *rtwdev, enum rtw_fw_type type)
generically speaking how useful is this?
with MLO and multi-radio wiphy there can be multiple underlying hardware with
different firmware versions. in recent ath drivers we are not filling this.
/jeff
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy
2026-03-27 0:26 ` Jeff Johnson
@ 2026-03-27 6:23 ` Ping-Ke Shih
0 siblings, 0 replies; 4+ messages in thread
From: Ping-Ke Shih @ 2026-03-27 6:23 UTC (permalink / raw)
To: Jeff Johnson, Bitterblue Smith, linux-wireless@vger.kernel.org
Jeff Johnson <jeff.johnson@oss.qualcomm.com> wrote:
>
> On 3/26/2026 8:21 AM, Bitterblue Smith wrote:
> > Let userspace tools like lshw show the firmware version by filling the
> > fw_version member of struct wiphy.
> >
> > Before:
> >
> > configuration: broadcast=yes driver=rtw88_8814au
> > driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
> > wireless=IEEE 802.11
> >
> > After:
> >
> > configuration: broadcast=yes driver=rtw88_8814au
> > driverversion=6.19.6-arch1-1 firmware=33.6.0 link=no multicast=yes
> > wireless=IEEE 802.11
> >
> > Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> > ---
> > v2:
> > - Use local wiphy variable.
> > ---
> > drivers/net/wireless/realtek/rtw88/main.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/main.c
> b/drivers/net/wireless/realtek/rtw88/main.c
> > index c4f9758b4e96..cd9254370fcc 100644
> > --- a/drivers/net/wireless/realtek/rtw88/main.c
> > +++ b/drivers/net/wireless/realtek/rtw88/main.c
> > @@ -1805,6 +1805,7 @@ static void rtw_load_firmware_cb(const struct firmware
> *firmware, void *context)
> > {
> > struct rtw_fw_state *fw = context;
> > struct rtw_dev *rtwdev = fw->rtwdev;
> > + struct wiphy *wiphy = rtwdev->hw->wiphy;
> >
> > if (!firmware || !firmware->data) {
> > rtw_err(rtwdev, "failed to request firmware\n");
> > @@ -1819,6 +1820,11 @@ static void rtw_load_firmware_cb(const struct firmware
> *firmware, void *context)
> > rtw_info(rtwdev, "%sFirmware version %u.%u.%u, H2C version %u\n",
> > fw->type == RTW_WOWLAN_FW ? "WOW " : "",
> > fw->version, fw->sub_version, fw->sub_index,
> fw->h2c_version);
> > +
> > + if (fw->type == RTW_NORMAL_FW)
> > + snprintf(wiphy->fw_version, sizeof(wiphy->fw_version),
> > + "%u.%u.%u",
> > + fw->version, fw->sub_version, fw->sub_index);
> > }
> >
> > static int rtw_load_firmware(struct rtw_dev *rtwdev, enum rtw_fw_type type)
>
> generically speaking how useful is this?
> with MLO and multi-radio wiphy there can be multiple underlying hardware with
> different firmware versions. in recent ath drivers we are not filling this.
Thanks for the info.
Realtek WiFi has single one firmware version, I'd check firmware version by
kernel log personally. By commit message, Bitterblue uses lshw tool to read
the version, and I personally don't object this patch.
Ping-Ke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy
2026-03-26 15:21 [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy Bitterblue Smith
2026-03-27 0:26 ` Jeff Johnson
@ 2026-04-02 2:44 ` Ping-Ke Shih
1 sibling, 0 replies; 4+ messages in thread
From: Ping-Ke Shih @ 2026-04-02 2:44 UTC (permalink / raw)
To: Bitterblue Smith, linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> Let userspace tools like lshw show the firmware version by filling the
> fw_version member of struct wiphy.
>
> Before:
>
> configuration: broadcast=yes driver=rtw88_8814au
> driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
> wireless=IEEE 802.11
>
> After:
>
> configuration: broadcast=yes driver=rtw88_8814au
> driverversion=6.19.6-arch1-1 firmware=33.6.0 link=no multicast=yes
> wireless=IEEE 802.11
>
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
249716daa995 wifi: rtw88: Fill fw_version member of struct wiphy
---
https://github.com/pkshih/rtw.git
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-02 2:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 15:21 [PATCH rtw-next v2] wifi: rtw88: Fill fw_version member of struct wiphy Bitterblue Smith
2026-03-27 0:26 ` Jeff Johnson
2026-03-27 6:23 ` Ping-Ke Shih
2026-04-02 2:44 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox