Subject: Re: kern/32344
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Rui Paulo <rpaulo@fnop.net>
List: netbsd-bugs
Date: 04/28/2006 11:55:02
The following reply was made to PR kern/32344; it has been noted by GNATS.

From: Rui Paulo <rpaulo@fnop.net>
To: stephane.witzmann@gmail.com
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/32344
Date: Fri, 28 Apr 2006 12:48:58 +0100

 Does it also happen when a WEP key is set ?
 Can you try checking for ic->ic_def_txkey == IEEE80211_KEYIX_NONE
 before executing the switch statement and the for ?
 I.e.:
         if (ic->ic_def_txkey != IEEE80211_KEYIX_NONE) {
         	switch (ic->ic_nw_keys[ic->ic_def_txkey].wk_keylen) {
                 case 5:
                 	cmd.EncryptionType = ATU_WEP_40BITS;
                         break;
                 case 13:
                         cmd.EncryptionType = ATU_WEP_104BITS;
                         break;
                 default:
                          cmd.EncryptionType = ATU_WEP_OFF;
                          break;
                 }
 
 
                 cmd.WEP_DefaultKeyID = ic->ic_def_txkey;
                 for (i = 0; i < IEEE80211_WEP_NKID; i++) {
                 	memcpy(cmd.WEP_DefaultKey[i], ic->ic_nw_keys[i].wk_key, 
                             ic->ic_nw_keys[i].wk_keylen); 
                 }
 	}
 -- 
   Rui Paulo			<rpaulo@{NetBSD{,-PT}.org,fnop.net}>