From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
"linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Amod Bodas <Amod.Bodas@Atheros.com>,
"pstew@google.com" <pstew@google.com>,
"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH 5/5] mac80211: fix issuing idle calls when device open count is 0
Date: Tue, 7 Dec 2010 13:28:31 -0800 [thread overview]
Message-ID: <20101207212831.GC2582@tux> (raw)
In-Reply-To: <1291755472.3607.60.camel@jlt3.sipsolutions.net>
On Tue, Dec 07, 2010 at 12:57:52PM -0800, Johannes Berg wrote:
> On Tue, 2010-12-07 at 12:56 -0800, Luis R. Rodriguez wrote:
>
> > > Not really, since we do scan_cancel() within suspend()... I guess I'd
> > > like to find out why that doesn't do what I think it does.
> >
> > Well lets see, this is only reproducible with the new DBUS APIs, and
> > frankly I am not sure what these things do. Is it possible we have a
> > race between how it brings down an interface for suspend and canceling
> > a scan?
>
> But both suspend and do_stop should run under RTNL.
Paul, can you try this instead of these two patches. What this
does is it assumes mac80211 will tell us that stop() implies
to disable the radio as explained in the documentation and that
any further operations will not happen, and that idle settings
prior to mac80211 issuing a start() callback are the responsibility
of the driver to ensure integrity on. Because of this we ensure
idle on stop() as no other interfaces are possible enabled and
we also ensure it to be idle on resume.
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 97ddb32..eb98f7f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1337,8 +1337,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)
ath9k_ps_restore(sc);
- /* Finally, put the chip in FULL SLEEP mode */
- ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
+ sc->ps_idle = true;
+ ath_radio_disable(sc, hw);
sc->sc_flags |= SC_OP_INVALID;
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 09f69a9..47334f3 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -297,6 +297,9 @@ static int ath_pci_resume(struct device *device)
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
+ sc->ps_idle = true;
+ ath_radio_disable(sc, hw);
+
return 0;
}
prev parent reply other threads:[~2010-12-07 21:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 2:48 [PATCH 0/5] mac80211/ath9k: few suspend checks and fixes Luis R. Rodriguez
2010-12-07 2:48 ` [PATCH 1/5] ath9k: warn when we get a ATH9K_INT_TIM_TIMER and are idle Luis R. Rodriguez
2011-01-19 1:34 ` Ben Greear
2011-01-19 1:38 ` Luis R. Rodriguez
2011-01-19 1:42 ` Ben Greear
2011-01-19 1:43 ` Luis R. Rodriguez
2010-12-07 2:48 ` [PATCH 2/5] ath9k: Fix power save count imbalance on ath_radio_enable() Luis R. Rodriguez
2010-12-07 2:48 ` [PATCH 3/5] ath9k_hw: warn if we cannot change the power to the chip Luis R. Rodriguez
2010-12-07 2:48 ` [PATCH 4/5] mac80211: fix idle change notifications upon device stop Luis R. Rodriguez
2010-12-07 2:48 ` [PATCH 5/5] mac80211: fix issuing idle calls when device open count is 0 Luis R. Rodriguez
2010-12-07 9:38 ` Johannes Berg
2010-12-07 15:20 ` Paul Stewart
2010-12-07 15:23 ` Johannes Berg
2010-12-07 17:28 ` Paul Stewart
2010-12-07 17:31 ` Johannes Berg
2010-12-07 15:44 ` Luis R. Rodriguez
2010-12-07 15:48 ` Johannes Berg
2010-12-07 15:51 ` Luis R. Rodriguez
2010-12-07 15:54 ` Johannes Berg
2010-12-07 15:59 ` Luis R. Rodriguez
2010-12-07 17:32 ` Johannes Berg
2010-12-07 18:04 ` Luis R. Rodriguez
2010-12-07 18:12 ` Johannes Berg
2010-12-07 20:49 ` Luis R. Rodriguez
2010-12-07 20:54 ` Johannes Berg
2010-12-07 20:56 ` Luis R. Rodriguez
2010-12-07 20:57 ` Johannes Berg
2010-12-07 21:28 ` Luis R. Rodriguez [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=20101207212831.GC2582@tux \
--to=lrodriguez@atheros.com \
--cc=Amod.Bodas@Atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=pstew@google.com \
--cc=stable@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).