Use SSID_MAX_LEN define instead of value 32 when comparing SSID length