From owner-freebsd-stable@FreeBSD.ORG Tue Oct 10 03:05:15 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DDD716A47E; Tue, 10 Oct 2006 03:05:15 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49A9543D46; Tue, 10 Oct 2006 03:05:13 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.185.104] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1GX7vM2dX6-0008TY; Tue, 10 Oct 2006 05:04:57 +0200 From: Max Laier Organization: FreeBSD To: "Andrew N. Below" Date: Tue, 10 Oct 2006 05:04:46 +0200 User-Agent: KMail/1.9.4 References: <089501c6ebb0$31848e20$970da8c0@jam.zenon.net> <0a2a01c6ebcb$e3d36bd0$970da8c0@jam.zenon.net> <200610092026.58504.max@love2party.net> In-Reply-To: <200610092026.58504.max@love2party.net> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6037035.MmomNKH08v"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610100504.56088.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: sam@freebsd.org, freebsd-stable@freebsd.org Subject: Re: iwi, hidden SSID and wpa_supplicant problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 03:05:15 -0000 --nextPart6037035.MmomNKH08v Content-Type: multipart/mixed; boundary="Boundary-01=_Q3wKFdUVkIjgwa9" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_Q3wKFdUVkIjgwa9 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 09 October 2006 20:26, Max Laier wrote: > On Monday 09 October 2006 19:53, Andrew N. Below wrote: > > Hi. > > > > [..] > > > > > You can try using ap_scan=3D2 or whatever it is in the > > > wpa_supplicant.conf file. This causes wpa_supplicant to use > > > directed broadcasts msgs to each ap listed in the file. > > > > In my case setting ap_scan to 2 doesn't help. > > > > BTW, I got successfull connection some time ago when I > > start to use /etc/rc.d/netif start iwi0 instead of manual > > running of wpa_supplicant: > > > > defanbook# ifconfig iwi0 > > iwi0: flags=3D8843 mtu 1500 > > inet 213.189.198.75 netmask 0xfffffff0 broadcast > > 213.189.198.79 ether 00:12:f0:3d:cd:58 > > media: IEEE 802.11 Wireless Ethernet autoselect mode 11b > > (DS/11Mbps) status: associated > > ssid ZENON-RADIO channel 11 bssid 00:07:0e:b8:d8:ee > > authmode WPA privacy ON deftxkey UNDEF TKIP 2:128-bit TKIP > > 3:128-bit txpowmax 100 bmiss 10 protmode CTS roaming MANUAL bintval > > 100 > > > > I wrote bssid value to /etc/wpa_supplicant.conf and run > > /etc/rc.d/netif. > > > > Then I drop connection (netif stop iwi0) and tried to start it again. > > I got "associated" state in 5-6 minutes. > > > > In rc.conf I have: > > > > ifconfig_iwi0=3D"ssid MY-SSID channel 11 WPA > > > > How can I get "-dd" output from wpa_supplicant started with netif? > > It could be interesting. > > No idea, but a bit more stress testing did reveal a similar problem > here. After I associated with the AP w/ hidden SSID I changed the > channel via webinterface. The disconnect resulted in the exact problem > you were having. Only stopping and restarting wpa_supplicant fixed the > issue and I got associated on the new channel. Not sure what happens > there yet, but something seems to get stuck in an undefined state. Could you try the attached - untested - patch? It seems - from looking at= =20 the linux driver - that we have to remind the firmware of the ESSID=20 before doing a directed scan. That explains why it would sometimes work=20 (whenever we are coming straight from iwi_config) and sometimes not. Let me know if that improves things for you. Thanks. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_Q3wKFdUVkIjgwa9 Content-Type: text/x-diff; charset="iso-8859-6"; name="if_iwi.essid.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="if_iwi.essid.diff" Index: if_iwi.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/dev/iwi/if_iwi.c,v retrieving revision 1.39 diff -u -r1.39 if_iwi.c =2D-- if_iwi.c 26 Jul 2006 03:09:32 -0000 1.39 +++ if_iwi.c 10 Oct 2006 02:55:52 -0000 @@ -2699,7 +2699,7 @@ struct ieee80211com *ic =3D &sc->sc_ic; const struct ieee80211_channel *c; struct iwi_scan_ext scan; =2D int i, ix, start, scan_type; + int i, ix, start, scan_type, error; =20 memset(&scan, 0, sizeof scan); =20 @@ -2710,8 +2710,22 @@ =20 scan.full_scan_index =3D htole32(ic->ic_scan.nt_scangen); =20 =2D scan_type =3D (ic->ic_des_esslen !=3D 0) ? IWI_SCAN_TYPE_BDIRECTED : =2D IWI_SCAN_TYPE_BROADCAST; + if (ic->ic_des_esslen !=3D 0) { + scan_type =3D IWI_SCAN_TYPE_BDIRECTED; +#ifdef IWI_DEBUG + if (iwi_debug > 0) { + printf("Setting desired ESSID to "); + ieee80211_print_essid(ic->ic_des_essid, + ic->ic_des_esslen); + printf("\n"); + } +#endif + error =3D iwi_cmd(sc, IWI_CMD_SET_ESSID, ic->ic_des_essid, + ic->ic_des_esslen); + if (error !=3D 0) + return error; + } else + scan_type =3D IWI_SCAN_TYPE_BROADCAST; =20 ix =3D 0; if (ic->ic_modecaps & IEEE80211_MODE_5GHZ) { --Boundary-01=_Q3wKFdUVkIjgwa9-- --nextPart6037035.MmomNKH08v Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFKw3YXyyEoT62BG0RAp5IAJ9Pm/eTaUbxuTs2GyJRsoEl3n9mJQCdFhxZ bet3SMVpXRXzg/obXvMzc9Q= =lj1w -----END PGP SIGNATURE----- --nextPart6037035.MmomNKH08v--