developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From a52f67542afdb1c61bd26ea4a8368620114e4747 Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Fri, 29 Dec 2023 15:04:27 +0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 4 | Subject: [PATCH 065/126] mtk: wpa_supplicant: fix bss selection when setting |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | mld_connect_band_pref |
| 6 | |
| 7 | Without this patch, when setting mld_connect_band_pref as 5g, wrong bss |
| 8 | will be selected. |
| 9 | |
| 10 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| 11 | --- |
| 12 | wpa_supplicant/sme.c | 5 ++++- |
| 13 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 16 | index afdccf54f..abef26f16 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 17 | --- a/wpa_supplicant/sme.c |
| 18 | +++ b/wpa_supplicant/sme.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 19 | @@ -443,8 +443,11 @@ static struct wpa_bss * wpas_ml_connect_pref(struct wpa_supplicant *wpa_s, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | -- |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 33 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 34 | |