mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 09:20:13 -04:00
wifi: rtw89: Fill fw_version member of struct wiphy
Let userspace tools like lshw show the firmware version by filling the fw_version member of struct wiphy. Before: configuration: broadcast=yes driver=rtw89_8852au driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes wireless=IEEE 802.11 After: configuration: broadcast=yes driver=rtw89_8852au driverversion=6.19.6-arch1-1 firmware=0.13.36.2 link=no multicast=yes wireless=IEEE 802.11 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/a46ed12c-387c-4063-849c-c6457bf97810@gmail.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
249716daa9
commit
c2ca7b9d27
@@ -730,6 +730,7 @@ static int rtw89_fw_update_ver(struct rtw89_dev *rtwdev,
|
||||
{
|
||||
const struct rtw89_fw_hdr *v0 = (const struct rtw89_fw_hdr *)fw_suit->data;
|
||||
const struct rtw89_fw_hdr_v1 *v1 = (const struct rtw89_fw_hdr_v1 *)fw_suit->data;
|
||||
struct wiphy *wiphy = rtwdev->hw->wiphy;
|
||||
|
||||
if (type == RTW89_FW_LOGFMT)
|
||||
return 0;
|
||||
@@ -755,6 +756,13 @@ static int rtw89_fw_update_ver(struct rtw89_dev *rtwdev,
|
||||
fw_suit->major_ver, fw_suit->minor_ver, fw_suit->sub_ver,
|
||||
fw_suit->sub_idex, fw_suit->commitid, fw_suit->cmd_ver, type);
|
||||
|
||||
if (type == RTW89_FW_NORMAL || type == RTW89_FW_NORMAL_CE ||
|
||||
type == RTW89_FW_NORMAL_B)
|
||||
snprintf(wiphy->fw_version, sizeof(wiphy->fw_version),
|
||||
"%u.%u.%u.%u",
|
||||
fw_suit->major_ver, fw_suit->minor_ver,
|
||||
fw_suit->sub_ver, fw_suit->sub_idex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user