From nsayer@medusa.kfu.com  Mon Nov 19 23:51:16 2001
Return-Path: <nsayer@medusa.kfu.com>
Received: from quack.kfu.com (quack.kfu.com [205.178.90.194])
	by hub.freebsd.org (Postfix) with ESMTP id 12C0537B405
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Nov 2001 23:51:16 -0800 (PST)
Received: from morpheus.kfu.com (morpheus.kfu.com [205.178.90.238])
	by quack.kfu.com (8.11.6/8.11.6) with ESMTP id fAK7pAD67467
	(using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Nov 2001 23:51:10 -0800 (PST)
	(envelope-from nsayer@medusa.kfu.com)
Received: (from nsayer@localhost)
	by morpheus.kfu.com (8.11.6/8.11.6) id fAK7pAs34488;
	Mon, 19 Nov 2001 23:51:10 -0800 (PST)
	(envelope-from nsayer)
Message-Id: <200111200751.fAK7pAs34488@morpheus.kfu.com>
Date: Mon, 19 Nov 2001 23:51:10 -0800 (PST)
From: Nick Sayer <nsayer@quack.kfu.com>
Reply-To: Nick Sayer <nsayer@quack.kfu.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Cannot set 128 bit wep key on prism2 (wi0) cards
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32124
>Category:       kern
>Synopsis:       Cannot set 128 bit wep key on prism2 (wi0) cards
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 20 00:00:02 PST 2001
>Closed-Date:    Mon Jan 10 17:55:56 MST 2005
>Last-Modified:  Mon Jan 10 17:55:56 MST 2005
>Originator:     Nick Sayer
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
just me
>Environment:
System: FreeBSD morpheus.kfu.com 4.4-RELEASE FreeBSD 4.4-RELEASE #30: Tue Nov 13 22:01:08 PST 2001 root@:/usr/obj/usr/src/sys/MORPHEUS i386


Vaio notebook, Netgear MA401, Linksys WAP-11 access point

>Description:

Attempting to set a 128 bit WEP key does not result in the correct key being
set. The exact same sequence of operations with a (Dell OEM) Lucent gold card
works correctly. The equivalent sequence of operations under Windows 2000
with the Netgear card works correctly. I can only conclude that the code to
set a 128 bit WEP key on Prism2 cards under FreeBSD is incorrect.

wicontrol reports the correct value for the key, so the ioctls to read and
write the keys at least are reading and writing the same bit of data.

Traffic snooped off the Ethernet segment connected to the access point show
corrupted frames that seem to match up in length and time to transmissions
from the machine under test. That tells me the key is not being set properly.

>How-To-Repeat:

ifconfig wi0 wepmode on weptxkey 1 wepkey 1:0x00112233445566778899aabbcc

on a prism2 card (with your access point similarly configured, of course).

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: brooks 
State-Changed-When: Mon Mar 4 12:05:46 PST 2002 
State-Changed-Why:  
I've just MFC'd a set of changes including a possiable fix for this bug. 
Please test with 4.5-STABLE after "Mon, 4 Mar 2002 12:03:57 -0800 (PST)" 
and report success or failure. 

Thanks, 
Brooks 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32124 

From: phiber@radicalmedia.com
To: freebsd-gnats-submit@FreeBSD.org, nsayer@quack.kfu.com
Cc:  
Subject: Re: kern/32124: Cannot set 128 bit wep key on prism2 cards...
Date: Fri, 8 Mar 2002 18:46:29 -0500

 I have the exact same problem, and was about to file a report when I found
 this one.  I'm using an SMC2632W on a Sony VAIO with a 2655 access point.
 The setup works fine in Windows on the same machine with WEP enabled, etc.
 After applying the aforementioned changes to if_wi.c, etc., that you merged
 in from CURRENT, things SORT OF work.  Now, I can ping my access point, which
 I couldn't do before at all with WEP enabled, with 0% loss.  However, if I
 try to ping, connect, etc., to any machines on my ethernet (or beyond) on the
 other side of the access point, maybe one out of fifty packets actually gets
 through (as tcpdump on the other side shows).  The same goes for ethernet
 traffic bound for my laptop.  I'm guessing that something about the packets
 that the wi driver is generating is confusing the access point (maybe) with
 respect to WEP-128 being enabled.  I still find it terribly odd though that
 I can ping the access point itself from the laptop with no problem, but
 packets are just barely getting back and forth to the ethernet on the other
 side (almost not at all).
 Any further suggestions?
 
 -Mark
 
State-Changed-From-To: feedback->closed 
State-Changed-By: brooks 
State-Changed-When: Mon Mar 18 09:51:06 PST 2002 
State-Changed-Why:  
Fixed in current and stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32124 

From: phiber@radicalmedia.com
To: freebsd-gnats-submit@FreeBSD.org, nsayer@quack.kfu.com
Cc: brooks@FreeBSD.org
Subject: Re: kern/32124: Cannot set 128 bit wep key on prism2 cards
Date: Mon, 18 Mar 2002 21:51:56 -0500

 Not sure why you closed this problem without so much as a response to my
 comments, but I just cvs updated to STABLE, and the exact problem as I just
 described persists still.  So it isn't fixed in STABLE.
 Can you offer any comments/suggestions?
 
 -Mark Abene
 
 
State-Changed-From-To: closed->open 
State-Changed-By: brooks 
State-Changed-When: Mon Mar 18 23:12:08 PST 2002 
State-Changed-Why:  
Apparently this isn't fixed for at least one person. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32124 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: phiber@radicalmedia.com
Cc: freebsd-gnats-submit@FreeBSD.org, nsayer@quack.kfu.com,
	brooks@FreeBSD.org
Subject: Re: kern/32124: Cannot set 128 bit wep key on prism2 cards
Date: Mon, 18 Mar 2002 23:12:58 -0800

 On Mon, Mar 18, 2002 at 09:51:56PM -0500, phiber@radicalmedia.com wrote:
 > Not sure why you closed this problem without so much as a response to my
 > comments, but I just cvs updated to STABLE, and the exact problem as I just
 > described persists still.  So it isn't fixed in STABLE.
 > Can you offer any comments/suggestions?
 
 Sorry, I'll heard from someone else that it was fixed.  Apparently not.
 I'll reopen it.
 
 -- Brooks

From: Mark Abene <phiber@radicalmedia.com>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: freebsd-gnats-submit@FreeBSD.org, nsayer@quack.kfu.com,
	brooks@FreeBSD.org
Subject: Re: kern/32124: Cannot set 128 bit wep key on prism2 cards
Date: Thu, 9 May 2002 02:05:28 -0400

 I recently had some time to experiment with this problem again, and I've
 tracked it down: the problem host will totally ignore its response packets
 UNLESS the "wi" card (in my case an SMC 2632W) is put into promiscuous-mode.
 I found this out by accident, when I ran tcpdump on the problem machine and
 noticed that the card magically started working.  So, something is still odd
 with the driver, though this is a temporary work around.
 The only options I'm setting with wicontrol are -n, -k (with a 128-bit value),
 and -e.  In promiscuous-mode, the card now appears to function properly.
 Also, I uncovered two more bugs in the driver, which are semi-related:
 attempting to use WEP key 2, 3, or 4 results in TOTALLY corrupted packets being
 transmitted by the card.  Only key 1 works properly.  The second bug appears
 to be improper bounds checking on the value of the "transmit WEP key" setting.
 For example, "wicontrol -T 0" will panic the machine, which for some reason
 I found humorous at this late hour.  :)
 In any event, I hope we can track down the cause of the promiscuous-mode
 oddity.
 
 Cheers,
 -Mark
 

From: Mark Abene <phiber@radicalmedia.com>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: freebsd-gnats-submit@FreeBSD.org, nsayer@quack.kfu.com,
	brooks@FreeBSD.org
Subject: Re: kern/32124: Cannot set 128 bit wep key on prism2 cards
Date: Sat, 11 May 2002 20:15:35 -0400

 Regarding my last message, now that I've been using my card in FreeBSD for a
 few days, I'm noticing pretty awful performance.  Ping flood testing (with 
 ping -f) to machines on my local LAN show a near PERFECT 50% packet loss every
 single time.  Something definitely wrong in driver land...
 
 Cheers,
 -Mark
 
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: imp 
Responsible-Changed-When: Sat Apr 5 00:36:41 MST 2003 
Responsible-Changed-Why:  
I'll verify that this is a problem (I have one of the SMC cards 
listed), but if I can't reproduce the problem, I'll need more 
information about cards that have this problem.  I've used wep with 
prism based cards before w/o any problems at all. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=32124 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Mon Jan 10 17:54:24 MST 2005 
State-Changed-Why:  
I'm able to use prism2 based wi cards with 128-bit WEP.  To move 
forward, I'll need more specific information on reproducing the 
problem. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=32124 
>Unformatted:
