All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 01/11] wifi: ath9k: fix LNA selection in ath_ant_try_scan()
@ 2024-03-29 12:35 Sasha Levin
  2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 02/11] batman-adv: Return directly after a failed batadv_dat_select_candidates() in batadv_dat_forward_data() Sasha Levin
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Sasha Levin @ 2024-03-29 12:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dmitry Antipov, Toke Høiland-Jørgensen, Kalle Valo,
	Sasha Levin, kvalo, linux-wireless

From: Dmitry Antipov <dmantipov@yandex.ru>

[ Upstream commit d6b27eb997ef9a2aa51633b3111bc4a04748e6d3 ]

In 'ath_ant_try_scan()', (most likely) the 2nd LNA's signal
strength should be used in comparison against RSSI when
selecting first LNA as the main one. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20231211172502.25202-1-dmantipov@yandex.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath9k/antenna.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index a3668433dc02b..deac6184dd016 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -643,7 +643,7 @@ static void ath_ant_try_scan(struct ath_ant_comb *antcomb,
 				conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
 				conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
 			} else if (antcomb->rssi_sub >
-				   antcomb->rssi_lna1) {
+				   antcomb->rssi_lna2) {
 				/* set to A-B */
 				conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
 				conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-29 12:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 12:35 [PATCH AUTOSEL 4.19 01/11] wifi: ath9k: fix LNA selection in ath_ant_try_scan() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 02/11] batman-adv: Return directly after a failed batadv_dat_select_candidates() in batadv_dat_forward_data() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 03/11] VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 04/11] arm64: dts: rockchip: fix rk3399 hdmi ports node Sasha Levin
2024-03-29 12:35   ` Sasha Levin
2024-03-29 12:35   ` Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 05/11] tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 06/11] sparc: vdso: Disable UBSAN instrumentation Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 07/11] sh: Fix build with CONFIG_UBSAN=y Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 08/11] btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 09/11] btrfs: export: handle invalid inode or root reference in btrfs_get_parent() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 10/11] btrfs: send: handle path ref underflow in header iterate_inode_ref() Sasha Levin
2024-03-29 12:35 ` [PATCH AUTOSEL 4.19 11/11] Bluetooth: btintel: Fix null ptr deref in btintel_read_version Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.