Re: [PATCH net-next] net: usb: introduce usbnet_mii_ioctl helper function
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-24 18:48:44
Also in:
linux-usb
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-24 18:48:44
Also in:
linux-usb
static int smsc75xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
{
- struct usbnet *dev = netdev_priv(netdev);
-
if (!netif_running(netdev))
return -EINVAL;
- return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
+ return usbnet_mii_ioctl(netdev, rq, cmd);
}You are doing the same as phy_do_ioctl(), but for the old mii code. However, we also have phy_do_ioctl_running(). It might make sense to add usbnet_mii_ioctl_running()? Andrew