From d6c3067d3216cd195f837f51baa82cb51856e095 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 7 Apr 2015 12:59:29 +0300 Subject: [PATCH] Replace SSID_LEN with SSID_MAX_LEN This makes source code more consistent. Signed-off-by: Jouni Malinen --- src/ap/wpa_auth.h | 4 ++-- src/ap/wpa_auth_glue.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h index 11e745eb2..e7478064f 100644 --- a/src/ap/wpa_auth.h +++ b/src/ap/wpa_auth.h @@ -12,6 +12,7 @@ #include "common/defs.h" #include "common/eapol_common.h" #include "common/wpa_common.h" +#include "common/ieee802_11_defs.h" #ifdef _MSC_VER #pragma pack(push, 1) @@ -146,8 +147,7 @@ struct wpa_auth_config { int group_mgmt_cipher; #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211R -#define SSID_LEN 32 - u8 ssid[SSID_LEN]; + u8 ssid[SSID_MAX_LEN]; size_t ssid_len; u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN]; u8 r0_key_holder[FT_R0KH_ID_MAX_LEN]; diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index d417a72d9..7cd0b6cf1 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -54,8 +54,8 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf, #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211R wconf->ssid_len = conf->ssid.ssid_len; - if (wconf->ssid_len > SSID_LEN) - wconf->ssid_len = SSID_LEN; + if (wconf->ssid_len > SSID_MAX_LEN) + wconf->ssid_len = SSID_MAX_LEN; os_memcpy(wconf->ssid, conf->ssid.ssid, wconf->ssid_len); os_memcpy(wconf->mobility_domain, conf->mobility_domain, MOBILITY_DOMAIN_ID_LEN);