diff options
| author | Arik Nemtsov <arik@wizery.com> | 2011-07-12 20:26:52 +0300 |
|---|---|---|
| committer | Keith Deacon <kdeacon@ti.com> | 2011-11-15 20:45:51 -0600 |
| commit | 185a70a56de622e082cb1885d0ac01bec8e7ad1b (patch) | |
| tree | 2eefae54a9af4e99e7bf16f77747d539794a4f36 | |
| parent | 2a732938a7ebb9134f593e875f441ef75a2d5760 (diff) | |
| download | android_external_wpa_supplicant_8-185a70a56de622e082cb1885d0ac01bec8e7ad1b.tar.gz android_external_wpa_supplicant_8-185a70a56de622e082cb1885d0ac01bec8e7ad1b.tar.bz2 android_external_wpa_supplicant_8-185a70a56de622e082cb1885d0ac01bec8e7ad1b.zip | |
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.
Change-Id: I73664a669773c86bfc6831cf3c8d93bf3518ba92
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
| -rw-r--r-- | src/ap/ap_drv_ops.c | 4 | ||||
| -rw-r--r-- | src/ap/ap_drv_ops.h | 3 | ||||
| -rw-r--r-- | src/ap/ieee802_11.c | 3 | ||||
| -rw-r--r-- | src/drivers/driver.h | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 0b6836c1..71296440 100644 --- 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, const u8 *addr, u16 aid, u16 capability, const u8 *supp_rates, size_t supp_rates_len, u16 listen_interval, - const struct ieee80211_ht_capabilities *ht_capab) + const struct ieee80211_ht_capabilities *ht_capab, + u32 flags) { struct hostapd_sta_add_params params; @@ -331,6 +332,7 @@ int hostapd_sta_add(struct hostapd_data *hapd, params.supp_rates_len = supp_rates_len; params.listen_interval = listen_interval; params.ht_capabilities = ht_capab; + params.flags = hostapd_sta_flags_to_drv(flags); return hapd->driver->sta_add(hapd->drv_priv, ¶ms); } diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h index f6076afb..6f947f95 100644 --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h @@ -36,7 +36,8 @@ int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid, u16 capability, const u8 *supp_rates, size_t supp_rates_len, u16 listen_interval, - const struct ieee80211_ht_capabilities *ht_capab); + const struct ieee80211_ht_capabilities *ht_capab, + u32 flags); int hostapd_set_privacy(struct hostapd_data *hapd, int enabled); int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem, size_t elem_len); diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index e0a3a36e..b125040c 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -1722,7 +1722,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"); diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 19a98b73..2e52d791 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -625,6 +625,7 @@ struct hostapd_sta_add_params { size_t supp_rates_len; u16 listen_interval; const struct ieee80211_ht_capabilities *ht_capabilities; + u32 flags; /* bitmask of WPA_STA_* flags */ }; struct hostapd_freq_params { |
