1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

pkg/lwip: fix handling of netdev send return code

This commit is contained in:
Jose Alamos 2022-08-19 19:45:06 +02:00
parent d0403fc32d
commit a2bf203485
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

@ -230,7 +230,7 @@ static err_t _eth_link_output(struct netif *netif, struct pbuf *p)
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif
lwip_netif_dev_acquire(netif);
err_t res = (netdev->driver->send(netdev, iolist) > 0) ? ERR_OK : ERR_BUF;
err_t res = (netdev->driver->send(netdev, iolist) >= 0) ? ERR_OK : ERR_BUF;
lwip_netif_dev_release(netif);
return res;
}
@ -247,7 +247,7 @@ static err_t _ieee802154_link_output(struct netif *netif, struct pbuf *p)
};
lwip_netif_dev_acquire(netif);
err_t res = (netdev->driver->send(netdev, &pkt) > 0) ? ERR_OK : ERR_BUF;
err_t res = (netdev->driver->send(netdev, &pkt) >= 0) ? ERR_OK : ERR_BUF;
lwip_netif_dev_release(netif);
return res;
}