Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aae5e7c3 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

netdev: Remove SIOCDEVPRIVATE aliases for MDIO ioctls



The standard MDIO ioctl numbers are well-established and these should
no longer be needed.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c23ddf8f
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -2218,16 +2218,13 @@ static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)


	switch (cmd) {
	switch (cmd) {
	case SIOCGMIIPHY:
	case SIOCGMIIPHY:
	case SIOCDEVPRIVATE:
		data[0] = dev->phy.address;
		data[0] = dev->phy.address;
		/* Fall through */
		/* Fall through */
	case SIOCGMIIREG:
	case SIOCGMIIREG:
	case SIOCDEVPRIVATE + 1:
		data[3] = emac_mdio_read(ndev, dev->phy.address, data[1]);
		data[3] = emac_mdio_read(ndev, dev->phy.address, data[1]);
		return 0;
		return 0;


	case SIOCSMIIREG:
	case SIOCSMIIREG:
	case SIOCDEVPRIVATE + 2:
		if (!capable(CAP_NET_ADMIN))
		if (!capable(CAP_NET_ADMIN))
			return -EPERM;
			return -EPERM;
		emac_mdio_write(ndev, dev->phy.address, data[1], data[2]);
		emac_mdio_write(ndev, dev->phy.address, data[1], data[2]);
+0 −3
Original line number Original line Diff line number Diff line
@@ -3053,12 +3053,10 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)


	switch(cmd) {
	switch(cmd) {
	case SIOCGMIIPHY:		/* Get address of MII PHY in use. */
	case SIOCGMIIPHY:		/* Get address of MII PHY in use. */
	case SIOCDEVPRIVATE:		/* for binary compat, remove in 2.5 */
		data->phy_id = np->phy_addr_external;
		data->phy_id = np->phy_addr_external;
		/* Fall Through */
		/* Fall Through */


	case SIOCGMIIREG:		/* Read MII PHY register. */
	case SIOCGMIIREG:		/* Read MII PHY register. */
	case SIOCDEVPRIVATE+1:		/* for binary compat, remove in 2.5 */
		/* The phy_id is not enough to uniquely identify
		/* The phy_id is not enough to uniquely identify
		 * the intended target. Therefore the command is sent to
		 * the intended target. Therefore the command is sent to
		 * the given mii on the current port.
		 * the given mii on the current port.
@@ -3077,7 +3075,6 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
		return 0;
		return 0;


	case SIOCSMIIREG:		/* Write MII PHY register. */
	case SIOCSMIIREG:		/* Write MII PHY register. */
	case SIOCDEVPRIVATE+2:		/* for binary compat, remove in 2.5 */
		if (!capable(CAP_NET_ADMIN))
		if (!capable(CAP_NET_ADMIN))
			return -EPERM;
			return -EPERM;
		if (dev->if_port == PORT_TP) {
		if (dev->if_port == PORT_TP) {