wireless device recognition

Danny Kukawka danny.kukawka at web.de
Sat Mar 3 08:53:43 PST 2007


On Samstag, 3. März 2007, Johannes Berg wrote:
> Additionally, because the /proc/net/wireless file depends on wireless
> extensions and cannot be cleanly supported by cfg80211, I intend to send
> a feature removal schedule patch for it real soon now. This means that
> in whatever timeframe I put into the feature removal schedule (not
> decided yet) hal will need to be updated to not rely on
> /proc/net/wireless exclusively. Luckily, the /sys/class/net/*/wireless
> directory has been around since at least 2.6.16.

HAL don't use the proc interface to detect wireless since several months:

commit 5d11ae01e6ea1b2adceb1fed20ce4288d43a2748
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Sep 12 00:25:11 2006 +0200

    change detection of wireless, add net.irda and net.80211control

    Changed the detection of wireless network devices. The currently used
    proc file is/become IIRC deprecated. I change the detection to check
    for /sys/class/net/*/wireless (which was already in the code but commented
    out).

    I added also some code and spec information for IrDA net devices (net.irda)
    and ARPHRD_IEEE80211* (wireless lan control-) devices (net.80211control).

 
> In any case, I propose something like below patch to hal (against CVS)

We don't use CVS anymore. For actual code take a look at the hal git repo:
 http://gitweb.freedesktop.org/?p=hal.git;a=tree

> which first stats the wireless entry in sysfs (that's cheaper than first
> reading through /proc/net/wireless and new systems should always have
> the sysfs entry). The patch can be made better but I wanted to
> illustrate the point with as few lines of code changed as possible.

This is what HAL already do (check for wireless and wiphy in sysfs). 
Let me know if there are more changes needed or if you know what new info
exactly the kernel provide via sysfs.

Danny  


More information about the hal mailing list