All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: mac80211 suspend gotchas
Date: Fri, 20 Jun 2008 15:07:28 +0200	[thread overview]
Message-ID: <200806201507.29030.mb@bu3sch.de> (raw)
In-Reply-To: <1213966018.8967.176.camel@johannes.berg>

On Friday 20 June 2008 14:46:58 Johannes Berg wrote:
> Hi driver authors :)
>=20
> I suggest you guys get together and write some proper suspend support
> for mac80211. We can discuss in Ottawa, but I just wanted to let you
> know that I just ran into this:
>=20
> [...]
> [55292.062873] adb: starting probe task...
> [55292.063012] adb: finished probe task...
> [55292.502871] wlan0: No ProbeResp from current AP 00:1a:2a:2c:a2:c5 =
- assume out of range
> =EF=BB=BF[55292.502883] phy2: Removed STA 00:1a:2a:2c:a2:c5
> [55292.562874] mac80211-phy2: failed to remove key (0, 00:1a:2a:2c:a2=
:c5) from hardware (-19)
> [55292.563229] phy2: Destroyed STA 00:1a:2a:2c:a2:c5
> [55292.768591] hda: host max PIO4 wanted PIO255(auto-tune) selected P=
IO4
> [55292.776295] hda: UDMA/100 mode selected
> [55292.777058] ide-cdrom 1.0: resuming
> [55292.779026] hdc: host max PIO4 wanted PIO255(auto-tune) selected P=
IO4
> [55292.779210] hdc: MWDMA2 mode selected
> [55292.779533] therm_adt746x 8-002e: resuming
> [55292.779548] b43 ssb0:0: resuming
> [55292.779552] b43-phy2 debug: Resuming...
> [...]
>=20
> As you can see, mac80211 "noticed" that the AP was "out of range",
> probably because it sent a probe request just before or during
> suspending and the time till now was about an hour.
>=20
> We _really_ need to tie mac80211's workqueues and everything to the
> hardware so we don't try to do these things before the driver resumes=
=2E

Yeah I agree.

However, currently wpa_supplicant will notice the connection loss right
after resume and scan for APs and connect, for me.

> I don't even know if b43 keeps hardware keys across suspend

It doesn't.

> This is not a hard problem to solve.

>  - suspend does, in this order (callback used):
>     * stop aggregation (ampdu_action)
>     * remove all keys (set_key)
>     * remove all STAs (sta_notify)
>     * remove all interfaces (remove_interface)
>     * stop the hardware (stop)

I think the hardware-stop should probably be done in the driver
suspend routine after the mac80211 notification and not by a mac80211 c=
allback.
Otherwise this is going to get complicated wrt locking.

--=20
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-06-20 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20 12:46 mac80211 suspend gotchas Johannes Berg
2008-06-20 13:07 ` Michael Buesch [this message]
2008-06-20 13:31   ` Johannes Berg
2008-06-20 13:45     ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806201507.29030.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.