summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qualcomm/qca_debug.c
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2017-05-29 13:57:13 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-30 13:57:28 -0400
commit0324e75db24bb99c6b7e096d84f273429eb94163 (patch)
tree66b6267523617f1df163c22cfedd6cfd0f53a78d /drivers/net/ethernet/qualcomm/qca_debug.c
parent00bc2e49e7bfd499ee925f552155c328d765bf8a (diff)
net: qualcomm: use net_device_ops instead of direct call
There is no need to export qcaspi_netdev_open and qcaspi_netdev_close because they are also accessible via the net_device_ops. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/qca_debug.c')
-rw-r--r--drivers/net/ethernet/qualcomm/qca_debug.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c
index d145df98feff..92b6be9c4429 100644
--- a/drivers/net/ethernet/qualcomm/qca_debug.c
+++ b/drivers/net/ethernet/qualcomm/qca_debug.c
@@ -275,6 +275,7 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
static int
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
{
+ const struct net_device_ops *ops = dev->netdev_ops;
struct qcaspi *qca = netdev_priv(dev);
if ((ring->rx_pending) ||
@@ -283,13 +284,13 @@ qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
return -EINVAL;
if (netif_running(dev))
- qcaspi_netdev_close(dev);
+ ops->ndo_stop(dev);
qca->txr.count = max_t(u32, ring->tx_pending, TX_RING_MIN_LEN);
qca->txr.count = min_t(u16, qca->txr.count, TX_RING_MAX_LEN);
if (netif_running(dev))
- qcaspi_netdev_open(dev);
+ ops->ndo_open(dev);
return 0;
}