mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +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>
99 lines
3.5 KiB
Diff
99 lines
3.5 KiB
Diff
From e8800aa82bbfbc0abf0b8b5efba820cc73d8e877 Mon Sep 17 00:00:00 2001
|
|
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
Date: Thu, 26 Oct 2023 13:40:39 +0530
|
|
Subject: [PATCH] hostapd: assign link ID during BSS creation
|
|
|
|
Currently, link ID is assigned when BSS is going to set up either
|
|
via driver init or via normal BSS setup. Later if interface is
|
|
disabled and enabled again, it will again call setup BSS which will
|
|
give a new link ID to it. However, Link ID should be same for a BSS
|
|
affliated to a MLD until the lifetime of the BSS.
|
|
|
|
Hence, add change to assign the link ID during BSS creation itself.
|
|
And it will remain until BSS entry is completely freed. Hence, link
|
|
ID will not change as part of disable/enable.
|
|
|
|
Also, since link ID would be decided now, it will help in creating
|
|
link level control sockets.
|
|
|
|
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
---
|
|
hostapd/main.c | 9 -----
|
|
src/ap/hostapd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++---
|
|
2 files changed, 89 insertions(+), 13 deletions(-)
|
|
|
|
--- a/hostapd/main.c
|
|
+++ b/hostapd/main.c
|
|
@@ -197,7 +197,6 @@ static int hostapd_driver_init(struct ho
|
|
os_memcpy(hapd->own_addr, b, ETH_ALEN);
|
|
}
|
|
|
|
- hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
wpa_printf(MSG_DEBUG, "Setup of non first link BSS(link id %d) of MLD %s",
|
|
hapd->mld_link_id, hapd->conf->iface);
|
|
@@ -274,7 +273,6 @@ static int hostapd_driver_init(struct ho
|
|
else
|
|
os_memcpy(hapd->own_addr, b, ETH_ALEN);
|
|
|
|
- hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
wpa_printf(MSG_DEBUG, "Setup of first link (link %d) BSS of MLD %s",
|
|
hapd->conf->iface, hapd->mld_link_id);
|
|
--- a/src/ap/hostapd.c
|
|
+++ b/src/ap/hostapd.c
|
|
@@ -74,7 +74,6 @@ static void hostapd_switch_color_timeout
|
|
static void hostapd_interface_update_fils_ubpr(struct hostapd_iface *iface,
|
|
bool iface_enabled);
|
|
|
|
-
|
|
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
|
int (*cb)(struct hostapd_iface *iface,
|
|
void *ctx), void *ctx)
|
|
@@ -1362,7 +1361,6 @@ static int hostapd_setup_bss(struct host
|
|
|
|
if (h_hapd) {
|
|
hapd->drv_priv = h_hapd->drv_priv;
|
|
- hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
wpa_printf(MSG_DEBUG, "TSetup of non first link BSS(link id %d) of MLD %s",
|
|
hapd->mld_link_id, hapd->conf->iface);
|
|
@@ -1389,7 +1387,6 @@ static int hostapd_setup_bss(struct host
|
|
wpa_printf(MSG_DEBUG, "TSetup of first link BSS of MLD %s",
|
|
hapd->conf->iface);
|
|
os_memcpy(hapd->mld->mld_addr, hapd->own_addr, ETH_ALEN);
|
|
- hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
}
|
|
}
|
|
@@ -2921,6 +2918,13 @@ struct hostapd_iface * hostapd_alloc_ifa
|
|
}
|
|
|
|
#ifdef CONFIG_IEEE80211BE
|
|
+static void hostapd_bss_alloc_link_id(struct hostapd_data *hapd)
|
|
+{
|
|
+ hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
+ wpa_printf(MSG_DEBUG, "MLD: %s: Link ID %d assigned.",
|
|
+ hapd->mld->name, hapd->mld_link_id);
|
|
+}
|
|
+
|
|
static void hostapd_bss_setup_multi_link(struct hostapd_data *hapd,
|
|
struct hapd_interfaces *interfaces)
|
|
{
|
|
@@ -2944,6 +2948,7 @@ static void hostapd_bss_setup_multi_link
|
|
continue;
|
|
|
|
hapd->mld = mld;
|
|
+ hostapd_bss_alloc_link_id(hapd);
|
|
break;
|
|
}
|
|
|
|
@@ -2964,6 +2969,7 @@ static void hostapd_bss_setup_multi_link
|
|
mld->num_links);
|
|
|
|
hapd->mld = mld;
|
|
+ hostapd_bss_alloc_link_id(hapd);
|
|
|
|
all_mld = os_realloc_array(interfaces->mld, interfaces->mld_count + 1,
|
|
sizeof(struct hostapd_mld *));
|