From owner-freebsd-mobile Sat Feb 23 23:18:29 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by hub.freebsd.org (Postfix) with ESMTP id 3802037B400 for ; Sat, 23 Feb 2002 23:18:26 -0800 (PST) Received: from pacbell.net ([63.193.114.253]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GS100GWY0APUM@mta7.pltn13.pbi.net> for mobile@FreeBSD.ORG; Sat, 23 Feb 2002 23:18:26 -0800 (PST) Date: Sat, 23 Feb 2002 23:15:56 -0800 From: Thomas Skibo Subject: Re: Linksys WMP11 support To: "M. Warner Losh" , fujita@soum.co.jp Cc: mitchy@er.ams.eng.osaka-u.ac.jp, mobile@FreeBSD.ORG, brooks@one-eyed-alien.net Message-id: <3C78932C.27319015@pacbell.net> Organization: College Avenue Surf Shop MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <20020205133602.A6294@Odin.AC.HMC.Edu> <20020206095856D.mitchy@er.ams.eng.osaka-u.ac.jp> <20020224.084619.74696422.fujita@soum.co.jp> <20020223.213124.62371755.imp@village.org> 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 "M. Warner Losh" wrote: > > > I've heard all kinds of reports for Prism 2 cards not working with 128 > bit WEP. Maybe we need to do this for all PRISM 2 cards? > Yup. I think they all benefit. I tried FUJITA Kazutoshi's changes on three different prism2 interfaces (a Linksys WMP-11, a D-Link DWL-650, and a Linksys WPC-11 v2.5) and now they are all talking 104-bit WEP. My FreeBSD machines now talk to my XP machine in 104-bit mode which they never did before. I think the breakthrough is setting the key length on ALL the keys to the same value. Thanks for tracking that down, Fujita. Here's the changes as I'm using them: *** if_wi.c 2002/02/16 03:52:16 1.6 --- if_wi.c 2002/02/24 06:37:58 *************** *** 1155,1174 **** ltv = &p2ltv; break; case WI_RID_DEFLT_CRYPT_KEYS: { int error; 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) return error; } --- 1162,1186 ---- ltv = &p2ltv; break; case WI_RID_DEFLT_CRYPT_KEYS: { int error; + int keylen; struct wi_ltv_str ws; struct wi_ltv_keys *wk = (struct wi_ltv_keys *)ltv; + keylen = wk->wi_keys[ sc->wi_tx_key ].wi_keylen; + for (i = 0; i < 4; i++) { ! ! bzero(&ws, sizeof(ws)); ! ws.wi_len = (keylen>5) ? 8:4; ws.wi_type = WI_RID_P2_CRYPT_KEY0 + i; memcpy(ws.wi_str, ! &wk->wi_keys[i].wi_keydat, keylen); ! error = wi_write_record(sc, (struct wi_ltv_gen *)&ws); if (error) return error; } -- ------------------------------------------------------------------------ Thomas Skibo skibo@pacbell.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message