diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-12-09 14:13:23 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-01-27 15:55:51 +0100 |
commit | 97d2363d206483bc4b70ca8aa4f3f003af7f431f (patch) | |
tree | 42c77f35f0a3d8b4c9ea2d16d33f0c8a48d8d8cf | |
parent | 5d0449d4c74ad310373bb90691b9258e8ff12c2c (diff) | |
download | u-boot-imx-97d2363d206483bc4b70ca8aa4f3f003af7f431f.zip u-boot-imx-97d2363d206483bc4b70ca8aa4f3f003af7f431f.tar.gz u-boot-imx-97d2363d206483bc4b70ca8aa4f3f003af7f431f.tar.bz2 |
net: axi_emac: Split recv from free_pkt
Call net_process_received_packet() by core.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | drivers/net/xilinx_axi_emac.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 172ccc5..adfee8c 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -571,9 +571,14 @@ static int axiemac_recv(struct udevice *dev, int flags, uchar **packetp) #ifdef DEBUG print_buffer(&rxframe, &rxframe[0], 1, length, 16); #endif - /* Pass the received frame up for processing */ - if (length) - net_process_received_packet(rxframe, length); + + *packetp = rxframe; + return length; +} + +static int axiemac_free_pkt(struct udevice *dev, uchar *packet, int length) +{ + struct axidma_priv *priv = dev_get_priv(dev); #ifdef DEBUG /* It is useful to clear buffer to be sure that it is consistent */ @@ -655,6 +660,7 @@ static const struct eth_ops axi_emac_ops = { .start = axiemac_init, .send = axiemac_send, .recv = axiemac_recv, + .free_pkt = axiemac_free_pkt, .stop = axiemac_halt, .write_hwaddr = axiemac_setup_mac, }; |