blino's website

Free software developer and more

Some wireless cards can't get properly detected unless some action is done on the device. Their wireless drivers don't always support the SIOCGIWNAME ioctl, making tricky to detect if a device supports wireless.

sysfs can help to detect if a card support wireless, because for all XXX interfaces supporting the get_wireless_stats() function, a /sys/class/net/XXX/wireless folder exists.

For example, Ralink (rt2x00) devices need to be up to support this ioctl. This has been workarounded in drakconnect for 2005 LE by bringing up network devices for which this sysfs path exists.

For wlan-ng (prism2_* modules), this is even trickier, since they need some special tweaks issued with the wlanctl-ng command. That's why drakconnect didn't recognize wlan-ng cards if the prism2-utils package wasn't installed.

/proc/net/p80211/*/wlandev could be used to detect wlan-ng cards, but this would add another uneeded detection trick, which can be replaced by the sysfs detection method (works only for 2.6 kernels though).

After 2005 LE, it would be nice to use sysfs as fallback to detect wireless interfaces, so that wlan-ng cards can work out-of-the-box and Ralink specific tricks can be removed.



Comments are closed for this story.

Trackbacks are closed for this story.

blosxom Optimised for standards.
Olivier Blin (2005)