Commit 063b805f authored by Jeff Garzik's avatar Jeff Garzik

Remove deprecated SIOCDEVPRIVATE ioctls in net drivers

3c59x, eepro100, sis900, and tulip.

Also, update eepro100 Becker URL.

Contributor: Dave Jones
parent d7de5700
......@@ -2713,18 +2713,15 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
case SIOCGMIIPHY: /* Get address of MII PHY in use. */
case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */
data->phy_id = phy;
case SIOCGMIIREG: /* Read MII PHY register. */
case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */
EL3WINDOW(4);
data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f);
retval = 0;
break;
case SIOCSMIIREG: /* Write MII PHY register. */
case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */
if (!capable(CAP_NET_ADMIN)) {
retval = -EPERM;
} else {
......
......@@ -28,7 +28,7 @@
*/
static const char *version =
"eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
"eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html\n"
"eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
/* A few user-configurable values that apply to all boards.
......@@ -1960,11 +1960,9 @@ static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
switch(cmd) {
case SIOCGMIIPHY: /* Get address of MII PHY in use. */
case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */
data->phy_id = phy;
case SIOCGMIIREG: /* Read MII PHY register. */
case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */
/* FIXME: these operations need to be serialized with MDIO
access from the timeout handler.
They are currently serialized only with MDIO access from the
......@@ -1978,7 +1976,6 @@ static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return 0;
case SIOCSMIIREG: /* Write MII PHY register. */
case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */
if (!capable(CAP_NET_ADMIN))
return -EPERM;
saved_acpi = pci_set_power_state(sp->pdev, 0);
......
......@@ -1784,17 +1784,14 @@ static int mii_ioctl(struct net_device *net_dev, struct ifreq *rq, int cmd)
switch(cmd) {
case SIOCGMIIPHY: /* Get address of MII PHY in use. */
case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */
data->phy_id = sis_priv->mii->phy_addr;
/* Fall Through */
case SIOCGMIIREG: /* Read MII PHY register. */
case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */
data->val_out = mdio_read(net_dev, data->phy_id & 0x1f, data->reg_num & 0x1f);
return 0;
case SIOCSMIIREG: /* Write MII PHY register. */
case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */
if (!capable(CAP_NET_ADMIN))
return -EPERM;
mdio_write(net_dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
......
......@@ -880,7 +880,6 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
case SIOCGMIIPHY: /* Get address of MII PHY in use. */
case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */
if (tp->mii_cnt)
data->phy_id = phy;
else if (tp->flags & HAS_NWAY)
......@@ -891,7 +890,6 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
return -ENODEV;
case SIOCGMIIREG: /* Read MII PHY register. */
case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */
if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) {
int csr12 = inl (ioaddr + CSR12);
int csr14 = inl (ioaddr + CSR14);
......@@ -927,7 +925,6 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
return 0;
case SIOCSMIIREG: /* Write MII PHY register. */
case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */
if (!capable (CAP_NET_ADMIN))
return -EPERM;
if (regnum & ~0x1f)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment