mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/net/gnrc/netif: adapt to new API
For Ethernet, raw netifs, and IEEE 802.15.4 netifs only release outgoing frame with legacy drivers, as gnrc_netif does so with new non-blocking API.
This commit is contained in:
parent
1cb6f9e11a
commit
581f35e577
@ -162,7 +162,10 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
#endif
|
||||
res = dev->driver->send(dev, &iolist);
|
||||
|
||||
gnrc_pktbuf_release(pkt);
|
||||
if (gnrc_netif_netdev_legacy_api(netif)) {
|
||||
/* only for legacy drivers we need to release pkt here */
|
||||
gnrc_pktbuf_release(pkt);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -120,8 +120,10 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
#endif
|
||||
|
||||
res = dev->driver->send(dev, (iolist_t *)pkt);
|
||||
/* release old data */
|
||||
gnrc_pktbuf_release(pkt);
|
||||
if (gnrc_netif_netdev_legacy_api(netif)) {
|
||||
/* only for legacy drivers we need to release pkt here */
|
||||
gnrc_pktbuf_release(pkt);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -398,8 +398,10 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
res = dev->driver->send(dev, &iolist_header);
|
||||
#endif
|
||||
|
||||
/* release old data */
|
||||
gnrc_pktbuf_release(pkt);
|
||||
if (gnrc_netif_netdev_legacy_api(netif)) {
|
||||
/* only for legacy drivers we need to release pkt here */
|
||||
gnrc_pktbuf_release(pkt);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user