Skip to content

Commit

Permalink
[PATCH] USB: zd1201: make sysfs device symlink
Browse files Browse the repository at this point in the history
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 <ntl@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Nathan Lynch authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent ff90651 commit a083dec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/net/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,8 @@ static int zd1201_probe(struct usb_interface *interface,
if (err)
goto err_net;

SET_NETDEV_DEV(zd->dev, &usb->dev);

err = register_netdev(zd->dev);
if (err)
goto err_net;
Expand Down

0 comments on commit a083dec

Please sign in to comment.