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:
Felix Fietkau 2010-03-06 22:22:56 +02:00 committed by Jouni Malinen
parent 39f42d1193
commit a2e40bb650
6 changed files with 191 additions and 178 deletions

View file

@ -1497,11 +1497,13 @@ struct wpa_driver_ops {
* @addr: Local address to use for the interface or %NULL to use the
* parent interface address
* @bss_ctx: BSS context for %WPA_IF_AP_BSS interfaces
* @drv_priv: Pointer for overwriting the driver context or %NULL if
* not allowed (applies only to %WPA_IF_AP_BSS type)
* Returns: 0 on success, -1 on failure
*/
int (*if_add)(const char *iface, void *priv,
enum wpa_driver_if_type type, const char *ifname,
const u8 *addr, void *bss_ctx);
const u8 *addr, void *bss_ctx, void **drv_priv);
/**
* if_remove - Remove a virtual interface