Subject: Re: kern/15498: Intersil Prism2.5 Wireless Lan cannot use 104-bit
To: None <netbsd-bugs@netbsd.org>
From: URA Hiroshi <ura@hiru.aoba.yokohama.jp>
List: netbsd-bugs
Date: 02/25/2002 23:13:38
>> Wed, 6 Feb 2002 02:53:53 +0900 (JST), ura@hiru.aoba.yokohama.jp said:
> ThinkPad T23 have internal wireless lan using Intersil Prism2.5 chip.
> The dmesg says:
> wi0 at pci2 dev 2 function 0: Intersil Prism2.5 Wireless Lan
> wi0: interrupting at irq 11
> wi0: 802.11 address 00:20:e0:89:18:a4
> wi0: using RF:PRISM2.5 MAC:ISL3874A(PCI), Firmware: 1.3 variant 3
>
> The wi without WEP and wi with 40bit-WEP worked fine. But when I
> I tried to use wi with 104-bit WEP in the 104bit-WEP environment,
> I found that it could not join to the wireless network.
FUJITA Kazutoshi-san <fujita@soum.co.jp> tried to work all the wi
with no-WEP, 40bit-WEP and 104bit-WEP on FreeBSD-STABLE and finally
found.
This following patch is inspired by his code, but I test 104bit-WEP only.
Index: wi.c
===================================================================
RCS file: /cvsroot/netbsd/syssrc/sys/dev/ic/wi.c,v
retrieving revision 1.42
diff -u -u -r1.42 wi.c
--- wi.c 2002/02/18 14:45:56 1.42
+++ wi.c 2002/02/23 11:30:23
@@ -948,9 +948,12 @@
int error;
struct wi_ltv_str ws;
struct wi_ltv_keys *wk = (struct wi_ltv_keys *)ltv;
+ int tx_key_len = wk->wi_keys[sc->wi_tx_key].wi_keylen;
+
for (i = 0; i < 4; i++) {
memset(&ws, 0, sizeof(ws));
- if(wk->wi_keys[i].wi_keylen <= 5) {
+ if ((tx_key_len <= 5) &&
+ (wk->wi_keys[i].wi_keylen <= 5)) {
/* 5 Octets WEP Keys */
ws.wi_len = 4;
memcpy(ws.wi_str, &wk->wi_keys[i].wi_keydat, 5);
--
ura