aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11_ht.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-04-19 13:48:21 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-22 19:05:11 (GMT)
commitbaae4cb9b410f373e5e5a4b1a390091432932825 (patch)
treeee1b0f4814ff6f79507eff7f2d3a12542d356c34 /src/ap/ieee802_11_ht.c
parentb39a05913a0cdec54cbe854385fb6e8a63d05be6 (diff)
downloadhostap-baae4cb9b410f373e5e5a4b1a390091432932825.zip
hostap-baae4cb9b410f373e5e5a4b1a390091432932825.tar.gz
hostap-baae4cb9b410f373e5e5a4b1a390091432932825.tar.bz2
Simplify HT Capabilities element parsing
Check the element length in the parser and remove the length field from struct ieee802_11_elems since the element is of fixed length. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11_ht.c')
-rw-r--r--src/ap/ieee802_11_ht.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 9dad8e3..11fde2a 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -310,7 +310,7 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
- const u8 *ht_capab, size_t ht_capab_len)
+ const u8 *ht_capab)
{
/*
* Disable HT caps for STAs associated to no-HT BSSes, or for stations
@@ -318,7 +318,6 @@ u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
* frame.
*/
if (!ht_capab ||
- ht_capab_len < sizeof(struct ieee80211_ht_capabilities) ||
!(sta->flags & WLAN_STA_WMM) || hapd->conf->disable_11n) {
sta->flags &= ~WLAN_STA_HT;
os_free(sta->ht_capabilities);