mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
5c740711f0
commit
f85b607105
3 changed files with 71 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue