| From a52f67542afdb1c61bd26ea4a8368620114e4747 Mon Sep 17 00:00:00 2001 |
| From: Shayne Chen <shayne.chen@mediatek.com> |
| Date: Fri, 29 Dec 2023 15:04:27 +0800 |
| Subject: [PATCH 065/126] mtk: wpa_supplicant: fix bss selection when setting |
| mld_connect_band_pref |
| |
| Without this patch, when setting mld_connect_band_pref as 5g, wrong bss |
| will be selected. |
| |
| Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| --- |
| wpa_supplicant/sme.c | 5 ++++- |
| 1 file changed, 4 insertions(+), 1 deletion(-) |
| |
| diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c |
| index afdccf54f..abef26f16 100644 |
| --- a/wpa_supplicant/sme.c |
| +++ b/wpa_supplicant/sme.c |
| @@ -443,8 +443,11 @@ static struct wpa_bss * wpas_ml_connect_pref(struct wpa_supplicant *wpa_s, |
| } |
| |
| for_each_link(wpa_s->valid_links, i) { |
| - if (wpa_s->mlo_assoc_link_id == i) |
| + if (wpa_s->mlo_assoc_link_id == i) { |
| + if (bss->freq >= low && bss->freq <= high) |
| + return bss; |
| continue; |
| + } |
| |
| if (wpa_s->links[i].freq >= low && wpa_s->links[i].freq <= high) |
| goto found; |
| -- |
| 2.18.0 |
| |