lwip/esp32: move the extern wifi calls into esp_wifi_internal.h

1. Add esp_wifi_internal.h
2. Rename system_pp_recycle_rx_pkt to esp_wifi_internal_free_rx_buffer
3. rename esp_wifi_tx_is_stop to esp_wifi_internal_tx_is_stop
4. rename ieee80211_output to esp_wifi_internal_tx
This commit is contained in:
liuzhifu
2016-10-26 13:23:35 +08:00
parent cbb26c9532
commit 612aaa69e4
5 changed files with 89 additions and 11 deletions

View File

@@ -388,10 +388,8 @@ static void lwip_socket_drop_registered_memberships(int s);
#endif /* LWIP_IGMP */
#ifdef LWIP_ESP8266
/* Since esp_wifi_tx_is_stop/system_get_free_heap_size are not an public wifi API, so extern them here*/
extern size_t system_get_free_heap_size(void);
extern bool esp_wifi_tx_is_stop(void);
#include "esp_wifi_internal.h"
#include "esp_system.h"
/* Please be notified that this flow control is just a workaround for fixing wifi Q full issue.
* Under UDP/TCP pressure test, we found that the sockets may cause wifi tx queue full if the socket
@@ -404,7 +402,7 @@ static inline void esp32_tx_flow_ctrl(void)
{
uint8_t _wait_delay = 0;
while ((system_get_free_heap_size() < HEAP_HIGHWAT) || esp_wifi_tx_is_stop()){
while ((system_get_free_heap_size() < HEAP_HIGHWAT) || esp_wifi_internal_tx_is_stop()){
vTaskDelay(_wait_delay/portTICK_RATE_MS);
if (_wait_delay < 64) _wait_delay *= 2;
}