Re: [PATCH RFC 12/18] r8168: switch to phy_mii_ioctl

2017-12-22 Thread Heiner Kallweit
Am 22.12.2017 um 11:00 schrieb Andrew Lunn: >> static int rtl8168_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) >> { >> -struct rtl8168_private *tp = netdev_priv(dev); >> -struct mii_ioctl_data *data = if_mii(ifr); >> +if (!netif_running(dev)) >> +return -ENODE

Re: [PATCH RFC 12/18] r8168: switch to phy_mii_ioctl

2017-12-22 Thread Andrew Lunn
> static int rtl8168_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) > { > - struct rtl8168_private *tp = netdev_priv(dev); > - struct mii_ioctl_data *data = if_mii(ifr); > + if (!netif_running(dev)) > + return -ENODEV; It is sometimes useful to be able to prod

[PATCH RFC 12/18] r8168: switch to phy_mii_ioctl

2017-12-21 Thread Heiner Kallweit
Use phy_mii_ioctl for handling the ioctl's. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8168.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8168.c b/drivers/net/ethernet/realtek/r8168.c index 33