]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: rtw89: fw: use common function to parse security section for WiFi 6 chips
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 30 Oct 2024 02:21:34 +0000 (10:21 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 6 Nov 2024 06:00:44 +0000 (14:00 +0800)
commit6d995ef770af225c9066537a07d941e0c92e0366
treedc71c98ad90ede5ca221086d4065cf2d5143e042
parentf9fe3baeb204109814eae4da93b050297464eaa8
wifi: rtw89: fw: use common function to parse security section for WiFi 6 chips

The MSSC (multiple security section count) can be regular number (shown in
below figure) or 0xFF (supported already). For WiFi 7 or newer WiFi 6
chips, the MSSC will be 0xFF. But early WiFi 6 chip such as RTL8852B
could be either one of the cases.

Extend __parse_security_section() to support both with/without secure
boot mode accordingly.

           +---------------------------+ -\
           |      firmware header      |  |
           |                           |  |
           | +-----------------------+ |  |
           | | section type/size * N | |  |
           | +-----------------------+ |  |
           +---------------------------+ -/
           :                           :
           +---------------------------+ -\
           | secure section type (ID:9)|  |
           |                           |  |
      +----|-> [ security key data ]   |  |
      |    +---------------------------+ -/
      |    |MSS Pool for above section |
      |    |  [ security key data 1 ]  |
      +----|- [ security key data 2 ]  |
by mss_idx |  [ security key data 3 ]  |
           |  ...                 M    | * M = MSSC (MSSC != 0xFF)
           +---------------------------+

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241030022135.11688-8-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h