mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
net: dpaa_eth: simplify dpaa_ioctl()
phylink_mii_ioctl() handles multiple ioctls in addition to just SIOCGMIIREG: SIOCGMIIPHY, SIOCSMIIREG. Don't filter these out. Also, phylink can handle the case where net_dev->phydev is NULL (like optical SFP module, fixed-link). Be like other drivers and let phylink do so without any driver-side call filtering. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Link: https://patch.msgid.link/20250508124753.1492742-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7bf230556b
commit
c2d0b7da61
|
|
@ -3139,16 +3139,9 @@ static int dpaa_hwtstamp_set(struct net_device *dev,
|
|||
|
||||
static int dpaa_ioctl(struct net_device *net_dev, struct ifreq *rq, int cmd)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
struct dpaa_priv *priv = netdev_priv(net_dev);
|
||||
|
||||
if (cmd == SIOCGMIIREG) {
|
||||
if (net_dev->phydev)
|
||||
return phylink_mii_ioctl(priv->mac_dev->phylink, rq,
|
||||
cmd);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return phylink_mii_ioctl(priv->mac_dev->phylink, rq, cmd);
|
||||
}
|
||||
|
||||
static const struct net_device_ops dpaa_ops = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user