linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 0/3] mac80211: fixes for do_stop while suspended
Date: Fri, 29 Mar 2013 13:33:22 +0100	[thread overview]
Message-ID: <20130329123321.GA22165@redhat.com> (raw)
In-Reply-To: <1364423602-18821-1-git-send-email-johannes@sipsolutions.net>

On Wed, Mar 27, 2013 at 11:33:19PM +0100, Johannes Berg wrote:
> I looked at this and I think we should do a bit more restructuring.
> The virtual monitor is unsafe no matter how you look at it, even
> with your second patch, due to channel contexts. I therefore opted
> to just destroy it unconditionally on suspend, and restore it when
> resuming, which has pretty much the same effect to the driver but
> handles channel contexts differently. As we disconnect etc. in all
> other interface types (*), channel contexts should thus be fully
> destroyed on suspend. I should probably add a WARN_ON() for that
> somewhere ...
> 
> I've also restructured the do_stop() function itself so it doesn't
> get "if (local->suspended)" checks all over but has it at just a
> single point at the end of the function before doing all driver
> updates.
> 
> I think this is a good compromise as it makes it obvious that the
> driver updates happen last, and only conditionally. It remains a
> tricky proposition to make sure all other state (like chanctx) is
> actually destroyed correctly, but right now that should indeed be
> the case.
> 
> No doubt I've made some mistakes here, but as I don't own any USB
> devices any more (they all broke) I'd appreciate some testing.

Just tested (with 3/3 v2 patch) and it fixes the test case I have,
that I used to create my patches. Test case is doing suspend with
reverted commit 761ce8c41ed20ee3af77f2df527edc3f92e6f3bf. This make
device is automatically removed/added during suspend, because lack 
of .reset_resume callback.

Than I tested with physical remove device from USB slot while machine
is suspend. This gives warnings in ieee80211_reconfig() and
ieee80211_stop(). I'm not sure why, I'm going to look at that, but
I think this patch set should be applied and some more fixes provided
on top of it.

Stanislaw

  parent reply	other threads:[~2013-03-29 12:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 22:33 [RFC 0/3] mac80211: fixes for do_stop while suspended Johannes Berg
2013-03-27 22:33 ` [RFC 1/3] mac80211: purge remain-on-channel items when suspending Johannes Berg
2013-03-27 22:33 ` [RFC 2/3] mac80211: destroy virtual monitor interface across suspend Johannes Berg
2013-03-27 22:33 ` [RFC 3/3] mac80211: fix do_stop handling while suspended Johannes Berg
2013-03-27 22:41   ` [RFC v2 " Johannes Berg
2013-03-29 12:33 ` Stanislaw Gruszka [this message]
2013-04-03 12:23   ` [RFC 0/3] mac80211: fixes for do_stop " Johannes Berg
2013-04-03 12:25 ` [PATCH " Johannes Berg
2013-04-03 12:25   ` [PATCH 1/3] mac80211: purge remain-on-channel items when suspending Johannes Berg
2013-04-03 12:25   ` [PATCH 2/3] mac80211: destroy virtual monitor interface across suspend Johannes Berg
2013-04-03 12:25   ` [PATCH 3/3] mac80211: fix do_stop handling while suspended Johannes Berg
2013-04-05 13:08   ` [PATCH 0/3] mac80211: fixes for do_stop " Johannes Berg

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=20130329123321.GA22165@redhat.com \
    --to=sgruszka@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).