wifi: mt76: mt7921: fix country count limitation for CLC
authorMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Wed, 22 Nov 2023 03:06:44 +0000 (11:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:25 +0000 (15:35 -0800)
commit15173a1697236793e9e900b82fece6f99d41b2a7
tree52fbd56d279a56c75d948c0606134b8a4622f333
parentf8fa25bf6654020c4afa57bd622e4b28a63a0f0c
wifi: mt76: mt7921: fix country count limitation for CLC

[ Upstream commit fa6ad88e023ddfa6c5dcdb466d159e89f451e305 ]

Due to the increase in the number of power tables for 6Ghz on CLC,
the variable nr_country is no longer sufficient to represent the
total quantity. Therefore, we have switched to calculating the
length of clc buf to obtain the correct power table. Additionally,
the version number has been incremented to 1.

Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c