blob: 820e085790c9a24dfa9fce2c64110218985d32b8 [file] [log] [blame]
developer617abbd2024-04-23 14:50:01 +08001From e2e07813d1e05a72aa649614ad942036b387aaf1 Mon Sep 17 00:00:00 2001
2From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Fri, 29 Dec 2023 15:04:27 +0800
4Subject: [PATCH 085/104] mtk: wpa_s: fix bss selection when setting
5 mld_connect_band_pref
6
7Without this patch, when setting mld_connect_band_pref as 5g, wrong bss
8will be selected.
9
10Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
11---
12 wpa_supplicant/sme.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
16index e1183722f..5b69812b5 100644
17--- a/wpa_supplicant/sme.c
18+++ b/wpa_supplicant/sme.c
19@@ -437,8 +437,11 @@ static struct wpa_bss * wpas_ml_connect_pref(struct wpa_supplicant *wpa_s,
20 }
21
22 for_each_link(wpa_s->valid_links, i) {
23- if (wpa_s->mlo_assoc_link_id == i)
24+ if (wpa_s->mlo_assoc_link_id == i) {
25+ if (bss->freq >= low && bss->freq <= high)
26+ return bss;
27 continue;
28+ }
29
30 if (wpa_s->links[i].freq >= low && wpa_s->links[i].freq <= high)
31 goto found;
32--
332.39.2
34