]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mt76: Fix DTS power-limits on little endian systems
authorSven Eckelmann (Plasma Cloud) <se@simonwunderlich.de>
Fri, 26 Sep 2025 09:32:54 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:08 +0000 (12:57 +0100)
commit498e286941b961903be570d52d44e57f150d55ea
tree2b628d9e358554344f9ded44750d55c907bc7516
parentaceaa18f791add733b969f8b70fe614a3e43f183
wifi: mt76: Fix DTS power-limits on little endian systems

commit 38b845e1f9e810869b0a0b69f202b877b7b7fb12 upstream.

The power-limits for ru and mcs and stored in the devicetree as bytewise
array (often with sizes which are not a multiple of 4). These arrays have a
prefix which defines for how many modes a line is applied. This prefix is
also only a byte - but the code still tried to fix the endianness of this
byte with a be32 operation. As result, loading was mostly failing or was
sending completely unexpected values to the firmware.

Since the other rates are also stored in the devicetree as bytewise arrays,
just drop the u32 access + be32_to_cpu conversion and directly access them
as bytes arrays.

Cc: stable@vger.kernel.org
Fixes: 22b980badc0f ("mt76: add functions for parsing rate power limits from DT")
Fixes: a9627d992b5e ("mt76: extend DT rate power limits to support 11ax devices")
Signed-off-by: Sven Eckelmann (Plasma Cloud) <se@simonwunderlich.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mediatek/mt76/eeprom.c