diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-11 13:41:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-31 12:35:45 +0200 |
commit | 18cce41473e3c2dbeb50e28daed36411112d72df (patch) | |
tree | c7bbf2c1589a148aa77e69a0d4da1afa154503f7 /net/dhcp.c | |
parent | 6a58ec609eec5b28d7ee72fcfd65efb864612234 (diff) | |
download | barebox-18cce41473e3c2dbeb50e28daed36411112d72df.tar.gz |
net: Open ethernet devices explicitly
Open ethernet devices explicitly rather than implicitly when sending
packets. This allows us to not only enable, but in the next step to
also disable ethernet devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/dhcp.c')
-rw-r--r-- | net/dhcp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dhcp.c b/net/dhcp.c index 670a6a6422..a27fa89996 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -609,6 +609,10 @@ int dhcp(struct eth_device *edev, const struct dhcp_req_param *param) struct dhcp_result *res; int ret; + ret = eth_open(edev); + if (ret) + return ret; + ret = dhcp_request(edev, param, &res); if (ret) return ret; |