1
0
Fork 0
Commit Graph

7 Commits (049a95a7759c0e384c1fc7b8575d968d56a33997)

Author SHA1 Message Date
Joe Hershberger 049a95a775 net: cosmetic: Change IPaddr_t to struct in_addr
This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:32 -06:00
Joe Hershberger 60304592b9 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>
2015-04-18 11:11:14 -06:00
Joe Hershberger 7ece1c61ad test: dm: net: Add a test of the netretry behavior
The effect of the "netretry" env var was recently changed. This test
checks that behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger 7d104eab7d test: dm: eth: Add testing for ethrotate env var
Make sure that the ethrotate behavior occurs as expected.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger 6536b9bb76 dm: eth: Add support for ethprime env var
The ethprime env var is used to indicate the starting device if none is
specified in ethact. Also support aliases specified in the ethprime var.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger e58780dcb7 dm: eth: Add support for aliases
Allow network devices to be referred to as "eth0" instead of
"eth@12345678" when specified in ethact.

Add tests to verify this behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger bfacad7da1 test: dm: eth: Add tests for the eth dm implementation
Add a test for the eth uclass using the sandbox eth driver. Verify basic
functionality of the network stack / eth uclass by exercising the ping
function.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:12 -06:00