From owner-freebsd-current@FreeBSD.ORG Sun Dec 12 01:56:38 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C22C916A4CE for ; Sun, 12 Dec 2004 01:56:37 +0000 (GMT) Received: from pne-smtpout1-sn2.hy.skanova.net (pne-smtpout1-sn2.hy.skanova.net [81.228.8.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A5E143D39 for ; Sun, 12 Dec 2004 01:56:37 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: from [127.0.0.1] (81.225.14.129) by pne-smtpout1-sn2.hy.skanova.net (7.1.026.6) (authenticated as u86211448) id 4199C6960000C0E1; Sun, 12 Dec 2004 02:56:25 +0100 Message-ID: <41BBA53B.9070006@telia.com> Date: Sun, 12 Dec 2004 02:56:11 +0100 From: Pawel Worach User-Agent: Mozilla Thunderbird 1.0 (X11/20041210) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Leffler References: <200412081109.43840.sam@errno.com> <20041209.100008.21874313.rushani@bl.mmtr.or.jp> <200412081744.27539.sam@errno.com> <20041209.225041.63112571.rushani@bl.mmtr.or.jp> <41B9454F.9080903@errno.com> <41BA4B22.5070403@telia.com> <41BB8550.30208@errno.com> In-Reply-To: <41BB8550.30208@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: WEP does not work? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2004 01:56:39 -0000 Sam Leffler wrote: > Pawel Worach wrote: > >> Sam Leffler wrote: >> >>> I'll try to look tomorrow. I have a patch for fixing wep with ndis >>> that I need to review and this is probably the same thing. >> >> >> >> I have the same problem on a ThinkPad T41. > > > What problem? Are you saying that wep does not work with the ath > driver? I communicated with a couple of people that have setup static > key'd wep fine so I'm not sure what to think. I've still had no time to > try it myself (it was tested a while back but not immediatel before the > commit). One thing I found from talking to folks is I did not make it > clear you must have the wlan_wep module configured in the kernel or > available for loading by the wlan layer when you configure a wep key. > But if that happens then ifconfig will complain; things won't silently > fail. I use all of the wlan and ath driver stuff as modules. if_ath.ko, ath_hal.ko, wlan.ko, ath_rate.ko and wlan_wep.ko Both makefiles for sys/modules/ath_rate_amrr and sys/modules/ath_rate_onoe build the same module "KMOD=ath_rate" is that correct? The module installed by 'make installkernel' seems to be the "onoe" one (last in modules/Makefile). > "breaks" how? Please provide the exact steps you take to demonstrate > the problem. I enabled 802.11 crypto debug and did the procedure again. # ifconfig ath0 wepmode on wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX # ifconfig ath0 ath0: flags=8843 mtu 1500 inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 ether 00:05:4e:4b:76:13 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: associated ssid cookie channel 7 bssid fa:02:57:01:13:00 authmode OPEN privacy ON wepkey 1:104-bit txpowmax 34 protmode CTS wme bintval 100 (just to demonstrate my last paragraph, the disappearing wepkey) # ifconfig ath0 wepmode on # ifconfig ath0 ath0: flags=8843 mtu 1500 inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 ether 00:05:4e:4b:76:13 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: no carrier ssid cookie authmode OPEN privacy ON txpowmax 0 wme Now it's gone. So wepmode and wepkeys need to be configured in one shot? After this kernel says: "[00:40:96:42:0d:9c] key (id 0) is invalid" Anyway, back to the correctly configured wepkey. On sending traffic i see "[00:40:96:42:0d:9c] no default transmit key" so i figured that the "deftxkey" which is "UNDEF" needs to be set to "1" (that parameter is only displayed with 'ifconfig -v') but it seems like that parameter is not settable. 'ifconfig ath0 deftxkey 1' does not work it just sits there for some time then says "ifconfig: deftxkey: bad value " taking deftxkey as an inet address? 'ifconfig ath0' still looks the same after this. # ifconfig ath0 ath0: flags=8843 mtu 1500 inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 ether 00:05:4e:4b:76:13 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: associated ssid cookie channel 7 bssid fa:02:57:01:13:00 authmode OPEN privacy ON wepkey 1:104-bit txpowmax 34 protmode CTS wme bintval 100 >> ath0: device timeout >> ath0: device timeout >> ath0: device timeout >> > > You should not get these. Please go to /usr/src/tools/tools/ath and > build athstats. Run it w/o arguments and provide the output. Please > identify what your configuration was when these occurred (e.g. adhoc > mode w/ wep?). > > After running for some time without wep now I noticed that I get the "device timeout" messages quite often durning normal usage. So with or without wep seems unrelated to the timeout events, I am only able to test this in ad-hoc mode for now since the AP requires wep. # ./athstats 761 watchdog timeouts 3 hardware error interrupts 780 tx management frames 17219 tx frames discarded prior to association 131 tx failed 'cuz too many retries 2202 long on-chip tx retries 246 tx frames with no ack marked 10 tx frames with an alternate rate 80209 rx failed 'cuz of bad CRC 194932 rx failed 'cuz of PHY err 26040 OFDM timing 168736 CCK timing 156 CCK restart 778 beacons transmitted 2999 periodic calibrations 90068 rate control checks 1 rate control raised xmit rate 35 rate control dropped xmit rate rssi of last ack: 56 1298 switched default/rx antenna Antenna profile: [1] tx 20937 rx 103154 [2] tx 16815 rx 398531 Is the result of the second command expected? # ./80211debug +crypto net.wlan.0.debug: 0x0 => 0x10000000 # ./athdebug +crypto dev.ath.0.debug: 0x0 # sysctl dev.ath.0.debug dev.ath.0.debug: 0 -- Pawel