]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ath9k_hw: fix channel maximum power level test
authorFelix Fietkau <nbd@nbd.name>
Mon, 30 Jul 2018 18:31:28 +0000 (21:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:41 +0000 (22:43 +0200)
commit2dacb8cc67ef4364440b2fbee3a845cc1a99e5c8
treee2164498904425a9fa9f296000674c67a4c7ad19
parent473983f319cc88dbecc4651c3e87f2ae131de93a
ath9k_hw: fix channel maximum power level test

[ Upstream commit 461d8a6bb9879b0e619752d040292e67aa06f1d2 ]

The tx power applied by set_txpower is limited by the CTL (conformance
test limit) entries in the EEPROM. These can change based on the user
configured regulatory domain.
Depending on the EEPROM data this can cause the tx power to become too
limited, if the original regdomain CTLs impose lower limits than the CTLs
of the user configured regdomain.

To fix this issue, set the initial channel limits without any CTL
restrictions and only apply the CTL at run time when setting the channel
and the real tx power.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/hw.c