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:
parent
c5a9058ab9
commit
78e0aa2a77
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user