linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Chaitanya <chaitanya.mgit@gmail.com>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Chaitanya T K <chaitanya.mgit@gmail.com>
Subject: Re: [PATCH] mac80211: Fix power save state stuck in ACTIVE caused by race between suspend and Tx packet.
Date: Sun, 31 May 2015 15:53:40 +0530	[thread overview]
Message-ID: <CABPxzY+WrV3XAdHvbg_SzPENjxBHqxV45HKVd--aDT-N9NbkUg@mail.gmail.com> (raw)
In-Reply-To: <1433067731-20114-1-git-send-email-chaitanya.mgit@gmail.com>

On Sun, May 31, 2015 at 3:52 PM, Chaitanya T K <chaitanya.mgit@gmail.com> wrote:
> From: Chaitanya T K <chaitanya.mgit@gmail.com>
>
> If we receive suspend after TX path has executed
> dynamic ps disable work, the driver will be in
> ACTIVE state during suspend and even after it
> resumes.
>
> As before suspend all data packets are flushed
> it is safe to put the driver in to sleep for
> optimal power during suspend or up on resume.
>
> Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com>
> ---
>  net/mac80211/pm.c |   15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
> index ac6ad62..c9d71c2 100644
> --- a/net/mac80211/pm.c
> +++ b/net/mac80211/pm.c
> @@ -76,6 +76,21 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
>                         if (sdata->vif.type != NL80211_IFTYPE_STATION)
>                                 continue;
>                         ieee80211_mgd_quiesce(sdata);
> +                       /* This is to handle a race where suspend
> +                        * is invoked after dynamic ps work disables
> +                        * power save due to TX. This causes the driver
> +                        * to be stuck in ACTIVE during suspend and
> +                        * after resume unless there is another TX,
> +                        * after which the dynamic ps puts driver
> +                        * back to DOZE.
> +                        */
> +                       if (sdata->u.mgd.associated &&
> +                           sdata->u.mgd.powersave &&
> +                            !(local->hw.conf.flags & IEEE80211_CONF_PS)) {
> +                               local->hw.conf.flags |= IEEE80211_CONF_PS;
> +                               ieee80211_hw_config(local,
> +                                                   IEEE80211_CONF_CHANGE_PS);
> +                       }
>                 }
>
>                 err = drv_suspend(local, wowlan);


Johannes,

I was final able to fix my "from" problem in git send-email.
Sorry for previous spamming. We can continue the discussion
in this thread.

Regards,
Chaitanya T K>


-- 
Thanks,
Regards,
Chaitanya T K.

  reply	other threads:[~2015-05-31 10:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31 10:22 [PATCH] mac80211: Fix power save state stuck in ACTIVE caused by race between suspend and Tx packet Chaitanya T K
2015-05-31 10:23 ` Krishna Chaitanya [this message]
2015-06-01 14:45 ` Johannes Berg
     [not found] <1431602181-17700-1-git-send-email-chaitanya.mgit@gmail.com>
2015-05-19  7:31 ` Johannes Berg
2015-05-19  8:23   ` Krishna Chaitanya
2015-05-20 13:41     ` Johannes Berg
2015-05-20 13:57       ` Krishna Chaitanya
     [not found] <1431939609-7261-1-git-send-email-chaitanya.mgit@gmail.com>
2015-05-18  9:05 ` Johannes Berg
2015-05-18  9:19   ` Krishna Chaitanya
2015-05-18  9:24     ` Johannes Berg
2015-05-18  9:28       ` Krishna Chaitanya

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=CABPxzY+WrV3XAdHvbg_SzPENjxBHqxV45HKVd--aDT-N9NbkUg@mail.gmail.com \
    --to=chaitanya.mgit@gmail.com \
    --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).