forked from espressif/esp-idf
Reduce log level of hexdumps to verbose
Revert "Reduce log level of hexdumps to verbose" Add a menuconfig option to enable or disable the logging in wpa_supplicant Clarify help message
This commit is contained in:
committed by
zhangyanjiao
parent
6d82b0a749
commit
b4b51f5a5e
@ -18,4 +18,15 @@ menu "Supplicant"
|
|||||||
which will cause M2 validation fail, bypassing WPS-Config method
|
which will cause M2 validation fail, bypassing WPS-Config method
|
||||||
validation.
|
validation.
|
||||||
|
|
||||||
|
config WPA_DEBUG_PRINT
|
||||||
|
bool "Print debug messages from WPA Supplicant"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Select this option to print logging information from WPA supplicant,
|
||||||
|
this includes handshake information and key hex dumps depending
|
||||||
|
on the project logging level.
|
||||||
|
|
||||||
|
Enabling this could increase the build size ~60kb
|
||||||
|
depending on the project logging level.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -47,6 +47,11 @@ void wpa_debug_close_file(void);
|
|||||||
*/
|
*/
|
||||||
void wpa_debug_print_timestamp(void);
|
void wpa_debug_print_timestamp(void);
|
||||||
|
|
||||||
|
#if CONFIG_WPA_DEBUG_PRINT
|
||||||
|
#define DEBUG_PRINT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_PRINT
|
||||||
/**
|
/**
|
||||||
* wpa_printf - conditional printf
|
* wpa_printf - conditional printf
|
||||||
* @level: priority level (MSG_*) of the message
|
* @level: priority level (MSG_*) of the message
|
||||||
@ -58,8 +63,17 @@ void wpa_debug_print_timestamp(void);
|
|||||||
*
|
*
|
||||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||||
*/
|
*/
|
||||||
#define DEBUG_PRINT
|
|
||||||
#define MSG_PRINT
|
#define wpa_printf(level,fmt, args...) ESP_LOG_LEVEL_LOCAL(level, TAG, fmt, ##args)
|
||||||
|
|
||||||
|
static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, size_t len)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpa_hexdump - conditional hex dump
|
* wpa_hexdump - conditional hex dump
|
||||||
@ -72,19 +86,6 @@ void wpa_debug_print_timestamp(void);
|
|||||||
* output may be directed to stdout, stderr, and/or syslog based on
|
* output may be directed to stdout, stderr, and/or syslog based on
|
||||||
* configuration. The contents of buf is printed out has hex dump.
|
* configuration. The contents of buf is printed out has hex dump.
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG_PRINT
|
|
||||||
#define wpa_printf(level,fmt, args...) ESP_LOG_LEVEL_LOCAL(level, TAG, fmt, ##args)
|
|
||||||
|
|
||||||
static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, size_t len)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len);
|
void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len);
|
||||||
|
|
||||||
static inline void wpa_hexdump_buf(int level, const char *title,
|
static inline void wpa_hexdump_buf(int level, const char *title,
|
||||||
@ -150,6 +151,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
|||||||
#else
|
#else
|
||||||
#define wpa_printf(level,fmt, args...)
|
#define wpa_printf(level,fmt, args...)
|
||||||
#define wpa_hexdump(...)
|
#define wpa_hexdump(...)
|
||||||
|
#define wpa_dump_mem(...)
|
||||||
#define wpa_hexdump_buf(...)
|
#define wpa_hexdump_buf(...)
|
||||||
#define wpa_hexdump_key(...)
|
#define wpa_hexdump_key(...)
|
||||||
#define wpa_hexdump_buf_key(...)
|
#define wpa_hexdump_buf_key(...)
|
||||||
|
Reference in New Issue
Block a user