mac80211_hwsim driver attribute
Quoted 29 lines · Martin Pitt
Hello John, hello Johannes,
first, many thanks for this great
mac80211_hwsimmodule! I am currently working on automatic test cases for the Linux network stack (wpa_supplicant, dhclient, NetworkManager, etc.), and this is of great help.One issue is that NetworkManager does not get along with these simulated interfaces:
NetworkManager[24027]: <warn>
/sys/devices/virtual/mac80211_hwsim/hwsim0/net/wlan1: couldn't determine device driver; ignoring...It calls
udev_device_get_driver()on the net device (wlan0) (and failing that, on its parent), but that fails because hwsim doesn't have a driver attribute. My real intel wifi does:lrwxrwxrwx 1 root root 0 Apr 3 06:19
/sys/class/net/wlan0/device/driver-> ../../../../bus/pci/drivers/iwlwifiBut
/sys/class/net/wlan1/device/only has the default "uevent" and subsystem link.Other drivers call something like
pci_register_driver()orusb_register(), I figure those will register the driver symlink in sysfs? But admittedly I'm a kernel n00b, so I'd appreciate a hint where to look for.Thank you in advance!
Martin
Martin,
Quoted 4 lines
/sys/class/net/wlan0/device/driver-> ../../../../bus/pci/drivers/iwlwifiBut
/sys/class/net/wlan1/device/only has the default "uevent" and subsystem link.
I suspect this is because there's no real "device", and therefore no real driver.
We do play with device_create() in hwsim, which was likely intended to address something like this, but I have no idea how this should really work.
johannes
Hello Johannes,
Johannes Berg [2013-04-03 15:44 +0200]:
Quoted 9 lines
Martin,
Quoted 4 lines
/sys/class/net/wlan0/device/driver-> ../../../../bus/pci/drivers/iwlwifiBut
/sys/class/net/wlan1/device/only has the default "uevent" and subsystem link.I suspect this is because there's no real "device", and therefore no real driver.
There are real devices (wlan0, wlan1, etc.); there is also a real driver (mac80211_hwsim), the only thing that's a bit tricky is that there is no real bus. My impression is that such devices might belong to /sys/bus/platform/ ?
Quoted 3 lines
We do play with
device_create()in hwsim, which was likely intended to address something like this, but I have no idea how this should really work.
I figured it out, it works well now. I'll send the patch to the lists/maintainers, and CC: Dan and you.
Thanks,
Martin
Signature · 2 lines
Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)