All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: fix aphy / wiphy idle mismatch
@ 2010-12-20 16:29 Luis R. Rodriguez
  2010-12-22 18:28 ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2010-12-20 16:29 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, Luis R. Rodriguez, stable, Paul Stewart, Amod Bodas

ath9k supports its own set of virtual wiphys, and it uses
the mac80211 idle notifications to know when a device needs
to be idle or not. We recently changed ath9k to force idle
on driver stop() and on resume but forgot to take into account
ath9k's own virtual wiphy idle states. These are used internally
by ath9k to check if the device's radio should be powered down
on each idle call. Without this change its possible that the
device could have been forced off but the virtual wiphy idle
was left on.

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---

I'm not yet sure if this actually fixes an issue but it
certainly is a proper ammendment to the other idle fix
submitted for stable for suspend/resume.

 drivers/net/wireless/ath/ath9k/main.c |    1 +
 drivers/net/wireless/ath/ath9k/pci.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4d64716..1b35175 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1354,6 +1354,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
 	ath9k_ps_restore(sc);
 
 	sc->ps_idle = true;
+	ath9k_set_wiphy_idle(aphy, 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 7ca8499..4538283 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -310,6 +310,7 @@ static int ath_pci_resume(struct device *device)
 	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
 
 	sc->ps_idle = true;
+	ath9k_set_wiphy_idle(aphy, true);
 	ath_radio_disable(sc, hw);
 
 	return 0;
-- 
1.7.3.2.90.gd4c43


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

* Re: [PATCH] ath9k: fix aphy / wiphy idle mismatch
  2010-12-20 16:29 [PATCH] ath9k: fix aphy / wiphy idle mismatch Luis R. Rodriguez
@ 2010-12-22 18:28 ` John W. Linville
  2010-12-22 18:31   ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2010-12-22 18:28 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, stable, Paul Stewart, Amod Bodas

On Mon, Dec 20, 2010 at 11:29:59AM -0500, Luis R. Rodriguez wrote:
> ath9k supports its own set of virtual wiphys, and it uses
> the mac80211 idle notifications to know when a device needs
> to be idle or not. We recently changed ath9k to force idle
> on driver stop() and on resume but forgot to take into account
> ath9k's own virtual wiphy idle states. These are used internally
> by ath9k to check if the device's radio should be powered down
> on each idle call. Without this change its possible that the
> device could have been forced off but the virtual wiphy idle
> was left on.
> 
> Cc: stable@kernel.org
> Cc: Paul Stewart <pstew@google.com>
> Cc: Amod Bodas <amod.bodas@atheros.com>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> 
> I'm not yet sure if this actually fixes an issue but it
> certainly is a proper ammendment to the other idle fix
> submitted for stable for suspend/resume.

Can you refresh me on which patch that is?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] ath9k: fix aphy / wiphy idle mismatch
  2010-12-22 18:28 ` John W. Linville
@ 2010-12-22 18:31   ` Luis R. Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2010-12-22 18:31 UTC (permalink / raw)
  To: John W. Linville
  Cc: Luis Rodriguez, linux-wireless, stable, Paul Stewart, Amod Bodas

On Wed, Dec 22, 2010 at 10:28:51AM -0800, John W. Linville wrote:
> On Mon, Dec 20, 2010 at 11:29:59AM -0500, Luis R. Rodriguez wrote:
> > ath9k supports its own set of virtual wiphys, and it uses
> > the mac80211 idle notifications to know when a device needs
> > to be idle or not. We recently changed ath9k to force idle
> > on driver stop() and on resume but forgot to take into account
> > ath9k's own virtual wiphy idle states. These are used internally
> > by ath9k to check if the device's radio should be powered down
> > on each idle call. Without this change its possible that the
> > device could have been forced off but the virtual wiphy idle
> > was left on.
> > 
> > Cc: stable@kernel.org
> > Cc: Paul Stewart <pstew@google.com>
> > Cc: Amod Bodas <amod.bodas@atheros.com>
> > Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> > ---
> > 
> > I'm not yet sure if this actually fixes an issue but it
> > certainly is a proper ammendment to the other idle fix
> > submitted for stable for suspend/resume.
> 
> Can you refresh me on which patch that is?

Sure, its:

    ath9k: fix assumptions for idle calls on suspend/resume

  Luis

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

end of thread, other threads:[~2010-12-22 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 16:29 [PATCH] ath9k: fix aphy / wiphy idle mismatch Luis R. Rodriguez
2010-12-22 18:28 ` John W. Linville
2010-12-22 18:31   ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.