Subject: kern/36719: Several problems with wpi(4) and WEP or WPA
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <he@uninett.no>
List: netbsd-bugs
Date: 08/01/2007 19:25:00
>Number:         36719
>Category:       kern
>Synopsis:       Several problems with wpi(4) and WEP or WPA
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 01 19:25:00 +0000 2007
>Originator:     Havard Eidnes
>Release:        NetBSD 4.99.26
>Organization:
	I Try...
>Environment:
System: NetBSD xxx.urc.uninett.no 4.99.26 NetBSD 4.99.26 (GENERIC) #29: Wed Aug  1 11:14:15 CEST 2007 he@ctd.urc.uninett.no:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	I am trying to make use of an Intel 3945 wireless card
	on a Lenovo T60 laptop.

	I am observing various problems related to this.

	The same problems appear with NetBSD 4.99.23 with wireless
	firmware version 2.14.3 and NetBSD 4.99.26 with wireless
	firmware version 2.14.4.

	1) If you have the interface up without any nwid or
	   nwkey configured, and subsequently configure an nwid
	   and nwkey for use with WEP, you get "wpi0: fatal firmware error",
	   usually followed by "wpi0: timeout waiting for adapter
	   to initialize" and possibly "wpi0: could not load
	   firmware".

	   Usually the workaround is to down the interface (if
	   it isn't already at this point), and "up" it afterwards.

	   This sypmtom also occurs if you change nwid + nwkey (we
	   have a couple of possible local combinations).

	2) Attempts at associating with WPA using wpa_supplicant
	   may result in an association, but no address is given in
	   response to a dhclient request.  Sniffing the traffic
	   received on wpi0 reveals that all the unicast
	   traffic appears scrambled, as none of the frames appear
	   as IP packets to tcpdump, but instead "sap aa ui/C frames
	   with relatively short length (39 - 47).  This sounds like
	   a mis-configured key in the wireless driver.

	   I am pretty certain that this is not a defect
	   of our local wireless infrastructure; it works fine
	   with my other laptop which has an Atheros wireless
	   card.

	3) The ability to successfully associate using WEP appears
	   to be somewhat spurious.  Sometimes it works, sometimes
	   it does not.  Sometimes rebooting the kernel may restore
	   the driver to working order, even if it has basically
	   only run ifconfig and dhclient up to then.

	When WEP appears to be troublesome, it is also impossible
	to even get an association using WPA.

	So, usage of the Intel 3945 wireless cards looks pretty
	fragile at this point, I'm sad to say.

>How-To-Repeat:
	Try to use an Intel 3945 wireless card with currentish
	versions of NetBSD with either WEP or WPA, and watch it
	just barely work in 4.99.23 and not at all with 4.99.26.

>Fix:
	Sorry, I have absolutely no idea.
	Hints for digging out more useful information for
	further diagnosis is however gratefully accepted.