Date: Sun, 24 Feb 2002 08:46:19 +0900 (JST) From: FUJITA Kazutoshi <fujita@soum.co.jp> To: mitchy@er.ams.eng.osaka-u.ac.jp Cc: mobile@FreeBSD.ORG, brooks@one-eyed-alien.net Subject: Re: Linksys WMP11 support Message-ID: <20020224.084619.74696422.fujita@soum.co.jp> In-Reply-To: <20020206095856D.mitchy@er.ams.eng.osaka-u.ac.jp> References: <20020205133602.A6294@Odin.AC.HMC.Edu> <20020206095856D.mitchy@er.ams.eng.osaka-u.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
From: MITSUNAGA Noriaki <mitchy@er.ams.eng.osaka-u.ac.jp>
Subject: Re: Linksys WMP11 support
Date: Wed, 06 Feb 2002 09:58:56 +0900
Message-ID: <20020206095856D.mitchy@er.ams.eng.osaka-u.ac.jp>
> > I plan to commit the following patch to current shortly. It's support
> > for the Linksys WMP11 PCI wireless adaptor (it's actually a MiniPCI card
> > in a PCI-MiniPCI adaptor.) Please test/review.
>
> I tested on ThinkPad X22 and it worked without WEP. I did not try with
> WEP support.
I tried to use with 104bit WEP encryption, but it doesn't
work.
And I tried the same way as implementation in NetBSD,
but it also doesn't work.
After some trials, I found it works with following patch.
I don't know why it is required, but it seems work well
with both 40bit and 104bit WEP encryption.
Actually, I tried with -STABLE, but following is for -CURRENT.
I didn't test in -CURRENT, please test it in -CURRENT.
TIA.
Index: sys/dev/wi/if_wi.c
===================================================================
RCS file: /export/FreeBSD/cvsroot/src/sys/dev/wi/if_wi.c,v
retrieving revision 1.73
diff -c -r1.73 if_wi.c
*** sys/dev/wi/if_wi.c 12 Feb 2002 17:52:11 -0000 1.73
--- sys/dev/wi/if_wi.c 23 Feb 2002 23:25:33 -0000
***************
*** 1191,1203 ****
struct wi_ltv_str ws;
struct wi_ltv_keys *wk =
(struct wi_ltv_keys *)ltv;
for (i = 0; i < 4; i++) {
! ws.wi_len = 4;
ws.wi_type = WI_RID_P2_CRYPT_KEY0 + i;
- memcpy(ws.wi_str,
- &wk->wi_keys[i].wi_keydat, 5);
- ws.wi_str[5] = '\0';
error = wi_write_record(sc,
(struct wi_ltv_gen *)&ws);
if (error)
--- 1191,1220 ----
struct wi_ltv_str ws;
struct wi_ltv_keys *wk =
(struct wi_ltv_keys *)ltv;
+ u_int16_t tx_keylen = wk->wi_keys[sc->wi_tx_key].wi_keylen;
for (i = 0; i < 4; i++) {
! u_int16_t keylen = wk->wi_keys[i].wi_keylen;
! u_int8_t *keyp = wk->wi_keys[i].wi_keydat;
! memset(&ws, 0, sizeof(ws));
! if (sc->wi_bus_type == WI_BUS_PCI_NATIVE) { /* XXX : for Prism2.5 */
! if ((tx_keylen <= 5) && (keylen == 0)) {
! ws.wi_len = 4;
! memcpy(ws.wi_str, keyp, 5);
! ws.wi_str[5] = '\0';
! }
! else {
! ws.wi_len = 8;
! memcpy(ws.wi_str, keyp, 13);
! ws.wi_str[13] = '\0';
! }
! }
! else {
! ws.wi_len = 4;
! memcpy(ws.wi_str, keyp, 5);
! ws.wi_str[5] = '\0';
! }
ws.wi_type = WI_RID_P2_CRYPT_KEY0 + i;
error = wi_write_record(sc,
(struct wi_ltv_gen *)&ws);
if (error)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020224.084619.74696422.fujita>
