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
@ -1248,14 +1248,6 @@ static int bgmac_set_mac_address(struct net_device *net_dev, void *addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bgmac_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
if (!netif_running(net_dev))
|
||||
return -EINVAL;
|
||||
|
||||
return phy_mii_ioctl(net_dev->phydev, ifr, cmd);
|
||||
}
|
||||
|
||||
static const struct net_device_ops bgmac_netdev_ops = {
|
||||
.ndo_open = bgmac_open,
|
||||
.ndo_stop = bgmac_stop,
|
||||
@ -1263,7 +1255,7 @@ static const struct net_device_ops bgmac_netdev_ops = {
|
||||
.ndo_set_rx_mode = bgmac_set_rx_mode,
|
||||
.ndo_set_mac_address = bgmac_set_mac_address,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_do_ioctl = bgmac_ioctl,
|
||||
.ndo_do_ioctl = phy_do_ioctl_running,
|
||||
};
|
||||
|
||||
/**************************************************
|
||||
|
Reference in New Issue
Block a user