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>
This commit is contained in:

committed by
David S. Miller

parent
954b3c4397
commit
fd786fb1d2
@@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user