Re: [PATCH 2/6] multiple_bssid: add support for non/transmitting mode
Rajkumar Manoharan <[email protected]> Wed, 10 Jun 2020 22:35:05 -0700
| Newsgroups | gmane.linux.drivers.hostap |
|---|---|
| Message-ID | <[email protected]> |
On 2020-06-04 02:15, John Crispin wrote: > Signed-off-by: John Crispin <[email protected]> > --- > src/ap/ap_drv_ops.c | 8 +++++--- > src/ap/ap_drv_ops.h | 3 ++- > src/ap/beacon.c | 4 ++++ > src/ap/hostapd.c | 9 ++++++++- > src/common/defs.h | 7 +++++++ > src/drivers/driver.h | 10 +++++++++- > wpa_supplicant/driver_i.h | 2 +- > 7 files changed, 36 insertions(+), 7 deletions(-) > > diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c > index f15765945..3a46b5745 100644 > --- a/src/ap/ap_drv_ops.c > +++ b/src/ap/ap_drv_ops.c > @@ -321,7 +321,7 @@ int hostapd_vlan_if_add(struct hostapd_data *hapd, > const char *ifname) > char force_ifname[IFNAMSIZ]; > u8 if_addr[ETH_ALEN]; > return hostapd_if_add(hapd, WPA_IF_AP_VLAN, ifname, hapd->own_addr, > - NULL, NULL, force_ifname, if_addr, NULL, 0); > + NULL, NULL, force_ifname, if_addr, NULL, 0, 0, NULL); > } > > > @@ -497,13 +497,15 @@ int hostapd_set_ssid(struct hostapd_data *hapd, > const u8 *buf, size_t len) > int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type > type, > const char *ifname, const u8 *addr, void *bss_ctx, > void **drv_priv, char *force_ifname, u8 *if_addr, > - const char *bridge, int use_existing) > + const char *bridge, int use_existing, > + int multi_bssid_mode, const char *multi_bssid_parent) > { > if (hapd->driver == NULL || hapd->driver->if_add == NULL) > return -1; > return hapd->driver->if_add(hapd->drv_priv, type, ifname, addr, > bss_ctx, drv_priv, force_ifname, if_addr, > - bridge, use_existing, 1); > + bridge, use_existing, 1, > + multi_bssid_mode, multi_bssid_parent); > } > > > diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h > index 5738c1c97..651b77e9a 100644 > --- a/src/ap/ap_drv_ops.h > +++ b/src/ap/ap_drv_ops.h > @@ -54,7 +54,8 @@ int hostapd_set_ssid(struct hostapd_data *hapd, > const u8 *buf, size_t len); > int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type > type, > const char *ifname, const u8 *addr, void *bss_ctx, > void **drv_priv, char *force_ifname, u8 *if_addr, > - const char *bridge, int use_existing); > + const char *bridge, int use_existin, > typo use_existing. > + int multi_bssid_mode, const char *multi_bssid_parent); > int hostapd_if_remove(struct hostapd_data *hapd, enum > wpa_driver_if_type type, > const char *ifname); > int hostapd_set_ieee8021x(struct hostapd_data *hapd, > diff --git a/src/ap/beacon.c b/src/ap/beacon.c > index 22e672c8d..d3453102b 100644 > --- a/src/ap/beacon.c > +++ b/src/ap/beacon.c > @@ -1500,6 +1500,10 @@ int ieee802_11_set_beacon(struct hostapd_data > *hapd) > params.twt_responder = hostapd_get_he_twt_responder(hapd, > IEEE80211_MODE_AP); > #endif /* CONFIG_IEEE80211AX */ > + if (hapd->iconf->multiple_bssid) { > + params.multiple_bssid_index = hostapd_get_bss_index(hapd); > "multiple_bssid: add 2 new helper functions" must be before this patch. no? > + params.multiple_bssid_count = iface->num_bss; > + } > > hapd->reenable_beacon = 0; > > if (cmode && > diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c > index b37f49f9a..033593f06 100644 > --- a/src/ap/hostapd.c > +++ b/src/ap/hostapd.c > @@ -1129,6 +1129,13 @@ static int hostapd_setup_bss(struct > hostapd_data *hapd, int first) > > if (!first || first == -1) { > u8 *addr = hapd->own_addr; > + int multiple_bssid_mode = HOSTAPD_BSSID_LEGACY; > + const char *multiple_bssid_parent = NULL; > + > + if (hapd->iconf->multiple_bssid) { > + multiple_bssid_mode = HOSTAPD_BSSID_NON_TRANSMITTED; > + multiple_bssid_parent = hapd->iface->bss[0]->conf->iface; > + } > Don't you have to set HOSTAPD_BSSID_TRANSMITTED in case of first BSS. -Rajkumar