Subject: Re: kern/32344
To: None <rpaulo@netbsd.org, gnats-admin@netbsd.org,>
From: Rui Paulo <rpaulo@fnop.net>
List: netbsd-bugs
Date: 05/08/2006 19:40:02
The following reply was made to PR kern/32344; it has been noted by GNATS.
From: Rui Paulo <rpaulo@fnop.net>
To: gnats-bugs@NetBSD.org,
=?iso-8859-1?q?St=E9phane_Witzmann?= <stephane.witzmann@gmail.com>
Cc:
Subject: Re: kern/32344
Date: Mon, 08 May 2006 20:35:12 +0100
Please try this patch (I think the card you sent me doesn't work on my
country or something else is wrong with my AP):
Index: if_atu.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_atu.c,v
retrieving revision 1.15
diff -u -p -r1.15 if_atu.c
--- if_atu.c 8 May 2006 17:12:42 -0000 1.15
+++ if_atu.c 8 May 2006 19:34:09 -0000
@@ -479,6 +479,8 @@ atu_start_scan(struct atu_softc *sc)
else
Scan.Channel = sc->atu_channel;
+ ic->ic_curchan = &ic->ic_channels[Scan.Channel];
+
/* we like scans to be quick :) */
/* the time we wait before sending probe's */
USETW(Scan.ProbeDelay, 0);
@@ -606,23 +608,25 @@ atu_initial_config(struct atu_softc *sc)
cmd.ExcludeUnencrypted = 0;
- 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;
- }
+ if (ic->ic_flags & IEEE80211_F_PRIVACY) {
+ 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);
+ 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);
+ }
}
/* Setting the SSID here doesn't seem to do anything */
@@ -1100,8 +1104,7 @@ atu_task(void *arg)
USBDEVNAME(sc->atu_dev)));
s = splnet();
- /* ieee80211_next_scan(ifp); */
- ieee80211_end_scan(ic);
+ ieee80211_next_scan(ic);
splx(s);
DPRINTF(("%s: ----------------------======> END OF SCAN2!\n",
--
Rui Paulo <rpaulo@{NetBSD{,-PT}.org,fnop.net}>