aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pci-skeleton.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-09-03 06:39:43 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 23:02:11 -0400
commit7ab0f2736bfe137a82a7084bbfb5f809da95cabd (patch)
treee305ec96eceebb285efee4b6fd307822ab257fe6 /drivers/net/pci-skeleton.c
parentaae5e7c30fc660c50dfecbdd745799b05af90f01 (diff)
netdev: Remove redundant checks for CAP_NET_ADMIN in MDIO implementations
dev_ioctl() already checks capable(CAP_NET_ADMIN) before calling the driver's implementation of MDIO ioctls. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pci-skeleton.c')
-rw-r--r--drivers/net/pci-skeleton.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index c47ba3610c58..0c44b48f1384 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -1784,11 +1784,6 @@ static int netdrv_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
1784 break; 1784 break;
1785 1785
1786 case SIOCSMIIREG: /* Write MII PHY register. */ 1786 case SIOCSMIIREG: /* Write MII PHY register. */
1787 if (!capable (CAP_NET_ADMIN)) {
1788 rc = -EPERM;
1789 break;
1790 }
1791
1792 spin_lock_irqsave (&tp->lock, flags); 1787 spin_lock_irqsave (&tp->lock, flags);
1793 mdio_write (dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); 1788 mdio_write (dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
1794 spin_unlock_irqrestore (&tp->lock, flags); 1789 spin_unlock_irqrestore (&tp->lock, flags);