]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix QCA9561 PA bias level
authorThibaut VARÈNE <hacks+kernel@slashdirt.org>
Sun, 17 Apr 2022 14:51:45 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:33 +0000 (10:22 +0200)
commitbcc2d403d3322de70050ee7b066db415e9dc1ca0
tree99e94d45316f30814136cf83a7867d563fbbc493
parent8161f6895d0365595d3a207d66833149cd08e86c
ath9k: fix QCA9561 PA bias level

[ Upstream commit 4232314c61a88a2ca3360363b5bc9216ca88b971 ]

This patch fixes an invalid TX PA DC bias level on QCA9561, which
results in a very low output power and very low throughput as devices
are further away from the AP (compared to other 2.4GHz APs).

This patch was suggested by Felix Fietkau, who noted[1]:
"The value written to that register is wrong, because while the mask
definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the
shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is
wrong for 9561."

In real life testing, without this patch the 2.4GHz throughput on
Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to
practical maximum with the patch applied.

[1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name

Signed-off-by: Thibaut VARÈNE <hacks+kernel@slashdirt.org>
Acked-by: Felix Fietkau <nbd@nbd.name>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220417145145.1847-1-hacks+kernel@slashdirt.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/ar9003_phy.h