wifi: rtw89: fw: adapt to new firmware format of security section
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 9 Dec 2022 01:22:15 +0000 (09:22 +0800)
committerKalle Valo <kvalo@kernel.org>
Wed, 14 Dec 2022 12:25:42 +0000 (14:25 +0200)
commit18ddf102d4b8768cd058105168f29f96cd0c6d2d
treec64ce98dbcb3b0670025fdcd7183ba8f37c443d3
parent25ed1a172298eed1cab329792d8e4d7363a411fc
wifi: rtw89: fw: adapt to new firmware format of security section

Normally, system image should ensure firmware integrity, but we provide
an advance feature to ensure this by security section along with firmware.
To enable this feature, custom ID is programmed into efuse, and driver
will download proper security section to firmware.

Since I don't have this kind hardware modules on hand yet, but new format
is used by newer firmware. Therefore, I prepare this patch in advance to
consider size of security section as a factor of checking rule of firmware
size, but don't actually download security section to firmware.

This patch is backward compatible, so it will be safe to have this change
before adding an new format firmware to linux-firmware repository.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221209012215.7342-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h