(copying some d80211-experienced people now too) Ok, thanks for the check. Updated patch attached since rt61pci.c and rt73usb.c also need this.
Has been added already to the source :)
Can you run "tree /sys", tar up and compress that output, and send it to me? I'd like to see how the d80211 devices present themselves in sysfs.
As attached
For _each_ actual network interface (as shown with iwconfig or ifconfig -a), you'll need an entry in /sys/class/net/<device name> that contains a "device" link, like so: | |-- net | | |-- eth0 | | | |-- addr_len | | | |-- address | | | |-- broadcast | | | |-- carrier| | | |-- device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0If your interface doesn't provide the device link (which is what SET_NETDEV_DEV does for you), then HAL and NetworkManager will have no idea which physical device that interface maps to, which means no information on what type of device it is, no information on what driver it uses, and no information about what its parent is.
The device link is there, as in the attachement
There's a lot of alloc_netdevice() calls in rt2x00's d80211; and there are no SET_NETDEV_DEV calls at all. Obviously the d80211 layer shouldn't need to know what bus type (pci, usb, etc) the net device is, but _something_ needs to set up the sysfs links for each d80211 station interface as well, if they show up in sysfs in /sys/class/net/xxx.
No SET_NETDEV_DEV calls in dscape as far as I know, just in the rt2x00 modified version that is available with the driver
So, Jouni/Michael/Jiri; for d80211, how should SET_NETDEV_DEV get called to assign each 'struct net_device' that d80211 creates with the appropriate 'struct device' item so that the right sysfs links show up? Ideally, whenever d80211 does an alloc_netdevice() call, it should soon thereafter call SET_NETDEV_DEV. Maybe we need to update HAL for its view of the world, but at a minimum, we need to be able to map each network interface device shown in sysfs to the appropriate hardware device which it uses underneath. (Michael, Jiri: I notice that bcm43xx+d80211 has no SET_NETDEV_DEV call either, which should likely go in bcm43xx_init_one()... is that no longer needed with d80211 or something? We went through a lot of trouble to get that added to all the drivers, including PCMCIA ones, and now perhaps we have to add it all back in d80211 drivers?) Cheers, Dan
The changes made by IvD on the rt2x00 project was to add SET_NETDEV_DEV(ndev, dev->class_dev.dev); in the ieee80211_if_add function in ieee80211_iface.c, after ndev->flags = dev->flags & IFF_MULTICAST; and in the ieee80211_if_add_mgmt function after ndev->mem_end = dev->mem_end; For the record, the new device settings in the hal-device dump is 1: udi = '/org/freedesktop/Hal/devices/net_00_0d_f0_17_33_ba' info.udi = '/org/freedesktop/Hal/devices/net_00_0d_f0_17_33_ba' (string) linux.subsystem = 'net' (string) linux.hotplug_type = 2 (0x2) (int) net.80203.mac_address = 59862627258 (0xdf01733ba) (uint64) info.product = 'Networking Interface' (string) net.interface_up = false (bool) net.arp_proto_hw_id = 1 (0x1) (int) net.linux.ifindex = 8 (0x8) (int) net.address = '00:0d:f0:17:33:ba' (string) net.interface = 'wlan0' (string)net.physical_device = '/org/freedesktop/Hal/devices/pci_1814_201' (string)
info.capabilities = { 'net', 'net.80203' } (string list) info.category = 'net.80203' (string) info.parent = '/org/freedesktop/Hal/devices/pci_1814_201' (string) linux.sysfs_path = '/sys/class/net/wlan0' (string)Which is strange: it's showing up specifially as 'net.80203', instead of the generic 'net'
Attachment:
treedump.tar
Description: Unix tar archive