summaryrefslogtreecommitdiff
path: root/net/eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/eth.c')
-rw-r--r--net/eth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/eth.c b/net/eth.c
index 13b7723..05411f1 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -344,7 +344,9 @@ int eth_rx(void)
ret = eth_get_ops(current)->recv(current, &packet);
if (ret > 0)
net_process_received_packet(packet, ret);
- else
+ if (ret >= 0 && eth_get_ops(current)->free_pkt)
+ eth_get_ops(current)->free_pkt(current, packet, ret);
+ if (ret <= 0)
break;
}
if (ret == -EAGAIN)