[PATCH] net: Call edev->recv with correct eth_device

Sascha Hauer s.hauer at pengutronix.de
Wed Sep 17 03:27:55 PDT 2014


edev->recv has to be called with edev as argument, not eth_current.
This fixes networking when multiple network devices are used and the
current one is switched during runtime.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 net/eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth.c b/net/eth.c
index b830f79..89bddba 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -246,7 +246,7 @@ static int __eth_rx(struct eth_device *edev)
 	if (ret)
 		return ret;
 
-	return edev->recv(eth_current);
+	return edev->recv(edev);
 }
 
 int eth_rx(void)
-- 
2.1.0




More information about the barebox mailing list