All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 2/5] mac80211: fix propagation of failed hardware reconfigurations
@ 2009-12-24 20:38 Luis R. Rodriguez
  2009-12-29  1:58 ` Holger Schurig
  0 siblings, 1 reply; 2+ messages in thread
From: Luis R. Rodriguez @ 2009-12-24 20:38 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez, stable

mac80211 does not propagate failed hardware reconfiguration
requests. For suspend and resume this is important due to all
the possible issues that can come out of the suspend <-> resume
cycle. Not propagating the error means cfg80211 will assume
the resume for the device went through fine and mac80211 will
continue on trying to poke at the hardware, enable timers,
queue work, and so on for a device which is completley
unfunctional.

The least we can do is to propagate device start issues and
warn when this occurs upon resume. A side effect of this patch
is we also now propagate the start errors upon harware
reconfigurations (non-suspend), but this should also be desirable
anyway, there is not point in continuing to reconfigure a
device if mac80211 was unable to start the device.

For further details refer to the thread:

http://marc.info/?t=126151038700001&r=1&w=2

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---

This should make more sense for the warning.

 net/mac80211/util.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index b019725..227b428 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1047,7 +1047,19 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 
 	/* restart hardware */
 	if (local->open_count) {
+		/*
+		 * Upon resume hardware can sometimes be goofy due to
+		 * various platform / driver / bus issues, so restarting
+		 * the device may at times not work immediately. Propagate
+		 * the error.
+		 */
 		res = drv_start(local);
+		if (res) {
+			WARN(local->suspended, "Harware became unavailable "
+			     "upon resume. This is could be a software issue"
+			     "prior to suspend or a harware issue\n");
+			return res;
+		}
 
 		ieee80211_led_radio(local, true);
 	}
-- 
1.6.3.3


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

* Re: [PATCH v3 2/5] mac80211: fix propagation of failed hardware reconfigurations
  2009-12-24 20:38 [PATCH v3 2/5] mac80211: fix propagation of failed hardware reconfigurations Luis R. Rodriguez
@ 2009-12-29  1:58 ` Holger Schurig
  0 siblings, 0 replies; 2+ messages in thread
From: Holger Schurig @ 2009-12-29  1:58 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, stable

> +			WARN(local->suspended, "Harware became unavailable "

Typo: it's "Hardware", not "Harware". Hmm, sometimes it's hairware :-)


-- 
http://www.holgerschurig.de

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

end of thread, other threads:[~2009-12-29  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-24 20:38 [PATCH v3 2/5] mac80211: fix propagation of failed hardware reconfigurations Luis R. Rodriguez
2009-12-29  1:58 ` Holger Schurig

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.