diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2020-01-21 22:09:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-23 10:49:30 +0100 |
commit | fd786fb1d2cad70b9aaba8c73872cbf63262bd58 (patch) | |
tree | e98694053e6770e079e9699d8758ce39d15d1826 /drivers/net/usb/ax88172a.c | |
parent | 954b3c4397792c8614aa4aaf25030ae87ece8307 (diff) | |
download | linux-fd786fb1d2cad70b9aaba8c73872cbf63262bd58.tar.bz2 |
net: convert suitable drivers to use phy_do_ioctl_running
Convert suitable drivers to use new helper phy_do_ioctl_running.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Timur Tabi <timur@kernel.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/ax88172a.c')
-rw-r--r-- | drivers/net/usb/ax88172a.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c index af3994e0853b..4e514f5d7c6c 100644 --- a/drivers/net/usb/ax88172a.c +++ b/drivers/net/usb/ax88172a.c @@ -39,17 +39,6 @@ static int asix_mdio_bus_write(struct mii_bus *bus, int phy_id, int regnum, return 0; } -static int ax88172a_ioctl(struct net_device *net, struct ifreq *rq, int cmd) -{ - if (!netif_running(net)) - return -EINVAL; - - if (!net->phydev) - return -ENODEV; - - return phy_mii_ioctl(net->phydev, rq, cmd); -} - /* set MAC link settings according to information from phylib */ static void ax88172a_adjust_link(struct net_device *netdev) { @@ -134,7 +123,7 @@ static const struct net_device_ops ax88172a_netdev_ops = { .ndo_get_stats64 = usbnet_get_stats64, .ndo_set_mac_address = asix_set_mac_address, .ndo_validate_addr = eth_validate_addr, - .ndo_do_ioctl = ax88172a_ioctl, + .ndo_do_ioctl = phy_do_ioctl_running, .ndo_set_rx_mode = asix_set_multicast, }; |