]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/eth.c
net: add 'ethrotate' environment variable
[karo-tx-uboot.git] / net / eth.c
index 63a4cb652a2c3d06540544b3b3aaac20a36480df..316e8177862d8c0d47a30395fd5ab57ef1ed11db 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -525,6 +525,15 @@ int eth_receive(volatile void *packet, int length)
 void eth_try_another(int first_restart)
 {
        static struct eth_device *first_failed = NULL;
+       char *ethrotate;
+
+       /*
+        * Do not rotate between network interfaces when
+        * 'ethrotate' variable is set to 'no'.
+        */
+       if (((ethrotate = getenv ("ethrotate")) != NULL) &&
+           (strcmp(ethrotate, "no") == 0))
+               return;
 
        if (!eth_current)
                return;