]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mwifiex: add rgpower table loading support
authorStefan Kerkmann <s.kerkmann@pengutronix.de>
Mon, 4 Aug 2025 13:58:27 +0000 (15:58 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Sep 2025 08:07:00 +0000 (10:07 +0200)
commit7b6f16a258065f85793fb2597a290041c1e3d201
treeecd2135dc07fec9060c4829aed1a6d7755997a6b
parentf90caeba1dcacbba5956aa4219b83f8694aa5a79
wifi: mwifiex: add rgpower table loading support

Marvell/NXP Wi-Fi adapters allow fine-grained adjustment of the transmit
power levels and various other internal parameters. This is done by
sending command streams to the adapter. One storage format of these
command streams are the rgpower tables, which consist of multiple
command blocks in the following format:

command_block_1 = {
XX XX LL LL XX XX ..
}
command_block_n = {
XX XX LL LL XX XX XX ..
}

XX = raw byte as hex chars
LL = total length of the "raw" command block

These command blocks are parsed into their binary representation and
then send to the adapter. The parsing logic was adapted from NXP's
mwifiex driver[1].

The rgpower tables matching the currently set regulatory domain are
automatically requested and applied. If not found the existing device
tree provided power tables are tried as well.

[1]:
https://github.com/nxp-imx/mwifiex/blob/7a8beaa1605cb0870dc7ba3312c76df91cb0d6cf/mlan/mlan_cmdevt.c#L812

Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Link: https://patch.msgid.link/20250804-feature-mwifiex-rgpower-table-loading-v1-1-358e70a4d45e@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/marvell/mwifiex/main.c
drivers/net/wireless/marvell/mwifiex/main.h
drivers/net/wireless/marvell/mwifiex/sta_cmd.c
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c