atheros: ar231x-eth: remove useless IOCTL handlers
These IOCTLs handled in the core now. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 42492
This commit is contained in:
parent
a28fd0dfd0
commit
300021d6c4
2 changed files with 5 additions and 24 deletions
|
@ -33,7 +33,7 @@
|
||||||
+obj-$(CONFIG_NET_AR231X) += ar231x.o
|
+obj-$(CONFIG_NET_AR231X) += ar231x.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/net/ethernet/atheros/ar231x/ar231x.c
|
+++ b/drivers/net/ethernet/atheros/ar231x/ar231x.c
|
||||||
@@ -0,0 +1,1250 @@
|
@@ -0,0 +1,1231 @@
|
||||||
+/*
|
+/*
|
||||||
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
|
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
|
||||||
+ *
|
+ *
|
||||||
|
@ -1138,27 +1138,8 @@
|
||||||
+static int ar231x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
+static int ar231x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||||
+{
|
+{
|
||||||
+ struct ar231x_private *sp = netdev_priv(dev);
|
+ struct ar231x_private *sp = netdev_priv(dev);
|
||||||
+ int ret;
|
|
||||||
+
|
+
|
||||||
+ switch (cmd) {
|
+ switch (cmd) {
|
||||||
+ case SIOCETHTOOL:
|
|
||||||
+ spin_lock_irq(&sp->lock);
|
|
||||||
+ ret = phy_ethtool_ioctl(sp->phy_dev, (void *)ifr->ifr_data);
|
|
||||||
+ spin_unlock_irq(&sp->lock);
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ case SIOCSIFHWADDR:
|
|
||||||
+ if (copy_from_user
|
|
||||||
+ (dev->dev_addr, ifr->ifr_data, sizeof(dev->dev_addr)))
|
|
||||||
+ return -EFAULT;
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ case SIOCGIFHWADDR:
|
|
||||||
+ if (copy_to_user
|
|
||||||
+ (ifr->ifr_data, dev->dev_addr, sizeof(dev->dev_addr)))
|
|
||||||
+ return -EFAULT;
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ case SIOCGMIIPHY:
|
+ case SIOCGMIIPHY:
|
||||||
+ case SIOCGMIIREG:
|
+ case SIOCGMIIREG:
|
||||||
+ case SIOCSMIIREG:
|
+ case SIOCSMIIREG:
|
||||||
|
|
|
@ -79,13 +79,13 @@
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1104,6 +1151,9 @@ static int ar231x_ioctl(struct net_devic
|
@@ -1103,6 +1150,9 @@ static int ar231x_ioctl(struct net_devic
|
||||||
|
{
|
||||||
struct ar231x_private *sp = netdev_priv(dev);
|
struct ar231x_private *sp = netdev_priv(dev);
|
||||||
int ret;
|
|
||||||
|
|
||||||
+ if (!sp->phy_dev)
|
+ if (!sp->phy_dev)
|
||||||
+ return -ENODEV;
|
+ return -ENODEV;
|
||||||
+
|
+
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case SIOCETHTOOL:
|
case SIOCGMIIPHY:
|
||||||
spin_lock_irq(&sp->lock);
|
case SIOCGMIIREG:
|
||||||
|
|
Loading…
Reference in a new issue