Re: 80211 patch1
On 4/16/06, Sepherosa Ziehau [EMAIL PROTECTED] wrote: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida Please try following patch: http://leaf.dragonflybsd.org/~sephe/802_11.diff1 I have fixed some nits in above patch, please try: http://leaf.dragonflybsd.org/~sephe/802_11.diff2 For potential testers that equips Atheros card, please try: http://leaf.dragonflybsd.org/~sephe/ath/ Best Regards, sephe NOTE: 1) This patch is against src/ *not* against src/sys/ 2) Please don't forget -p0 in the `patch' command 3) Please compile kernel/modules with INVARANTS 4) There is a noticable change in ifconfig(8): if you use WEP, 'weptxkey' option *must* be supplied now This patch is quite gross and will be rearranged at a later time. In this stage, I just want to assert that 80211 layer in DragonFly needs *no* extra serialize/mutex mechanism due to the nature of the NIC's serialization framework awi(4) is unhooked both in GENERIC and LINT temporarily If you have an awi(4) and can help testing, please let me know, thanks For people that have ral(4) and want to give it a try, please take a look at: http://leaf.dragonflybsd.org/~sephe/ral I have tested acx(4), wi(4) and ral(4). The rest of the drivers compile cleanly, please test them, thanks WPA's functionality is tested with an ral(4). I don't have an AP that supports WPA2, so if you have one please test it, thanks WPA is supported for iwi(4) and ral(4) currently, `wpa_supplicant' and a brief tutorial (written by Sam Leffler) is at: http://leaf.dragonflybsd.org/~sephe/wpa NOTE: you can build `wpa_supplicant' in wpa_supp/ *not* in wpa_supplicant/ Thank Sam Leffler and many other people for their great work Thank Andrew Atrens and Adrian Michael Nida for submitting the patch -- Live Free or Die -- Live Free or Die
Re: 80211 patch1
Am Montag, 17. April 2006 03:37 schrieb Sepherosa Ziehau: snip My fault, missing a crit_enter(), please change sys/dev/netif/iwi/if_iwi.c iwi_load_firmware() near these lines: CSR_WRITE_4(sc, IWI_CSR_CTL, tmp | IWI_CTL_ALLOW_STANDBY); /* wait at most one second for firmware initialization to complete */ crit_enter(); = add me tsleep_interlock(IWI_FW_INITIALIZED(sc)); lwkt_serialize_exit(ifp-if_serializer); And give it a try again, thanks Best Regards, sephe Sepherosa, how do I build the wpa_supplicant? I've downloaded http://leaf.dragonflybsd.org/~sephe/wpa/wpa_supp/ and http://leaf.dragonflybsd.org/~sephe/wpa/wpa_supplicant/ under an common directory. Then, I've cd'd into wpa_supp and did a make. That's the ouput: SchlesisNB# make Warning: Object directory not changed from original /home/thomas/Downloads/WPA/wpa_supp cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/config.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/eloop.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/common.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/md5.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/rc4.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/sha1.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/aes_wrap.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/wpa_supplicant.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/events.c cc -O -pipe -mtune=pentiumpro -I/home/thomas/Downloads/WPA/wpa_supp -I/home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant -DCONFIG_DRIVER_BSD -DCONFIG_DRIVER_NDIS -DCONFIG_CTRL_IFACE -g -DCONFIG_BACKEND_FILE -DIEEE8021X_EAPOL -DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TTLS -DEAP_MD5-c /home/thomas/Downloads/WPA/wpa_supp/../wpa_supplicant/wpa.c cc -O -pipe
Re: 80211 patch1
On 4/17/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: Sepherosa, thanks to Sascha Wildner I was able to build wpa_supplicant now (I did a make include at /usr/src). There's a minor issue left: A make install gives me this output: SchlesisNB# make install install -s -o root -g wheel -m 555 wpa_supplicant usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... *** Error code 64 Stop in /home/thomas/Downloads/WPA/wpa_supp. It's just missing a destination directory. Do the line by hand but with /usr/sbin (which I *guess* is where it should go). Since the kit probably also has an rc script and config file (I don't know, haven't read the documentation), install those too. -- Dmitri Nikulin
Re: 80211 patch1
On 4/17/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: Am Montag, 17. April 2006 03:37 schrieb Sepherosa Ziehau: snip My fault, missing a crit_enter(), please change sys/dev/netif/iwi/if_iwi.c iwi_load_firmware() near these lines: CSR_WRITE_4(sc, IWI_CSR_CTL, tmp | IWI_CTL_ALLOW_STANDBY); /* wait at most one second for firmware initialization to complete */ crit_enter(); = add me tsleep_interlock(IWI_FW_INITIALIZED(sc)); lwkt_serialize_exit(ifp-if_serializer); And give it a try again, thanks Best Regards, sephe Sepherosa, how do I build the wpa_supplicant? I've downloaded http://leaf.dragonflybsd.org/~sephe/wpa/wpa_supp/ and http://leaf.dragonflybsd.org/~sephe/wpa/wpa_supplicant/ under an common directory. Then, I've cd'd into wpa_supp and did a make. That's the ouput: driver_freebsd.c driver_freebsd.c: In function `wpa_driver_bsd_get_bssid': driver_freebsd.c:160: error: `IEEE80211_IOC_BSSID' undeclared (first use in this function) driver_freebsd.c:160: error: (Each undeclared identifier is reported only once driver_freebsd.c:160: error: for each function it appears in.) driver_freebsd.c: In function `wpa_driver_bsd_set_wpa_ie': driver_freebsd.c:197: error: `IEEE80211_IOC_OPTIE' undeclared (first use in this function) Sorry, my fault again. I forget to point out that after patching the system, you will need to buildworld and installworld. After that wpa_supplicant can be built at any directory as you wish. And you can just run wpa_supplicant from the building directory :-) BTW, does iwi(4)'s WEP work well? Best Regards, sephe -- Live Free or Die
Re: 80211 patch1
Am Sonntag, 16. April 2006 13:00 schrieb Sepherosa Ziehau: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida snip Sepherosa, I've got working WPA finally on my ipw220. Thank you *very* much for your work and your support! There's left only a 'cosmetic' issue: When I use no encryption (no WEP, no WPA), I use this successfully to establish a network connection: /etc/rc.conf: ifconfig_iwi0=inet 192.168.2.101 netmask 255.255.255.0 ssid SchlesisFunknetz wepmode off and /etc/wpa_supplicant.conf: iwicontrol iwi0 -d /usr/libdata/iwi_firmware I've modified this files to work with WPA, too, but it doesn't work: I set the IP-address in my /etc/rc.conf: ifconfig_iwi0=inet 192.168.2.101 netmask 255.255.255.0 The WPA thingy should be automagically enabled by a modified /etc/start_if.iwi0: ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log route add default 192.168.2.1 On boot time, the notebooks seems to hang on /etc/start_if.iwi0, until I do a Ctrl-C. Do you have any idea, why the /etc/start_if.iwi0 script does not work on boot time? Thomas
Re: 80211 patch1
On 4/17/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: Am Sonntag, 16. April 2006 13:00 schrieb Sepherosa Ziehau: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida snip Sepherosa, I've got working WPA finally on my ipw220. Thank you *very* much for your work and your support! There's left only a 'cosmetic' issue: When I use no encryption (no WEP, no WPA), I use this successfully to establish a network connection: /etc/rc.conf: ifconfig_iwi0=inet 192.168.2.101 netmask 255.255.255.0 ssid SchlesisFunknetz wepmode off and /etc/wpa_supplicant.conf: iwicontrol iwi0 -d /usr/libdata/iwi_firmware I've modified this files to work with WPA, too, but it doesn't work: I set the IP-address in my /etc/rc.conf: ifconfig_iwi0=inet 192.168.2.101 netmask 255.255.255.0 The WPA thingy should be automagically enabled by a modified /etc/start_if.iwi0: You seem to forget to load firmware before bring iwi(4) up. Did you have something like Please load firmware in your dmesg or /var/log/messages? ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log route add default 192.168.2.1 Cheers, sephe -- Live Free or Die
Re: 80211 patch1
Am Montag, 17. April 2006 15:27 schrieb Sepherosa Ziehau: snip You seem to forget to load firmware before bring iwi(4) up. Did you have something like Please load firmware in your dmesg or /var/log/messages? ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log route add default 192.168.2.1 Of, I've accidently snipped the first line of the file. That's the complete version: iwicontrol iwi0 -d /usr/libdata/iwi_firmware ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log route add default 192.168.2.1 Thomas
Re: 80211 patch1
On 4/17/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: iwicontrol iwi0 -d /usr/libdata/iwi_firmware ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log use wpa_supplicant -B to put it into background, nohup is not necessary route add default 192.168.2.1 This is not correct, put a `defaultrouter=192.168.2.1' in /etc/rc.conf Best Regards, sephe -- Live Free or Die
Re: 80211 patch1
Am Montag, 17. April 2006 16:02 schrieb Sepherosa Ziehau: On 4/17/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: iwicontrol iwi0 -d /usr/libdata/iwi_firmware ifconfig iwi0 up nohup wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf /var/log/wpa.log use wpa_supplicant -B to put it into background, nohup is not necessary route add default 192.168.2.1 This is not correct, put a `defaultrouter=192.168.2.1' in /etc/rc.conf Best Regards, sephe -- Live Free or Die Yeah, now my notebook is connecting automagically to my WPA-protected router on boot. That's the way it should be :-) Thanks again for your patch and your help! Thomas
Re: 80211 patch1
On 16.04.2006, at 17:45, Thomas Schlesinger wrote: how do I compile kernel/modules with INVARANTS? cd /usr/src echo options INVARIANTS /sys/i386/conf/$YOUR_KERNEL_CONFIG make quickkernel # or do we need buildkernel then? cheers simon -- Serve - BSD +++ RENT this banner advert +++ASCII Ribbon /\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ PGP.sig Description: This is a digitally signed message part
Re: 80211 patch1
Am Sonntag, 16. April 2006 20:24 schrieb Simon 'corecode' Schubert: On 16.04.2006, at 17:45, Thomas Schlesinger wrote: how do I compile kernel/modules with INVARANTS? cd /usr/src echo options INVARIANTS /sys/i386/conf/$YOUR_KERNEL_CONFIG make quickkernel# or do we need buildkernel then? cheers simon Simon, thanks. I've looked for INVARANTS, as Sepherosa wrote. Thomas
Re: 80211 patch1
Am Sonntag, 16. April 2006 13:00 schrieb Sepherosa Ziehau: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida Please try following patch: http://leaf.dragonflybsd.org/~sephe/802_11.diff1 Sepherosa, I want to give you a first feedback. I've tried your patch on my notebook with ipw2200 adapter. When I try to configure my adapter or try to bring it up with ifconfig iwi0 up, I get a panic: panic: td_pri i/would-go negative! 0xd6796e00 -22 iwi_load_firmware is mentioned in the trace, so it may not work with the ipw2200 firmware, at least with version 2.3. Thomas
Re: 80211 patch1
On 4/16/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: Am Sonntag, 16. April 2006 13:00 schrieb Sepherosa Ziehau: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida Please try following patch: http://leaf.dragonflybsd.org/~sephe/802_11.diff1 Sepherosa, I want to give you a first feedback. I've tried your patch on my notebook with ipw2200 adapter. When I try to configure my adapter or try to bring it up with ifconfig iwi0 up, I get a panic: panic: td_pri i/would-go negative! 0xd6796e00 -22 iwi_load_firmware is mentioned in the trace, so it may not work with the ipw2200 firmware, at least with version 2.3. Hi, Can you give me the backtrace or a coredump, that will be helpful Thanks Best Regards, sephe -- Live Free or Die
Re: 80211 patch1
On 4/16/06, Thomas Schlesinger [EMAIL PROTECTED] wrote: Am Sonntag, 16. April 2006 13:00 schrieb Sepherosa Ziehau: Hi all, I have managed to port fbsd6's net80211, based on patch sumbitted by Andrew Atrens and Adrian Michael Nida Please try following patch: http://leaf.dragonflybsd.org/~sephe/802_11.diff1 Sepherosa, I want to give you a first feedback. I've tried your patch on my notebook with ipw2200 adapter. When I try to configure my adapter or try to bring it up with ifconfig iwi0 up, I get a panic: panic: td_pri i/would-go negative! 0xd6796e00 -22 iwi_load_firmware is mentioned in the trace, so it may not work with the ipw2200 firmware, at least with version 2.3. Thomas My fault, missing a crit_enter(), please change sys/dev/netif/iwi/if_iwi.c iwi_load_firmware() near these lines: CSR_WRITE_4(sc, IWI_CSR_CTL, tmp | IWI_CTL_ALLOW_STANDBY); /* wait at most one second for firmware initialization to complete */ crit_enter(); = add me tsleep_interlock(IWI_FW_INITIALIZED(sc)); lwkt_serialize_exit(ifp-if_serializer); And give it a try again, thanks Best Regards, sephe -- Live Free or Die