[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191217105945.GA17965@lunn.ch>
Date: Tue, 17 Dec 2019 11:59:45 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>,
David Miller <davem@...emloft.net>,
linux-arm-kernel@...ts.infradead.org,
Michal Simek <michal.simek@...inx.com>
Subject: Re: [PATCH net-next 3/3] net: axienet: Pass ioctls to the phy.
> +static int axienet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> +{
> + if (!netif_running(dev))
> + return -EINVAL;
> +
> + switch (cmd) {
> + case SIOCGMIIPHY:
> + case SIOCGMIIREG:
> + case SIOCSMIIREG:
> + case SIOCSHWTSTAMP:
> + case SIOCGHWTSTAMP:
> + return phy_mii_ioctl(dev->phydev, rq, cmd);
> + default:
> + return -EOPNOTSUPP;
> + }
> +}
Hi Richard
You don't need to be conditional. phy_mii_ioctl() and
phylink_mii_ioctl() will return -EOPNOTSUPP for anything it does not
support.
Andrew
Powered by blists - more mailing lists