From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <phhuang@realtek.com>
Subject: [PATCH rtw-next v2 4/4] wifi: rtw89: fw: don't reject firmware in blacklist to prevent breaking users
Date: Thu, 27 Feb 2025 21:12:28 +0800 [thread overview]
Message-ID: <20250227131228.8457-5-pkshih@realtek.com> (raw)
In-Reply-To: <20250227131228.8457-1-pkshih@realtek.com>
Once update driver blacklist of firmware, users' firmware might be in
the list, and then driver stops working. Since breaking users is not
expected, report a significant message instead of stopping.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
v2: added by v2
---
drivers/net/wireless/realtek/rtw89/fw.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 15d6bda1fcf0..d0a246f415ff 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -372,7 +372,7 @@ static int __check_secure_blacklist(struct rtw89_dev *rtwdev,
return 0;
if (!chip_blacklist) {
- rtw89_err(rtwdev, "chip no blacklist for secure firmware\n");
+ rtw89_warn(rtwdev, "chip no blacklist for secure firmware\n");
return -ENOENT;
}
@@ -380,14 +380,14 @@ static int __check_secure_blacklist(struct rtw89_dev *rtwdev,
bit_mask = BIT(section_content->blacklist.bit_in_chip_list & 0x7);
if (section_content->blacklist.ver > chip_blacklist->ver) {
- rtw89_err(rtwdev, "chip blacklist out of date (%u, %u)\n",
- section_content->blacklist.ver, chip_blacklist->ver);
+ rtw89_warn(rtwdev, "chip blacklist out of date (%u, %u)\n",
+ section_content->blacklist.ver, chip_blacklist->ver);
return -EINVAL;
}
if (chip_blacklist->list[byte_idx] & bit_mask) {
- rtw89_err(rtwdev, "firmware %u in chip blacklist\n",
- section_content->blacklist.ver);
+ rtw89_warn(rtwdev, "firmware %u in chip blacklist\n",
+ section_content->blacklist.ver);
return -EPERM;
}
@@ -427,7 +427,10 @@ static int __parse_security_section(struct rtw89_dev *rtwdev,
info->secure_section_exist = true;
}
- return __check_secure_blacklist(rtwdev, info, section_info, content);
+ ret = __check_secure_blacklist(rtwdev, info, section_info, content);
+ WARN_ONCE(ret, "Current firmware in blacklist. Please update firmware.\n");
+
+ return 0;
}
static int rtw89_fw_hdr_parser_v1(struct rtw89_dev *rtwdev, const u8 *fw, u32 len,
--
2.25.1
prev parent reply other threads:[~2025-02-27 13:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 13:12 [PATCH rtw-next v2 0/4] wifi: rtw89: fw: update role_maintain H2C command Ping-Ke Shih
2025-02-27 13:12 ` [PATCH rtw-next v2 1/4] wifi: rtw89: fw: use struct to fill " Ping-Ke Shih
2025-03-05 11:51 ` Ping-Ke Shih
2025-02-27 13:12 ` [PATCH rtw-next v2 2/4] wifi: rtw89: fw: update role_maintain H2C command for roles operating on band 1 Ping-Ke Shih
2025-02-27 13:12 ` [PATCH rtw-next v2 3/4] wifi: rtw89: fw: correct debug message format in rtw89_build_txpwr_trk_tbl_from_elm() Ping-Ke Shih
2025-02-27 13:12 ` Ping-Ke Shih [this message]
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=20250227131228.8457-5-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=phhuang@realtek.com \
/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