AP: Allow starting multiple interfaces within single MLD

Add support for including multiple hostapd interfaces in the same AP
MLD, i.e., all using the same underlying driver network interface.

To do so, when a new hostapd interface is added, if there is already
another interface using the same underlying network interface, associate
the new interface with the same private data object, instead of creating
a new one.

As some of the BSSs are non-first BSSs, meaning that they reuse the
drv_priv of the initial BSS, make sure not to double free it.

Currently multiple BSS entries are not supported so always use bss[0]
for MLD.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Andrei Otcheretianski 2023-05-22 22:33:36 +03:00 committed by Jouni Malinen
parent f2dd75093f
commit 7fa99b3246
4 changed files with 139 additions and 6 deletions

View file

@ -175,6 +175,12 @@ struct hostapd_data {
unsigned int reenable_beacon:1;
u8 own_addr[ETH_ALEN];
u8 mld_addr[ETH_ALEN];
u8 mld_link_id;
/* Used for mld_link_id assignment - valid on the first MLD BSS only */
u8 mld_next_link_id;
struct hostapd_data *mld_first_bss;
int num_sta; /* number of entries in sta_list */
struct sta_info *sta_list; /* STA info list head */