2013-04-03 13:43:01

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim driver attribute

On Wed, 2013-04-03 at 13:38 +0000, Martin Pitt wrote:
> Hello John, hello Johannes,
>
> first, many thanks for this great mac80211_hwsim module! 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/iwlwifi
>
> But /sys/class/net/wlan1/device/ only has the default "uevent" and
> subsystem link.
>
> Other drivers call something like pci_register_driver() or
> usb_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