hostapd: Fix interface selection for the nl80211 driver
This patch allows the nl80211 driver to create its own per-bss context and pass it to the drv_priv pointer of the hostapd bss state. With this and the following patch, stations can associate to and switch between multiple BSS interfaces of a single wiphy. This obsoletes a few instances of passing ifname to a callback, those can be removed in a separate patch. It might also be useful to move more fields from the driver data to the per-bss data structure in the future.
This commit is contained in:
parent
39f42d1193
commit
a2e40bb650
6 changed files with 191 additions and 178 deletions
|
@ -242,7 +242,7 @@ static int hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
|
|||
|
||||
static int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname)
|
||||
{
|
||||
return hostapd_if_add(hapd, WPA_IF_AP_VLAN, ifname, NULL, NULL);
|
||||
return hostapd_if_add(hapd, WPA_IF_AP_VLAN, ifname, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static int hostapd_vlan_if_remove(struct hostapd_data *hapd,
|
||||
|
@ -407,12 +407,13 @@ 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)
|
||||
const char *ifname, const u8 *addr, void *bss_ctx,
|
||||
void **drv_priv)
|
||||
{
|
||||
if (hapd->driver == NULL || hapd->driver->if_add == NULL)
|
||||
return -1;
|
||||
return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
|
||||
ifname, addr, bss_ctx);
|
||||
ifname, addr, bss_ctx, drv_priv);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue