[OpenWrt-Devel] [PATCH 3/6] ath79: ag71xx: remove unused SIOCETHTOOL ioctl handling

Petr Štetiar ynezz at true.cz
Sat May 25 04:58:38 PDT 2019


This ioctl is currently routed through generic interface code:

 dev_ioctl
   dev_ethtool
     __ethtool_get_link_ksettings
       phy_ethtool_ioctl

Cc: John Crispin <john at phrozen.org>
Cc: Chuanhong Guo <gch981213 at gmail.com>
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 8cff56a11a66..bcc9e227130c 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -946,18 +946,9 @@ err_drop:
 static int ag71xx_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	struct ag71xx *ag = netdev_priv(dev);
-	int ret;
 
-	switch (cmd) {
-	case SIOCETHTOOL:
-		if (ag->phy_dev == NULL)
-			break;
-
-		spin_lock_irq(&ag->lock);
-		ret = phy_ethtool_ioctl(ag->phy_dev, (void *) ifr->ifr_data);
-		spin_unlock_irq(&ag->lock);
-		return ret;
 
+	switch (cmd) {
 	case SIOCSIFHWADDR:
 		if (copy_from_user
 			(dev->dev_addr, ifr->ifr_data, sizeof(dev->dev_addr)))
-- 
1.9.1




More information about the openwrt-devel mailing list