linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/3] mac80211: fixes for do_stop while suspended
@ 2013-03-27 22:33 Johannes Berg
  2013-03-27 22:33 ` [RFC 1/3] mac80211: purge remain-on-channel items when suspending Johannes Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Johannes Berg @ 2013-03-27 22:33 UTC (permalink / raw)
  To: linux-wireless; +Cc: sgruszka

Stanislaw,

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.

(*) the stupid one is WDS -- for it we still have the station and
    key removal in the do_stop() code. We really should kill that
    but I don't know how we could do it better, preferably in a
    backward compatible way ...

johannes


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-05 13:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC 0/3] mac80211: fixes for do_stop " Stanislaw Gruszka
2013-04-03 12:23   ` 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

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).