net/iface: Switch fully to a one-pass sending logic in net_if
Now instead of such path: net_if_send_data -> L2's send -> net_if tx_queue -> net_if_tx -> driver net_if's send It will be: net_if_send_data -> net_if tx_queue -> net_if_tx -> L2's send -> driver net_if's send Only Ethernet is adapted, but 15.4 and bt will follow up. All Ethernet drivers are made compatible with that new scheme also. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
114521c4bf
commit
9464ec3343
12 changed files with 72 additions and 112 deletions
|
@ -405,9 +405,8 @@ static void eth_enc28j60_init_phy(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static int eth_enc28j60_tx(struct net_if *iface, struct net_pkt *pkt)
|
||||
static int eth_enc28j60_tx(struct device *dev, struct net_pkt *pkt)
|
||||
{
|
||||
struct device *dev = net_if_get_device(iface);
|
||||
struct eth_enc28j60_runtime *context = dev->driver_data;
|
||||
u16_t len = net_pkt_ll_reserve(pkt) + net_pkt_get_len(pkt);
|
||||
u16_t tx_bufaddr = ENC28J60_TXSTART;
|
||||
|
@ -487,8 +486,6 @@ static int eth_enc28j60_tx(struct net_if *iface, struct net_pkt *pkt)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
LOG_DBG("Tx successful");
|
||||
|
||||
return 0;
|
||||
|
@ -672,9 +669,9 @@ static void eth_enc28j60_iface_init(struct net_if *iface)
|
|||
|
||||
static const struct ethernet_api api_funcs = {
|
||||
.iface_api.init = eth_enc28j60_iface_init,
|
||||
.iface_api.send = eth_enc28j60_tx,
|
||||
|
||||
.get_capabilities = eth_enc28j60_get_capabilities,
|
||||
.send = eth_enc28j60_tx,
|
||||
};
|
||||
|
||||
static int eth_enc28j60_init(struct device *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue