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
@@ -882,14 +882,6 @@ static const struct ethtool_ops fs_ethtool_ops = {
|
||||
.set_tunable = fs_set_tunable,
|
||||
};
|
||||
|
||||
static int fs_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
{
|
||||
if (!netif_running(dev))
|
||||
return -EINVAL;
|
||||
|
||||
return phy_mii_ioctl(dev->phydev, rq, cmd);
|
||||
}
|
||||
|
||||
extern int fs_mii_connect(struct net_device *dev);
|
||||
extern void fs_mii_disconnect(struct net_device *dev);
|
||||
|
||||
@@ -907,7 +899,7 @@ static const struct net_device_ops fs_enet_netdev_ops = {
|
||||
.ndo_start_xmit = fs_enet_start_xmit,
|
||||
.ndo_tx_timeout = fs_timeout,
|
||||
.ndo_set_rx_mode = fs_set_multicast_list,
|
||||
.ndo_do_ioctl = fs_ioctl,
|
||||
.ndo_do_ioctl = phy_do_ioctl_running,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
|
||||
Reference in New Issue
Block a user