[PATCH 1/2] hostapd: set sta flags when adding a new station

Jouni Malinen j
Tue Jul 5 06:09:59 PDT 2011


On Sat, Jun 18, 2011 at 09:21:45PM +0300, Arik Nemtsov wrote:
> When adding a new station, set the STA flags as part of the sta_add
> command. This ensures the flags are up to date when the station is added
> by lower level drivers.

Why would this be needed? hostapd_sta_add() is followed by
hostapd_set_sta_flags() call in handle_assoc_cb()?


> diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
> @@ -314,7 +314,8 @@ int hostapd_sta_add(struct hostapd_data *hapd,
> @@ -331,6 +332,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
> +	params.flags = flags;
>  	return hapd->driver->sta_add(hapd->drv_priv, &params);

That flags argument to this function is WLAN_STA_* while the driver
wrappers use WPA_STA_* so this would need a call to
hostapd_sta_flags_to_drv().

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list