Skip to content

Commit

Permalink
sys/net/gnrc/netif/ethernet: adapt to new API
Browse files Browse the repository at this point in the history
only release outgoing frame with legacy drivers, as gnrc_netif does so with
new non-blocking API.
  • Loading branch information
Marian Buschsieweke committed Aug 9, 2022
1 parent e818ca5 commit 21d2f01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sys/net/gnrc/netif/ethernet/gnrc_netif_ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 21d2f01

Please sign in to comment.