mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-18 11:03:50 +01:00
pkg/lwip: fix handling of netdev send return code
This commit is contained in:
parent
d0403fc32d
commit
a2bf203485
@ -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 */
|
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
||||||
#endif
|
#endif
|
||||||
lwip_netif_dev_acquire(netif);
|
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);
|
lwip_netif_dev_release(netif);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ static err_t _ieee802154_link_output(struct netif *netif, struct pbuf *p)
|
|||||||
};
|
};
|
||||||
|
|
||||||
lwip_netif_dev_acquire(netif);
|
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);
|
lwip_netif_dev_release(netif);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user