]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Replace WPA_MAX_SSID_LEN with SSID_MAX_LEN
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 7 Apr 2015 09:38:56 +0000 (12:38 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 22 Apr 2015 08:44:18 +0000 (11:44 +0300)
This makes the source code more consistent.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/wpa_common.c
src/common/wpa_common.h

index 036890483d42c989223f32d54571d3eb2410a651..86b5d189cc66ed772a2678a7806dbd6184991cf3 100644 (file)
@@ -838,7 +838,7 @@ void wpa_derive_pmk_r0(const u8 *xxkey, size_t xxkey_len,
                       const u8 *mdid, const u8 *r0kh_id, size_t r0kh_id_len,
                       const u8 *s0kh_id, u8 *pmk_r0, u8 *pmk_r0_name)
 {
-       u8 buf[1 + WPA_MAX_SSID_LEN + MOBILITY_DOMAIN_ID_LEN + 1 +
+       u8 buf[1 + SSID_MAX_LEN + MOBILITY_DOMAIN_ID_LEN + 1 +
               FT_R0KH_ID_MAX_LEN + ETH_ALEN];
        u8 *pos, r0_key_data[48], hash[32];
        const u8 *addr[2];
@@ -852,7 +852,7 @@ void wpa_derive_pmk_r0(const u8 *xxkey, size_t xxkey_len,
         * PMK-R0 = L(R0-Key-Data, 0, 256)
         * PMK-R0Name-Salt = L(R0-Key-Data, 256, 128)
         */
-       if (ssid_len > WPA_MAX_SSID_LEN || r0kh_id_len > FT_R0KH_ID_MAX_LEN)
+       if (ssid_len > SSID_MAX_LEN || r0kh_id_len > FT_R0KH_ID_MAX_LEN)
                return;
        pos = buf;
        *pos++ = ssid_len;
index 091e317fdd68a2e2f625e1cbe83f61d7fc189ff3..cb047d04b5ec914b76b3fa9af0fe3051febfb0f5 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef WPA_COMMON_H
 #define WPA_COMMON_H
 
-#define WPA_MAX_SSID_LEN 32
-
 /* IEEE 802.11i */
 #define PMKID_LEN 16
 #define PMK_LEN 32