aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-05-11 10:49:57 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 08:59:57 (GMT)
commit025276d84af568781c6bcb4997bdcfac7a8879de (patch)
tree0ee7023c03366a81d6509a9a889c65e3a9eb089d
parent829ca99ebad9dd511ecbca995b13a94a064ed243 (diff)
downloadhostap-06-025276d84af568781c6bcb4997bdcfac7a8879de.zip
hostap-06-025276d84af568781c6bcb4997bdcfac7a8879de.tar.gz
hostap-06-025276d84af568781c6bcb4997bdcfac7a8879de.tar.bz2
Fix WMM and MFP STA flag setting with flags_or/flags_and
These were included correctly in total_flags, but not in flags_or/flags_and. (cherry picked from commit eddd8010e6fac0c907cbc0af4df3e8c5144fd5f3)
-rw-r--r--hostapd/ieee802_11.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c
index 6d4d253..9869cb3 100644
--- a/hostapd/ieee802_11.c
+++ b/hostapd/ieee802_11.c
@@ -1596,6 +1596,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
struct ht_cap_ie ht_cap;
#endif /* CONFIG_IEEE80211N */
struct ht_cap_ie *ht_cap_ptr = NULL;
+ int set_flags, flags_and, flags_or;
if (!ok) {
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
@@ -1676,13 +1677,12 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
/* VLAN ID already set (e.g., by PMKSA caching), so bind STA */
ap_sta_bind_vlan(hapd, sta, 0);
}
- if (sta->flags & WLAN_STA_SHORT_PREAMBLE) {
- hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
- WLAN_STA_SHORT_PREAMBLE, ~0);
- } else {
- hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
- 0, ~WLAN_STA_SHORT_PREAMBLE);
- }
+
+ set_flags = WLAN_STA_SHORT_PREAMBLE | WLAN_STA_WMM | WLAN_STA_MFP;
+ flags_or = sta->flags & set_flags;
+ flags_and = sta->flags | ~set_flags;
+ hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
+ flags_or, flags_and);
if (sta->auth_alg == WLAN_AUTH_FT)
wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FT);