[PATCH] USB: zd1201: make sysfs device symlink

Noticed that my zd1201 adapter isn't "seen" by hal and NetworkManager.
The problem seems to be that unlike other network device drivers I
checked, zd1201 does not do a SET_NETDEV_DEV(), which makes it so a
"device" symlink is created under /sys/class/net/wlan0.

With the following patch the device symlink shows up, and now I am
happily using NetworkManager to control the adapter:

$ ls -l /sys/class/net/wlan0
total 0
-r--r--r--  1 root root 4096 Dec 18 13:42 address
-r--r--r--  1 root root 4096 Dec 18 13:42 addr_len
-r--r--r--  1 root root 4096 Dec 18 13:42 broadcast
-r--r--r--  1 root root 4096 Dec 18 13:42 carrier
lrwxrwxrwx  1 root root    0 Dec 18 13:42 device -> 
../../../devices/pci0001:10/0001:10:1b.1/usb4/4-1
-r--r--r--  1 root root 4096 Dec 18 13:42 features

Signed-off-by: Nathan Lynch <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
commit a083dec0ed537a75fbe8f2f83d198e9e672240d8
tree 8d214715bf0612a18103cf1169976375db95f631
parent ff90651883093576de2d60bebaae39b0dd2e62f6
author Nathan Lynch <[EMAIL PROTECTED]> Sun, 18 Dec 2005 23:41:38 -0600
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Wed, 04 Jan 2006 13:51:44 -0800

 drivers/usb/net/zd1201.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
index 2af21a6..f3a8e28 100644
--- a/drivers/usb/net/zd1201.c
+++ b/drivers/usb/net/zd1201.c
@@ -1829,6 +1829,8 @@ static int zd1201_probe(struct usb_inter
        if (err)
                goto err_net;
 
+       SET_NETDEV_DEV(zd->dev, &usb->dev);
+
        err = register_netdev(zd->dev);
        if (err)
                goto err_net;



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to