Replace MAX_SSID_LEN with SSID_MAX_LEN

This makes source code more consistent. The use within Android driver
interface is left as-is to avoid changes in the old PNO interface
definition.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-04-07 12:44:39 +03:00 committed by Jouni Malinen
parent 81847c22ba
commit eaa8eefed1
7 changed files with 9 additions and 10 deletions

View file

@ -1814,7 +1814,7 @@ static char * wpa_config_write_mesh_basic_rates(const struct parse_data *data,
* functions. * functions.
*/ */
static const struct parse_data ssid_fields[] = { static const struct parse_data ssid_fields[] = {
{ STR_RANGE(ssid, 0, MAX_SSID_LEN) }, { STR_RANGE(ssid, 0, SSID_MAX_LEN) },
{ INT_RANGE(scan_ssid, 0, 1) }, { INT_RANGE(scan_ssid, 0, 1) },
{ FUNC(bssid) }, { FUNC(bssid) },
{ FUNC(bssid_blacklist) }, { FUNC(bssid_blacklist) },
@ -2956,7 +2956,7 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
if (os_strcmp(var, "excluded_ssid") == 0) { if (os_strcmp(var, "excluded_ssid") == 0) {
struct excluded_ssid *e; struct excluded_ssid *e;
if (len > MAX_SSID_LEN) { if (len > SSID_MAX_LEN) {
wpa_printf(MSG_ERROR, "Line %d: invalid " wpa_printf(MSG_ERROR, "Line %d: invalid "
"excluded_ssid length %d", line, (int) len); "excluded_ssid length %d", line, (int) len);
os_free(val); os_free(val);

View file

@ -37,6 +37,7 @@
#include "config_ssid.h" #include "config_ssid.h"
#include "wps/wps.h" #include "wps/wps.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h" #include "common/ieee802_11_common.h"
@ -241,7 +242,7 @@ struct wpa_cred {
char *phase2; char *phase2;
struct excluded_ssid { struct excluded_ssid {
u8 ssid[MAX_SSID_LEN]; u8 ssid[SSID_MAX_LEN];
size_t ssid_len; size_t ssid_len;
} *excluded_ssid; } *excluded_ssid;
size_t num_excluded_ssid; size_t num_excluded_ssid;

View file

@ -13,8 +13,6 @@
#include "utils/list.h" #include "utils/list.h"
#include "eap_peer/eap_config.h" #include "eap_peer/eap_config.h"
#define MAX_SSID_LEN 32
#define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
#define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \ #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \

View file

@ -1729,7 +1729,7 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
if (ssid) { if (ssid) {
u8 *_ssid = ssid->ssid; u8 *_ssid = ssid->ssid;
size_t ssid_len = ssid->ssid_len; size_t ssid_len = ssid->ssid_len;
u8 ssid_buf[MAX_SSID_LEN]; u8 ssid_buf[SSID_MAX_LEN];
if (ssid_len == 0) { if (ssid_len == 0) {
int _res = wpa_drv_get_ssid(wpa_s, ssid_buf); int _res = wpa_drv_get_ssid(wpa_s, ssid_buf);
if (_res < 0) if (_res < 0)

View file

@ -1034,10 +1034,10 @@ static int wpas_dbus_get_scan_ssids(DBusMessage *message, DBusMessageIter *var,
dbus_message_iter_get_fixed_array(&sub_array_iter, &val, &len); dbus_message_iter_get_fixed_array(&sub_array_iter, &val, &len);
if (len > MAX_SSID_LEN) { if (len > SSID_MAX_LEN) {
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"%s[dbus]: SSID too long (len=%d max_len=%d)", "%s[dbus]: SSID too long (len=%d max_len=%d)",
__func__, len, MAX_SSID_LEN); __func__, len, SSID_MAX_LEN);
*reply = wpas_dbus_error_invalid_args( *reply = wpas_dbus_error_invalid_args(
message, "Invalid SSID: too long"); message, "Invalid SSID: too long");
return -1; return -1;

View file

@ -158,7 +158,7 @@ static void wpa_supplicant_update_current_bss(struct wpa_supplicant *wpa_s)
static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s) static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s)
{ {
struct wpa_ssid *ssid, *old_ssid; struct wpa_ssid *ssid, *old_ssid;
u8 drv_ssid[MAX_SSID_LEN]; u8 drv_ssid[SSID_MAX_LEN];
size_t drv_ssid_len; size_t drv_ssid_len;
int res; int res;

View file

@ -2872,7 +2872,7 @@ int wpa_supplicant_set_debug_params(struct wpa_global *global, int debug_level,
struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s) struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s)
{ {
struct wpa_ssid *entry; struct wpa_ssid *entry;
u8 ssid[MAX_SSID_LEN]; u8 ssid[SSID_MAX_LEN];
int res; int res;
size_t ssid_len; size_t ssid_len;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];