1. Remove tx flow control for TCP
2. Remove tx flow control for UDP temporary
3. Return the error code when call esp_wifi_internal_tx()
*/
static inline void esp32_tx_flow_ctrl(void)
{
+//TODO we need to do flow control for UDP
+#if 0
uint8_t _wait_delay = 1;
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;
}
+#endif
}
#else
#endif /* (LWIP_UDP || LWIP_RAW) */
}
- esp32_tx_flow_ctrl();
-
write_flags = NETCONN_COPY |
((flags & MSG_MORE) ? NETCONN_MORE : 0) |
((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0);
}
}
- esp_wifi_internal_tx(wifi_if, q->payload, pbuf_x_len);
- return ERR_OK;
-
+ return esp_wifi_internal_tx(wifi_if, q->payload, pbuf_x_len);
#else
for(q = p; q != NULL; q = q->next) {
esp_wifi_internal_tx(wifi_if, q->payload, q->len);
}
-#endif
-
return ERR_OK;
+#endif
}
/**