Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2005 10:59:45 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Sam Leffler <sam@errno.com>
Cc:        hartzell@alerce.com, freebsd-mobile@freebsd.org
Subject:   Re: 6-STABLE, ath, wpa_supplicant/dhcp and suspend/resume problem.
Message-ID:  <20051210185945.GD12946@odin.ac.hmc.edu>
In-Reply-To: <439B1F73.4000804@errno.com>
References:  <17307.3792.552944.551108@satchel.alerce.com> <439B1F73.4000804@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--TybLhxa8M7aNoW+V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Dec 10, 2005 at 10:33:23AM -0800, Sam Leffler wrote:
> George Hartzell wrote:
> >I have an IBM T42p (2379-DYU) with an atheros based mini-pci card,
> >running 6-STABLE cvsup'ed yesterday morning.
> >
> >I have wpa_supplicant configured for my WEP based 11g network, and
> >have this line in my /etc/rc.conf:
> >
> >  ifconfig_ath0=3D"DHCP WPA NOAUTO"
> >
> >I start the interface via /etc/rc./netif start ath0 when I want to use
> >it.
> >
> >When I suspend the laptop, the wireless link doesn't work on resume.
> >The little icon in my gnome panel has a red disk/white line across the
> >transmit/receive graphics, but the signal strength indicators are a
> >3-high pile of diamonds (same as when it's working).  I'm not sure
> >where the panel-thingy is getting its information.
> >
> >I can resurrect the interface w/ /etc/rc.d/netif restart ath0.
> >
> >When I run wpa_supplicant by hand with some debugging flags, I see the
> >following:
> >
> >   (satchel)[8:59am]~>>sudo /usr/sbin/wpa_supplicant -d -d -K -q -i ath0=
=20
> >   -c /etc/wpa_supplicant.conf
> >   Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver=
=20
> >   'default'
> >   Configuration file '/etc/wpa_supplicant.conf' ->=20
> >   '/etc/wpa_supplicant.conf'
> >   Reading configuration file '/etc/wpa_supplicant.conf'
> >   ctrl_interface=3D'/var/run/wpa_supplicant'
> >   ctrl_interface_group=3D0
> >   eapol_version=3D1
> >   ap_scan=3D1
> >   fast_reauth=3D1
> >   Priority group 5
> >      id=3D0 ssid=3D'air-palomarin'
> >   Initializing interface (2) 'ath0'
> >   Own MAC address: 00:05:4e:4a:70:e3
> >   wpa_driver_bsd_set_wpa: enabled=3D1
> >   wpa_driver_bsd_set_wpa_internal: wpa=3D3 privacy=3D1
> >   wpa_driver_bsd_del_key: keyidx=3D0
> >   wpa_driver_bsd_del_key: keyidx=3D1
> >   wpa_driver_bsd_del_key: keyidx=3D2
> >   wpa_driver_bsd_del_key: keyidx=3D3
> >   wpa_driver_bsd_set_countermeasures: enabled=3D0
> >   wpa_driver_bsd_set_drop_unencrypted: enabled=3D1
> >   Setting scan request: 0 sec 100000 usec
> >   Starting AP scan (broadcast SSID)
> >   Received 0 bytes of scan results (1 BSSes)
> >   Scan results: 1
> >   Selecting BSS from priority group 5
> >   0: 00:13:10:9f:28:3a ssid=3D'air-palomarin' wpa_ie_len=3D0 rsn_ie_len=
=3D0
> >      skip - no WPA/RSN IE
> >      selected non-WPA AP 00:13:10:9f:28:3a ssid=3D'air-palomarin'
> >   Trying to associate with 00:13:10:9f:28:3a (SSID=3D'air-palomarin'=20
> >   freq=3D2452 MHz)
> >   Cancelling scan request
> >   Automatic auth_alg selection: 0x1
> >   No keys have been configured - skip key clearing
> >   wpa_driver_bsd_set_key: alg=3DWEP addr=3Dff:ff:ff:ff:ff:ff key_idx=3D=
0=20
> >   set_tx=3D1 seq_len=3D0 key_len=3D5
> >   wpa_driver_bsd_set_key: alg=3DWEP addr=3Dff:ff:ff:ff:ff:ff key_idx=3D=
1=20
> >   set_tx=3D0 seq_len=3D0 key_len=3D5
> >   wpa_driver_bsd_set_key: alg=3DWEP addr=3Dff:ff:ff:ff:ff:ff key_idx=3D=
2=20
> >   set_tx=3D0 seq_len=3D0 key_len=3D13
> >   wpa_driver_bsd_set_drop_unencrypted: enabled=3D1
> >   wpa_driver_bsd_associate: ssid 'air-palomarin' wpa ie len 0 pairwise =
1=20
> >   group 1 key mgmt 2
> >   wpa_driver_bsd_associate: set PRIVACY 1
> >   Setting authentication timeout: 5 sec 0 usec
> >   Association event - clear replay counter
> >   Associated to a new BSS: BSSID=3D00:13:10:9f:28:3a
> >   Associated with 00:13:10:9f:28:3a
> >   Cancelling authentication timeout
> >***SUSPENDED/RESUMED HERE***  =20
> >   Setting scan request: 0 sec 100000 usec
> >   Added BSSID 00:13:10:9f:28:3a into blacklist
> >   Disconnect event - remove keys
> >   Starting AP scan (broadcast SSID)
> >
> >And the interface isn't working.  Killing and restarting
> >wpa_supplicant brings it back.
> >
> >I also have an older apm based sony Z505 w/ an ath0 pc-card that
> >suspends and resumes w/out any manual intervention.
> >
> >What can I do to make the IBM work w/out manual intervention?
>=20
> I have a t42 and atheros card and it works fine w/o the NOAUTO setting=20
> and WPA (not WEP).   If removing NOAUTO fixes things then maybe some=20
> fixup is required in the rc.resume script.  I'd have expected devd to be=
=20
> notified on resume to bring the interface back up but since you've got=20
> NOAUTO set perhaps that's disabling it from happening.

I think there are two things going one.  First, NOAUTO means that on
resume the card doesn't come up because the system can't tell resume
from anything else.  Second, wpa_supplicant doesn't get killed like it
should during suspend (probably due to races) and it doesn't in my
experience deal well with card state changing underneath it.  I suspect
the eventual answer is that we'll need to and suspend and resume code
to /etc/rc.d/netif so we can record the state of interfaces at suspend
and restore them at resume.  That's a fairly tricky problem to solve
completely because users can do silly things like spending, swaping
cards, and resuming.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--TybLhxa8M7aNoW+V
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFDmyWgXY6L6fI4GtQRAlxRAKDRFjoK5TKTJikNL8Yl/BKfABr5tACg5PFR
cUaTSUp3e20asZs/PJLmjNM=
=B4JA
-----END PGP SIGNATURE-----

--TybLhxa8M7aNoW+V--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051210185945.GD12946>