kopia lustrzana https://github.com/espressif/esp-idf
wpa_supplicant: Fix configurable debug log feature's warning issue
rodzic
851658109c
commit
ec50c5344b
|
@ -145,14 +145,14 @@ void wpa_hexdump_ascii(int level, const char *title, const u8 *buf,
|
||||||
void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
||||||
size_t len);
|
size_t len);
|
||||||
#else
|
#else
|
||||||
#define wpa_printf(level,fmt, args...)
|
#define wpa_printf(level,fmt, args...) do {} while(0)
|
||||||
#define wpa_hexdump(...)
|
#define wpa_hexdump(...) do {} while(0)
|
||||||
#define wpa_dump_mem(...)
|
#define wpa_dump_mem(...) do {} while(0)
|
||||||
#define wpa_hexdump_buf(...)
|
#define wpa_hexdump_buf(...) do {} while(0)
|
||||||
#define wpa_hexdump_key(...)
|
#define wpa_hexdump_key(...) do {} while(0)
|
||||||
#define wpa_hexdump_buf_key(...)
|
#define wpa_hexdump_buf_key(...) do {} while(0)
|
||||||
#define wpa_hexdump_ascii(...)
|
#define wpa_hexdump_ascii(...) do {} while(0)
|
||||||
#define wpa_hexdump_ascii_key(...)
|
#define wpa_hexdump_ascii_key(...) do {} while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define wpa_auth_logger
|
#define wpa_auth_logger
|
||||||
|
|
|
@ -1038,7 +1038,9 @@ get_defaults:
|
||||||
int eap_peer_tls_phase2_nak(struct eap_method_type *types, size_t num_types,
|
int eap_peer_tls_phase2_nak(struct eap_method_type *types, size_t num_types,
|
||||||
struct eap_hdr *hdr, struct wpabuf **resp)
|
struct eap_hdr *hdr, struct wpabuf **resp)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
u8 *pos = (u8 *) (hdr + 1);
|
u8 *pos = (u8 *) (hdr + 1);
|
||||||
|
#endif
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/* TODO: add support for expanded Nak */
|
/* TODO: add support for expanded Nak */
|
||||||
|
|
|
@ -187,7 +187,6 @@ void wpa2_task(void *pvParameters )
|
||||||
ETSEvent *e;
|
ETSEvent *e;
|
||||||
struct eap_sm *sm = gEapSm;
|
struct eap_sm *sm = gEapSm;
|
||||||
bool task_del = false;
|
bool task_del = false;
|
||||||
uint32_t sig = 0;
|
|
||||||
|
|
||||||
if (!sm) {
|
if (!sm) {
|
||||||
return;
|
return;
|
||||||
|
@ -195,7 +194,10 @@ void wpa2_task(void *pvParameters )
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ( pdPASS == xQueueReceive(s_wpa2_queue, &e, portMAX_DELAY) ) {
|
if ( pdPASS == xQueueReceive(s_wpa2_queue, &e, portMAX_DELAY) ) {
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
|
uint32_t sig = 0;
|
||||||
sig = e->sig;
|
sig = e->sig;
|
||||||
|
#endif
|
||||||
if (e->sig < SIG_WPA2_MAX) {
|
if (e->sig < SIG_WPA2_MAX) {
|
||||||
DATA_MUTEX_TAKE();
|
DATA_MUTEX_TAKE();
|
||||||
if(sm->wpa2_sig_cnt[e->sig]) {
|
if(sm->wpa2_sig_cnt[e->sig]) {
|
||||||
|
|
|
@ -2422,14 +2422,18 @@ static int wps_process_wps_state(struct wps_data *wps, const u8 *state)
|
||||||
|
|
||||||
static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)
|
static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
u16 a;
|
u16 a;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (assoc == NULL) {
|
if (assoc == NULL) {
|
||||||
wpa_printf(MSG_DEBUG, "WPS: No Association State received");
|
wpa_printf(MSG_DEBUG, "WPS: No Association State received");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
a = WPA_GET_BE16(assoc);
|
a = WPA_GET_BE16(assoc);
|
||||||
|
#endif
|
||||||
wpa_printf(MSG_DEBUG, "WPS: Enrollee Association State %d", a);
|
wpa_printf(MSG_DEBUG, "WPS: Enrollee Association State %d", a);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2438,14 +2442,18 @@ static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)
|
||||||
|
|
||||||
static int wps_process_config_error(struct wps_data *wps, const u8 *err)
|
static int wps_process_config_error(struct wps_data *wps, const u8 *err)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
u16 e;
|
u16 e;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (err == NULL) {
|
if (err == NULL) {
|
||||||
wpa_printf(MSG_DEBUG, "WPS: No Configuration Error received");
|
wpa_printf(MSG_DEBUG, "WPS: No Configuration Error received");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
e = WPA_GET_BE16(err);
|
e = WPA_GET_BE16(err);
|
||||||
|
#endif
|
||||||
wpa_printf(MSG_DEBUG, "WPS: Enrollee Configuration Error %d", e);
|
wpa_printf(MSG_DEBUG, "WPS: Enrollee Configuration Error %d", e);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Ładowanie…
Reference in New Issue