summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-03-22 17:09:12 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:12 -0600
commit17591405a7b932ba0a66107645f5ff5f6f36da75 (patch)
tree3fbe0d78285e324191251d90bd551cdef0435cb8 /include/net.h
parent2a504df00652ede0316e2cf872ab065090617a8e (diff)
downloadu-boot-imx-17591405a7b932ba0a66107645f5ff5f6f36da75.zip
u-boot-imx-17591405a7b932ba0a66107645f5ff5f6f36da75.tar.gz
u-boot-imx-17591405a7b932ba0a66107645f5ff5f6f36da75.tar.bz2
dm: eth: Pass the packet pointer as a parameter to recv
Stop forcing drivers to call net_process_received_packet() - formerly called NetReceive(). Now the uclass will handle calling the driver for each packet until the driver errors or has nothing to return. The uclass will then pass the good packets off to the network stack by calling net_process_received_packet(). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net.h b/include/net.h
index a536fcc..0a1b3a8 100644
--- a/include/net.h
+++ b/include/net.h
@@ -95,7 +95,9 @@ struct eth_pdata {
*
* start: Prepare the hardware to send and receive packets
* send: Send the bytes passed in "packet" as a packet on the wire
- * recv: Check if the hardware received a packet. Call the network stack if so
+ * recv: Check if the hardware received a packet. If so, set the pointer to the
+ * packet buffer in the packetp parameter. If not, return an error or 0 to
+ * indicate that the hardware receive FIFO is empty
* stop: Stop the hardware from looking for packets - may be called even if
* state == PASSIVE
* mcast: Join or leave a multicast group (for TFTP) - optional
@@ -110,7 +112,7 @@ struct eth_pdata {
struct eth_ops {
int (*start)(struct udevice *dev);
int (*send)(struct udevice *dev, void *packet, int length);
- int (*recv)(struct udevice *dev);
+ int (*recv)(struct udevice *dev, uchar **packetp);
void (*stop)(struct udevice *dev);
#ifdef CONFIG_MCAST_TFTP
int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join);