mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
162 lines
5.5 KiB
Diff
162 lines
5.5 KiB
Diff
From f1b8f4e971b3c5865bba75d9e838c8882c91f114 Mon Sep 17 00:00:00 2001
|
|
From: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
|
Date: Thu, 2 Nov 2023 16:54:10 +0530
|
|
Subject: [PATCH] wpa_supplicant: initate auth when all configured links of ml bss are found
|
|
|
|
While establishing ML connection, if BSS entry of partner BSS
|
|
is not found in scan result, supplicant proceeds to authenticate with links
|
|
which are available is current scan result.
|
|
Instead attempt to retry scan and find all configured links in mld so that
|
|
supplicant will be able associate on all configured links.
|
|
Currently the retry limit is set to 5 scans.
|
|
|
|
Also added a check to verify if partner link BSS'es freq is part for configured
|
|
freq list before considering the link for association.
|
|
|
|
ToDo: Optimize above retry to scan only given freq/list of freq where partner(s)
|
|
are said to be present in current link's RNR.
|
|
|
|
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
|
---
|
|
wpa_supplicant/sme.c | 59 +++++++++++++++++++++++++------
|
|
wpa_supplicant/wpa_supplicant_i.h | 1 +
|
|
2 files changed, 49 insertions(+), 11 deletions(-)
|
|
|
|
--- a/wpa_supplicant/sme.c
|
|
+++ b/wpa_supplicant/sme.c
|
|
@@ -379,7 +379,8 @@ static void sme_auth_handle_rrm(struct w
|
|
|
|
|
|
static bool wpas_ml_element(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
|
- struct wpa_ssid *ssid)
|
|
+ struct wpa_ssid *ssid,
|
|
+ struct wpa_driver_auth_params *params)
|
|
{
|
|
struct wpabuf *mlbuf;
|
|
const u8 *rnr_ie, *pos, *rsn_ie;
|
|
@@ -394,14 +395,15 @@ static bool wpas_ml_element(struct wpa_s
|
|
BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT |
|
|
BASIC_MULTI_LINK_CTRL_PRES_MLD_CAPA);
|
|
bool ret = false;
|
|
+ params->mld = false;
|
|
|
|
if (!(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO))
|
|
- return false;
|
|
+ return true;
|
|
|
|
mlbuf = wpa_bss_defrag_mle(bss, MULTI_LINK_CONTROL_TYPE_BASIC);
|
|
if (!mlbuf) {
|
|
wpa_dbg(wpa_s, MSG_DEBUG, "MLD: No ML element");
|
|
- return false;
|
|
+ return true;
|
|
}
|
|
|
|
rsn_ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
|
@@ -459,6 +461,7 @@ static bool wpas_ml_element(struct wpa_s
|
|
|
|
wpa_s->valid_links = BIT(wpa_s->mlo_assoc_link_id);
|
|
|
|
+ params->mld = true;
|
|
rnr_ie = wpa_bss_get_ie(bss, WLAN_EID_REDUCED_NEIGHBOR_REPORT);
|
|
if (!rnr_ie) {
|
|
wpa_dbg(wpa_s, MSG_DEBUG, "MLD: No RNR element");
|
|
@@ -510,7 +513,25 @@ static bool wpas_ml_element(struct wpa_s
|
|
wpa_printf(MSG_DEBUG, "MLD: empty wpa_s->current_ssid");
|
|
|
|
u8 link_id = *(data + 1) & 0xF;
|
|
-
|
|
+ int partner_freq = ieee80211_chan_to_freq(NULL, ap_info->op_class, ap_info->chanel);
|
|
+ int curr_freq = 0;
|
|
+ if (partner_freq && wpa_s->conf->freq_list && wpa_s->conf->freq_list[0]) {
|
|
+ int i = 0;
|
|
+ curr_freq = wpa_s->conf->freq_list[i];
|
|
+ while (curr_freq) {
|
|
+ i++;
|
|
+ wpa_printf(MSG_DEBUG, "ML Partner freq %d our scan list freq %d", partner_freq, curr_freq);
|
|
+ if (curr_freq == partner_freq) {
|
|
+ wpa_printf(MSG_DEBUG, "ML Partner freq %d is part of our scan list", partner_freq);
|
|
+ break;
|
|
+ }
|
|
+ curr_freq = wpa_s->conf->freq_list[i];
|
|
+ }
|
|
+ }
|
|
+ if (wpa_s->conf->freq_list && wpa_s->conf->freq_list[0] && !curr_freq) {
|
|
+ wpa_printf(MSG_DEBUG, "ML Partner freq %d is not part of our scan list ignore this link", partner_freq);
|
|
+ goto cont;
|
|
+ }
|
|
if (neigh_bss) {
|
|
wpa_scan_res_match(wpa_s, 0, neigh_bss,
|
|
wpa_s->current_ssid,
|
|
@@ -528,10 +549,14 @@ static bool wpas_ml_element(struct wpa_s
|
|
}
|
|
} else {
|
|
wpa_printf(MSG_DEBUG,
|
|
- "MLD: Neighbor not found in scan");
|
|
+ "MLD: Neighbor not found in scan, current neigh scan retry count %u", wpa_s->ml_neigh_retries);
|
|
+ if (pa_s->ml_neigh_retries <= 5) {
|
|
+ ret = false;
|
|
+ goto out;
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
+cont:
|
|
rnr_ie_len -= len;
|
|
pos += len;
|
|
}
|
|
@@ -625,6 +650,7 @@ static void sme_send_authentication(stru
|
|
const u8 *mbo_ie;
|
|
#endif /* CONFIG_MBO */
|
|
int omit_rsnxe = 0;
|
|
+ bool ret;
|
|
|
|
if (bss == NULL) {
|
|
wpa_msg(wpa_s, MSG_ERROR, "SME: No scan result available for "
|
|
@@ -646,11 +672,21 @@ static void sme_send_authentication(stru
|
|
params.ssid_len = bss->ssid_len;
|
|
params.p2p = ssid->p2p_group;
|
|
|
|
- if (wpas_ml_element(wpa_s, bss, ssid)) {
|
|
- wpa_printf(MSG_DEBUG, "MLD: In authentication");
|
|
- params.mld = true;
|
|
- params.mld_link_id = wpa_s->mlo_assoc_link_id;
|
|
- params.ap_mld_addr = wpa_s->ap_mld_addr;
|
|
+ ret = wpas_ml_element(wpa_s, bss, ssid, ¶ms);
|
|
+ if (params.mld) {
|
|
+ if (ret) {
|
|
+ wpa_printf(MSG_DEBUG, "MLD: In authentication");
|
|
+ params.mld_link_id = wpa_s->mlo_assoc_link_id;
|
|
+ params.ap_mld_addr = wpa_s->ap_mld_addr;
|
|
+ } else {
|
|
+ wpas_connect_work_done(wpa_s);
|
|
+ /* Tear down auth process and start scan again */
|
|
+ wpa_supplicant_cancel_scan(wpa_s);
|
|
+ wpa_supplicant_cancel_sched_scan(wpa_s);
|
|
+ wpa_s->ml_neigh_retries++;
|
|
+ wpa_supplicant_req_scan(wpa_s, 0, 0);
|
|
+ return;
|
|
+ }
|
|
}
|
|
|
|
if (wpa_s->sme.ssid_len != params.ssid_len ||
|
|
--- a/wpa_supplicant/wpa_supplicant_i.h
|
|
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
|
@@ -1542,6 +1542,7 @@ struct wpa_supplicant {
|
|
struct wpa_signal_info last_signal_info;
|
|
/* Minimum bandwidth the driver supports RU puncturing */
|
|
u8 ru_punct_supp_bw;
|
|
+ unsigned int ml_neigh_retries;
|
|
};
|
|
|
|
|
|
--- a/wpa_supplicant/events.c
|
|
+++ b/wpa_supplicant/events.c
|
|
@@ -3701,6 +3701,7 @@ static void wpa_supplicant_event_assoc(s
|
|
#endif /* CONFIG_SME */
|
|
|
|
wpa_msg(wpa_s, MSG_INFO, "Associated with " MACSTR, MAC2STR(bssid));
|
|
+ wpa_s->ml_neigh_retries = 0;
|
|
if (wpa_s->current_ssid) {
|
|
/* When using scanning (ap_scan=1), SIM PC/SC interface can be
|
|
* initialized before association, but for other modes,
|