wifi: rtw89: fw: add debug message for unexpected secure firmware

If failed to load a non-secure firmware with a secure chip, it only throws
a unclear message:

   rtw89_8922ae 0000:03:00.0: parse fw header fail

To address this case simpler, add a message to point out this.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250217064308.43559-5-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2025-02-17 14:43:07 +08:00
parent 56e1acaa0f
commit dc2fc1a341

View File

@ -414,8 +414,11 @@ static int __parse_security_section(struct rtw89_dev *rtwdev,
*mssc_len += section_info->mssc * FWDL_SECURITY_CHKSUM_LEN;
if (sec->secure_boot) {
if (sec->mss_idx >= section_info->mssc)
if (sec->mss_idx >= section_info->mssc) {
rtw89_err(rtwdev, "unexpected MSS %d >= %d\n",
sec->mss_idx, section_info->mssc);
return -EFAULT;
}
section_info->key_addr = content + section_info->len +
sec->mss_idx * FWDL_SECURITY_SIGLEN;
section_info->key_len = FWDL_SECURITY_SIGLEN;