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>
This commit is contained in:
parent
5d0449d4c7
commit
97d2363d20
|
@ -571,9 +571,14 @@ static int axiemac_recv(struct udevice *dev, int flags, uchar **packetp)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
print_buffer(&rxframe, &rxframe[0], 1, length, 16);
|
print_buffer(&rxframe, &rxframe[0], 1, length, 16);
|
||||||
#endif
|
#endif
|
||||||
/* Pass the received frame up for processing */
|
|
||||||
if (length)
|
*packetp = rxframe;
|
||||||
net_process_received_packet(rxframe, length);
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int axiemac_free_pkt(struct udevice *dev, uchar *packet, int length)
|
||||||
|
{
|
||||||
|
struct axidma_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/* It is useful to clear buffer to be sure that it is consistent */
|
/* 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,
|
.start = axiemac_init,
|
||||||
.send = axiemac_send,
|
.send = axiemac_send,
|
||||||
.recv = axiemac_recv,
|
.recv = axiemac_recv,
|
||||||
|
.free_pkt = axiemac_free_pkt,
|
||||||
.stop = axiemac_halt,
|
.stop = axiemac_halt,
|
||||||
.write_hwaddr = axiemac_setup_mac,
|
.write_hwaddr = axiemac_setup_mac,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue