]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: rtw89: acpi: support loading static SAR table
authorZong-Zhe Yang <kevin_yang@realtek.com>
Wed, 26 Mar 2025 02:06:37 +0000 (10:06 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 31 Mar 2025 06:23:16 +0000 (14:23 +0800)
commit91f4ea117467f5dc2066658cd5e302ae2fc7584c
tree4765690d02bb9f3a0615263db3303025f7bcaef7
parent5ee5f848469f584adb7010acb8ac656a544f5654
wifi: rtw89: acpi: support loading static SAR table

Support to load static SAR table with ACPI WRDS method. The format of
a static SAR table is like the following, where according to header,
antenna number could be either 2 or 4 and subband number could either
contain 6 GHz or not. And then, an entry of it describes a TX power
limitation with a given unit, which is also based on header, for the
antenna under the subband. Though things can be determined by header,
still not all combinations are allowed in content. For the recognizing
flow, there is a list of allowed combinations.

               +--------------------------------+
               |             header             |
               +--------------------------------+
               +---+---+---+---+---+------------+ +
             / |   |   |   |   |   | ...        | | \
               +---+---+---+---+---+------------+ |
      antenna  |   |   |   |   |   | ...        | |
      number   +---+---+---+---+---+------------+ |   content
               |...|   |   |   |   | ...        | |
               +---+---+---+---+---+------------+ |
             \ |...|   |   |   |   | ...        | | /
               +---+---+---+---+---+------------+ +
                \                              /
                          subband number

Following the format above, try to load a static SAR table and normalize
its content into SW structure. If any recognized is loaded, SW SAR flow
is then set up with source from ACPI.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250326020643.14487-7-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/acpi.c
drivers/net/wireless/realtek/rtw89/acpi.h
drivers/net/wireless/realtek/rtw89/core.h