From 77caf256c66a64dc6d8d1296205aa38f5f90210c Mon Sep 17 00:00:00 2001 From: liuzhifu Date: Tue, 30 Aug 2016 18:06:37 +0800 Subject: [PATCH] components: lwip - enable PERF macro for debug reason --- components/lwip/api/tcpip.c | 2 +- components/lwip/include/lwip/port/lwipopts.h | 1 + components/lwip/port/netif/wlanif.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/lwip/api/tcpip.c b/components/lwip/api/tcpip.c index f0c4c476e7..9df3c38a1d 100755 --- a/components/lwip/api/tcpip.c +++ b/components/lwip/api/tcpip.c @@ -62,7 +62,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; /* global variables */ #ifdef PERF -uint32 g_rx_post_mbox_fail_cnt = 0; +uint32_t g_rx_post_mbox_fail_cnt = 0; #endif static tcpip_init_done_fn tcpip_init_done; static void *tcpip_init_done_arg; diff --git a/components/lwip/include/lwip/port/lwipopts.h b/components/lwip/include/lwip/port/lwipopts.h index c819b8d889..122fea3157 100755 --- a/components/lwip/include/lwip/port/lwipopts.h +++ b/components/lwip/include/lwip/port/lwipopts.h @@ -221,6 +221,7 @@ extern unsigned long os_random(void); * TCP_WND: The size of a TCP window. This must be at least * (2 * TCP_MSS) for things to work well */ +#define PERF 1 #ifdef PERF extern unsigned char misc_prof_get_tcpw(void); extern unsigned char misc_prof_get_tcp_snd_buf(void); diff --git a/components/lwip/port/netif/wlanif.c b/components/lwip/port/netif/wlanif.c index 0b87656c8b..9832c41aff 100755 --- a/components/lwip/port/netif/wlanif.c +++ b/components/lwip/port/netif/wlanif.c @@ -66,7 +66,7 @@ static char hostname[16]; static char hostname[16]; #endif #ifdef PERF -uint32 g_rx_alloc_pbuf_fail_cnt = 0; +uint32_t g_rx_alloc_pbuf_fail_cnt = 0; #endif /**