Subject: Re: [PATCH 20/24] RT2x00: Use SET_NETDEV_DEV

From: Ivo van Doorn <[email-masked]>
Date: Wed, 26 Jul 2006 20:30:39 +0200

>>From Ivo van Doorn <[email-masked]>

Use SET_NETDEV_DEV to help userspace detect the wireless interfaces.

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

diff -rU3 wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2400pci.c wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
--- wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-07-26 10:41:21.000000000 +0200
+++ wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-07-26 10:46:52.000000000 +0200
@@ -2795,6 +2795,7 @@
 	}
 
 	SET_ETHTOOL_OPS(net_dev, &rt2400pci_ethtool_ops);
+	SET_NETDEV_DEV(net_dev, &pci_dev->dev);
 
 	pci_set_drvdata(pci_dev, net_dev);
 
diff -rU3 wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2500pci.c wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
--- wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-07-26 10:41:32.000000000 +0200
+++ wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-07-26 10:46:48.000000000 +0200
@@ -3066,6 +3066,7 @@
 	}
 
 	SET_ETHTOOL_OPS(net_dev, &rt2500pci_ethtool_ops);
+	SET_NETDEV_DEV(net_dev, &pci_dev->dev);
 
 	pci_set_drvdata(pci_dev, net_dev);
 
diff -rU3 wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2500usb.c wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
--- wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt2500usb.c	2006-07-26 10:42:02.000000000 +0200
+++ wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c	2006-07-26 10:46:32.000000000 +0200
@@ -2686,6 +2686,7 @@
 	}
 
 	SET_ETHTOOL_OPS(net_dev, &rt2500usb_ethtool_ops);
+	SET_NETDEV_DEV(net_dev, &usb_intf->dev);
 
 	usb_set_intfdata(usb_intf, net_dev);
 
diff -rU3 wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt61pci.c wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt61pci.c
--- wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt61pci.c	2006-07-26 10:41:48.000000000 +0200
+++ wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt61pci.c	2006-07-26 10:46:44.000000000 +0200
@@ -3634,6 +3634,7 @@
 	}
 
 	SET_ETHTOOL_OPS(net_dev, &rt61pci_ethtool_ops);
+	SET_NETDEV_DEV(net_dev, &pci_dev->dev);
 
 	pci_set_drvdata(pci_dev, net_dev);
 
diff -rU3 wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt73usb.c wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt73usb.c
--- wireless-dev-reset/drivers/net/wireless/d80211/rt2x00/rt73usb.c	2006-07-26 10:42:19.000000000 +0200
+++ wireless-dev-setnetdev/drivers/net/wireless/d80211/rt2x00/rt73usb.c	2006-07-26 10:46:22.000000000 +0200
@@ -3081,6 +3081,7 @@
 	}
 
 	SET_ETHTOOL_OPS(net_dev, &rt73usb_ethtool_ops);
+	SET_NETDEV_DEV(net_dev, &usb_intf->dev);
 
 	usb_set_intfdata(usb_intf, net_dev);