Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-wireless@vger.kernel.org, mabbaswireless@gmail.com
Subject: Re: [PATCH v2 2/3] mac80211: add suspend/resume callbacks
Date: Mon, 15 Dec 2008 11:11:47 +0100	[thread overview]
Message-ID: <1229335907.4471.6.camel@johannes.berg> (raw)
In-Reply-To: <1229313039-5544-3-git-send-email-me@bobcopeland.com>

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

On Sun, 2008-12-14 at 22:50 -0500, Bob Copeland wrote:
> This patch introduces suspend and resume callbacks to mac80211,
> allowing mac80211 to quiesce its state (bringing down interfaces,
> removing keys, etc) in preparation for suspend.  cfg80211 will call
> the suspend hook before the device suspend, and resume hook after
> the device resume.

Looks good to me.

> Signed-off-by: Bob Copeland <me@bobcopeland.com>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> +int __ieee80211_suspend(struct ieee80211_hw *hw)
> +{
> +	struct ieee80211_local *local = hw_to_local(hw);
> +	struct ieee80211_sub_if_data *sdata;
> +	struct ieee80211_if_init_conf conf;
> +	struct sta_info *sta;
> +
> +	flush_workqueue(local->hw.workqueue);
> +
> +	/* disable keys */
> +	list_for_each_entry(sdata, &local->interfaces, list)
> +		ieee80211_disable_keys(sdata);
> +
> +	/* remove STAs */
> +	list_for_each_entry(sta, &local->sta_list, list) {
> +
> +		if (local->ops->sta_notify) {

One could reorder this to:
	if (local->ops->sta_notify) {
		list_for_each_entry(sta, &local->sta_list, list) {

and the remaining code stays, but it really doesn't matter in this code
path.

Does it work now? Did you ever figure out why it failed occasionally
before?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2008-12-15 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15  3:50 [PATCH v2 2/3] mac80211: add suspend/resume callbacks Bob Copeland
2008-12-15 10:11 ` Johannes Berg [this message]

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=1229335907.4471.6.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mabbaswireless@gmail.com \
    --cc=me@bobcopeland.com \
    /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