Skip to contentSkip to conversation

rt2x00: ethtool

PATCH In review Ivo van Doorn 1 participant 1 message Dec 3, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/26 rt2x00: ethtool

Latest d80211 stack no longer provides any ethtool support. At the moment there is no quick replacement possible for the ethtool features (debugfs is under investigation, but requires more work).

Signed-off-by Ivo van Doorn <[email protected]>

---

drivers/net/wireless/d80211/rt2x00/rt2400pci.c +0 -77
diff -rU3 wireless-dev-base/drivers/net/wireless/d80211/rt2x00/rt2400pci.c wireless-dev-ethtool/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
@@ -35,7 +35,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/wireless.h>
-#include <linux/ethtool.h>
 
 #include <net/iw_handler.h>
 #include <net/d80211.h>
@@ -343,81 +342,6 @@
 }
 
 /*
- * Ethtool handlers.
- */
-static void rt2400pci_get_drvinfo(struct net_device *net_dev,
-	struct ethtool_drvinfo *drvinfo)
-{
-	struct rt2x00_dev *rt2x00dev = ieee80211_dev_hw_data(net_dev);
-
-	strcpy(drvinfo->driver, DRV_NAME);
-	strcpy(drvinfo->version, DRV_VERSION);
-	strcpy(drvinfo->fw_version, "N/A");
-	strcpy(drvinfo->bus_info, pci_name(rt2x00dev_pci(rt2x00dev)));
-	drvinfo->eedump_len = EEPROM_SIZE;
-	drvinfo->regdump_len = CSR_REG_SIZE;
-}
-
-static int rt2400pci_get_regs_len(struct net_device *net_dev)
-{
-	return CSR_REG_SIZE;
-}
-
-static void rt2400pci_get_regs(struct net_device *net_dev,
-	struct ethtool_regs *regs, void *data)
-{
-	struct rt2x00_dev *rt2x00dev = ieee80211_dev_hw_data(net_dev);
-
-	rt2x00_register_multiread(rt2x00dev, CSR_REG_BASE, data, CSR_REG_SIZE);
-	regs->version = rt2x00_rev(&rt2x00dev->chip);
-	regs->len = CSR_REG_SIZE;
-}
-
-#ifdef CONFIG_RT2400PCI_DEBUG
-static u32 rt2400pci_get_msglevel(struct net_device *net_dev)
-{
-	return rt2x00_debug_level;
-}
-
-static void rt2400pci_set_msglevel(struct net_device *net_dev, u32 msg)
-{
-	rt2x00_debug_level = !!msg;
-}
-#endif /* CONFIG_RT2400PCI_DEBUG */
-
-static int rt2400pci_get_eeprom_len(struct net_device *net_dev)
-{
-	return EEPROM_SIZE;
-}
-
-static int rt2400pci_get_eeprom(struct net_device *net_dev,
-	struct ethtool_eeprom *eeprom, u8 *data)
-{
-	struct rt2x00_dev *rt2x00dev = ieee80211_dev_hw_data(net_dev);
-
-	eeprom->magic = 0xbad;
-
-	rt2x00_eeprom_multiread(rt2x00dev,
-		eeprom->offset / sizeof(u16), (void*)data, eeprom->len);
-
-	return 0;
-}
-
-static struct ethtool_ops rt2400pci_ethtool_ops = {
-	.get_drvinfo	= rt2400pci_get_drvinfo,
-	.get_regs_len	= rt2400pci_get_regs_len,
-	.get_regs	= rt2400pci_get_regs,
-#ifdef CONFIG_RT2400PCI_DEBUG
-	.get_msglevel	= rt2400pci_get_msglevel,
-	.set_msglevel	= rt2400pci_set_msglevel,
-#endif /* CONFIG_RT2400PCI_DEBUG */
-	.get_link	= ethtool_op_get_link,
-	.get_eeprom_len	= rt2400pci_get_eeprom_len,
-	.get_eeprom	= rt2400pci_get_eeprom,
-	.get_perm_addr	= ethtool_op_get_perm_addr,
-};
-
-/*
  * Configuration handlers.
  */
 static void rt2400pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
@@ -2861,7 +2785,6 @@
 		goto exit_disable_device;
 	}
 
-	SET_ETHTOOL_OPS(net_dev, &rt2400pci_ethtool_ops);
 	SET_NETDEV_DEV(net_dev, &pci_dev->dev);
 
 	pci_set_drvdata(pci_dev, net_dev);
drivers/net/wireless/d80211/rt2x00/rt2500pci.c +0 -77

95 lines not on this page · raw message

drivers/net/wireless/d80211/rt2x00/rt2500usb.c +0 -77

95 lines not on this page · raw message

drivers/net/wireless/d80211/rt2x00/rt61pci.c +0 -77

95 lines not on this page · raw message

drivers/net/wireless/d80211/rt2x00/rt73usb.c +0 -77

95 lines not on this page · raw message