|
|
@@ -47,6 +47,7 @@ void wpa_debug_close_file(void);
|
|
|
*/
|
|
|
void wpa_debug_print_timestamp(void);
|
|
|
|
|
|
+#ifdef DEBUG_PRINT
|
|
|
/**
|
|
|
* wpa_printf - conditional printf
|
|
|
* @level: priority level (MSG_*) of the message
|
|
|
@@ -58,21 +59,6 @@ void wpa_debug_print_timestamp(void);
|
|
|
*
|
|
|
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
|
|
*/
|
|
|
-#define DEBUG_PRINT
|
|
|
-#define MSG_PRINT
|
|
|
-
|
|
|
-/**
|
|
|
- * wpa_hexdump - conditional hex dump
|
|
|
- * @level: priority level (MSG_*) of the message
|
|
|
- * @title: title of for the message
|
|
|
- * @buf: data buffer to be dumped
|
|
|
- * @len: length of the buf
|
|
|
- *
|
|
|
- * This function is used to print conditional debugging and error messages. The
|
|
|
- * output may be directed to stdout, stderr, and/or syslog based on
|
|
|
- * 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)
|
|
|
|
|
|
void wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len);
|
|
|
@@ -85,7 +71,17 @@ static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8
|
|
|
{
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+/**
|
|
|
+ * wpa_hexdump - conditional hex dump
|
|
|
+ * @level: priority level (MSG_*) of the message
|
|
|
+ * @title: title of for the message
|
|
|
+ * @buf: data buffer to be dumped
|
|
|
+ * @len: length of the buf
|
|
|
+ *
|
|
|
+ * This function is used to print conditional debugging and error messages. The
|
|
|
+ * output may be directed to stdout, stderr, and/or syslog based on
|
|
|
+ * configuration. The contents of buf is printed out has hex dump.
|
|
|
+ */
|
|
|
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,
|
|
|
@@ -151,6 +147,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
|
|
#else
|
|
|
#define wpa_printf(level,fmt, args...)
|
|
|
#define wpa_hexdump(...)
|
|
|
+#define wpa_dump_mem(...)
|
|
|
#define wpa_hexdump_buf(...)
|
|
|
#define wpa_hexdump_key(...)
|
|
|
#define wpa_hexdump_buf_key(...)
|