diff options
author | Rafal Jaworowski <raj@semihalf.com> | 2007-12-27 18:19:02 +0100 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-01-03 21:36:50 -0500 |
commit | f85b60710571b37293d2233933b76e2aa3db5635 (patch) | |
tree | ab517f6280b1d126b0f9dfe53a5496623d63a26f /include | |
parent | 5c740711f0ea5b51414b341b71597c4a0751be74 (diff) | |
download | u-boot-imx-f85b60710571b37293d2233933b76e2aa3db5635.zip u-boot-imx-f85b60710571b37293d2233933b76e2aa3db5635.tar.gz u-boot-imx-f85b60710571b37293d2233933b76e2aa3db5635.tar.bz2 |
Introduce new eth_receive routine
The purpose of this routine is receiving a single network frame, outside of
U-Boot's NetLoop(). Exporting it to standalone programs that run on top of
U-Boot will let them utilise networking facilities. For sending a raw frame
the already existing eth_send() can be used.
The direct consumer of this routine is the newly introduced API layer for
external applications (enabled with CONFIG_API).
Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
Signed-off-by: Piotr Kruszynski <ppk@semihalf.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 603452a..f6decdc 100644 --- a/include/net.h +++ b/include/net.h @@ -122,6 +122,9 @@ extern void eth_set_enetaddr(int num, char* a); /* Set new MAC address */ extern int eth_init(bd_t *bis); /* Initialize the device */ extern int eth_send(volatile void *packet, int length); /* Send a packet */ +#ifdef CONFIG_API +extern int eth_receive(volatile void *packet, int length); /* Receive a packet */ +#endif extern int eth_rx(void); /* Check for received packets */ extern void eth_halt(void); /* stop SCC */ extern char *eth_get_name(void); /* get name of current device */ |