Commit e3caeb2d authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

net: dpaa2-eth: use dev_close/open instead of the internal functions

Instead of calling the internal functions which implement .ndo_stop and
.ndo_open, we can simply call dev_close and dev_open, so that we keep
the code cleaner.

Also, in the next patches we'll use the same APIs from other files
without needing to export the internal functions.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 801c76dd
...@@ -2626,7 +2626,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog) ...@@ -2626,7 +2626,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog)
need_update = (!!priv->xdp_prog != !!prog); need_update = (!!priv->xdp_prog != !!prog);
if (up) if (up)
dpaa2_eth_stop(dev); dev_close(dev);
/* While in xdp mode, enforce a maximum Rx frame size based on MTU. /* While in xdp mode, enforce a maximum Rx frame size based on MTU.
* Also, when switching between xdp/non-xdp modes we need to reconfigure * Also, when switching between xdp/non-xdp modes we need to reconfigure
...@@ -2654,7 +2654,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog) ...@@ -2654,7 +2654,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog)
} }
if (up) { if (up) {
err = dpaa2_eth_open(dev); err = dev_open(dev, NULL);
if (err) if (err)
return err; return err;
} }
...@@ -2665,7 +2665,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog) ...@@ -2665,7 +2665,7 @@ static int dpaa2_eth_setup_xdp(struct net_device *dev, struct bpf_prog *prog)
if (prog) if (prog)
bpf_prog_sub(prog, priv->num_channels); bpf_prog_sub(prog, priv->num_channels);
if (up) if (up)
dpaa2_eth_open(dev); dev_open(dev, NULL);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment