hostapd: Set STA flags when adding a new station

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.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
This commit is contained in:
Arik Nemtsov 2011-07-12 20:26:52 +03:00 committed by Jouni Malinen
parent ed49fbbf3a
commit d83ab1fe37
4 changed files with 8 additions and 3 deletions

View file

@ -1705,7 +1705,8 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
if (hostapd_sta_add(hapd, sta->addr, sta->aid, sta->capability,
sta->supported_rates, sta->supported_rates_len,
sta->listen_interval,
sta->flags & WLAN_STA_HT ? &ht_cap : NULL)) {
sta->flags & WLAN_STA_HT ? &ht_cap : NULL,
sta->flags)) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_NOTICE,
"Could not add STA to kernel driver");