From owner-freebsd-mobile Sat Feb 23 15:46:31 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from gate.soum.co.jp (gate.soum.co.jp [202.221.40.2]) by hub.freebsd.org (Postfix) with ESMTP id 14ED837B400 for ; Sat, 23 Feb 2002 15:46:24 -0800 (PST) Received: from force.soum.co.jp (force.soum.co.jp [IPv6:3ffe:501:80a:1:a00:20ff:fef0:4c9c]) by gate.soum.co.jp (8.12.2/8.12.2) with ESMTP id g1NNkLO0029518; Sun, 24 Feb 2002 08:46:21 +0900 (JST) (envelope-from fujita@soum.co.jp) Received: from vanilla.soum.co.jp (vanilla.soum.co.jp [3ffe:501:80a:1:202:b3ff:fe98:8115]) by force.soum.co.jp (8.11.6/3.7W-2001122804) with ESMTP id g1NNkKS13573; Sun, 24 Feb 2002 08:46:20 +0900 (JST) Received: from localhost (localhost [::1]) by vanilla.soum.co.jp (Postfix) with ESMTP id C187D479B; Sun, 24 Feb 2002 08:46:19 +0900 (JST) Date: Sun, 24 Feb 2002 08:46:19 +0900 (JST) Message-Id: <20020224.084619.74696422.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 From: FUJITA Kazutoshi 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> X-PGP-PublicKey: http://www.soum.co.jp/~fujita/fujita-GnuPG-publickey.txt X-PGP-FingerPrint: 9956 2ECE 7E7D B425 EC2D D49E FEBB 3C5F 2C34 1ECA Organization: SOUM Corporation, JAPAN X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 =?iso-2022-jp?B?KBskQjgtTFobKEIp?= Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org From: MITSUNAGA Noriaki 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