1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

cpu/esp8266: usage of _esp_wifi_recv_cb

Overriding ethernet_input function _esp_wifi_recv_cb is only used when the WiFi interface is in connected state.
This commit is contained in:
Gunar Schorcht 2019-01-23 10:19:28 +01:00 committed by Schorcht
parent c5a9058ab9
commit 78e0aa2a77

View File

@ -514,7 +514,12 @@ extern err_t __real_ethernet_input(struct pbuf *pb, struct netif* netif);
err_t __wrap_ethernet_input(struct pbuf *pb, struct netif* netif)
{
ESP_WIFI_DEBUG("%p %p", pb, netif);
_esp_wifi_recv_cb(pb, netif);
if (_esp_wifi_dev.state == ESP_WIFI_CONNECTED) {
_esp_wifi_recv_cb(pb, netif);
}
else {
__real_ethernet_input(pb, netif);
}
return ERR_OK;
}