linux/drivers/net/wireless/hostap
Dave Hansen 0cd545d6ba [PATCH] hostap update
Create sysfs "device" files for hostap

I was writing some scripts to automatically build kismet source lines,
and I noticed that hostap devices don't have device files, unlike my
prism54 and ipw2200 cards:

$ ls -l /sys/class/net/eth0/device
/sys/class/net/eth0/device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0
$ ls -l /sys/class/net/wifi0
ls: /sys/class/net/wifi0/device: No such file or directory
$ ls -l /sys/class/net/wlan0
ls: /sys/class/net/wlan0/device: No such file or directory

The following (quite small) patch makes sure that both the wlan and wifi
net devices have that pointer to the bus device.

This way, I can do things like

        for i in /sys/class/net/*; do
                if ! [ -e $i/device/drive ]; then
                        continue;
                fi;
                driver=$(basename $(readlink $i/device/driver))
                case $driver in
                        hostap*)
                                echo -- hostap,$i,$i-$driver
                                break;
                        ipw2?00)
                                echo -- $driver,$i,$i-$driver
                                break;
                        prism54)
                                echo prism54g,$i
                esac
        done

Which should generate a working set of source lines for kismet no matter
what order I plug the cards in.

It might also be handy to have a link between the two net devices, but
that's a patch for another day.

That patch is against 2.6.13-rc1-mm1.

-- Dave

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-30 18:17:22 -04:00
..
hostap_80211_rx.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_80211_tx.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_80211.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_ap.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_ap.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_common.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_config.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt_ccmp.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt_tkip.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt_wep.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_crypt.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_cs.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_download.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_hw.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_info.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_ioctl.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_pci.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_plx.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap_proc.c Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap_wlan.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
hostap.c [PATCH] hostap update 2005-07-30 18:17:22 -04:00
hostap.h Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
Kconfig Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00
Makefile Add HostAP wireless driver. 2005-05-12 22:54:16 -04:00