drivers/ethernet: Use new net_pkt API for sending and receiving
Use the new API where relevant. Only sam_gmac is left aside for now. This simplifies a lot the code as the caller should only care about allocating net_pkt and its buffer once, and thus will not need to mess with "frags" etc... Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
999b3740b8
commit
c14a5c896f
7 changed files with 59 additions and 130 deletions
|
@ -559,6 +559,8 @@ static int ethernet_send(struct net_if *iface, struct net_pkt *pkt)
|
|||
goto error;
|
||||
}
|
||||
|
||||
net_pkt_cursor_init(pkt);
|
||||
|
||||
ret = api->send(net_if_get_device(iface), pkt);
|
||||
if (ret != 0) {
|
||||
eth_stats_update_errors_tx(iface);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue