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

Arik Nemtsov arik
Tue Jul 5 11:17:34 PDT 2011

On Tue, Jul 5, 2011 at 16:09, Jouni Malinen <j at w1.fi> wrote:
> 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()?

In wl12xx we need the WPA_STA_WMM flag to be correct at the moment of
add_sta. This flag is used by the FW when adding a STA.

>> 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().

wow. sorry about that. I guess I was only looking at WPA_STA_WMM
(which corresponds to WLAN_STA_ASSOC) so it was always right..
I'll send a v2 shortly (following a retest).


More information about the Hostap mailing list