summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-11-20 23:43:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-12-14 14:30:19 +0100
commit2319503ed22a6daea00de1c6f0965fcc4e649dd2 (patch)
tree386b78b23ee39ab57e1f07b22cbc88c4e38f2d0e /net
parent4362c73ac768ad7218982fc1ccf8ae04285c27d1 (diff)
downloadbarebox-2319503ed22a6daea00de1c6f0965fcc4e649dd2.tar.gz
barebox-2319503ed22a6daea00de1c6f0965fcc4e649dd2.tar.xz
net: remove "current" network device
Now that we can do routing we no longer need a "current" network device. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r--net/eth.c17
-rw-r--r--net/ifup.c2
2 files changed, 0 insertions, 19 deletions
diff --git a/net/eth.c b/net/eth.c
index 6dae6b9feb..a8f21b2277 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -28,7 +28,6 @@
#include <errno.h>
#include <malloc.h>
-static struct eth_device *eth_current;
static uint64_t last_link_check;
LIST_HEAD(netdev_list);
@@ -149,16 +148,6 @@ void of_eth_register_ethaddr(struct device_node *node, const char *ethaddr)
list_add_tail(&addr->list, &ethaddr_list);
}
-void eth_set_current(struct eth_device *eth)
-{
- eth_current = eth;
-}
-
-struct eth_device * eth_get_current(void)
-{
- return eth_current;
-}
-
struct eth_device *eth_get_byname(const char *ethname)
{
struct eth_device *edev;
@@ -412,17 +401,11 @@ int eth_register(struct eth_device *edev)
edev->parent->device_node)
edev->nodepath = xstrdup(edev->parent->device_node->full_name);
- if (!eth_current)
- eth_current = edev;
-
return 0;
}
void eth_unregister(struct eth_device *edev)
{
- if (edev == eth_current)
- eth_current = NULL;
-
if (edev->active)
edev->halt(edev);
diff --git a/net/ifup.c b/net/ifup.c
index 2160e3ae46..423712e19c 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -58,8 +58,6 @@ int ifup(const char *name, unsigned flags)
if (edev && edev->ipaddr && !(flags & IFUP_FLAG_FORCE))
return 0;
- eth_set_current(edev);
-
env_push_context();
setenv("ip", "");