diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-03-22 17:09:24 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:14 -0600 |
commit | 60304592b96414b9d84a919262e4b2daf1a954fb (patch) | |
tree | 9b74a696268d3cc4539523bfa9bb610ee9905886 /include/net.h | |
parent | 22f68524f84c3a0d620e787c51d5f244ef8e0aca (diff) | |
download | u-boot-imx-60304592b96414b9d84a919262e4b2daf1a954fb.zip u-boot-imx-60304592b96414b9d84a919262e4b2daf1a954fb.tar.gz u-boot-imx-60304592b96414b9d84a919262e4b2daf1a954fb.tar.bz2 |
net: Improve error handling
Take a pass at plumbing errors through to the users of the network stack
Currently only the start() function errors will be returned from
NetLoop(). recv() tends not to have errors, so that is likely not worth
adding. send() certainly can return errors, but this patch does not
attempt to plumb them yet. halt() is not expected to error.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index 942fa4c..e7f28d7 100644 --- a/include/net.h +++ b/include/net.h @@ -543,7 +543,7 @@ int NetLoop(enum proto_t); void NetStop(void); /* Load failed. Start again. */ -void NetStartAgain(void); +int NetStartAgain(void); /* Get size of the ethernet header when we send */ int NetEthHdrSize(void); @@ -613,6 +613,7 @@ static inline void net_set_state(enum net_loop_state state) /* Transmit a packet */ static inline void NetSendPacket(uchar *pkt, int len) { + /* Currently no way to return errors from eth_send() */ (void) eth_send(pkt, len); } |