diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-12-24 15:38:22 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:20:05 -0500 |
commit | 24feda0084722189468a65e20019cdd8ef99702b (patch) | |
tree | 815fdd018e7b1146546dc520208567cae75dd398 /net/mac80211 | |
parent | b98c06b6debfe84c90200143bb1102f312f50a33 (diff) |
mac80211: fix propagation of failed hardware reconfigurations
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | 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 78a6e924c7e1..dc76267e436e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1039,7 +1039,19 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1039 | 1039 | ||
1040 | /* restart hardware */ | 1040 | /* restart hardware */ |
1041 | if (local->open_count) { | 1041 | if (local->open_count) { |
1042 | /* | ||
1043 | * Upon resume hardware can sometimes be goofy due to | ||
1044 | * various platform / driver / bus issues, so restarting | ||
1045 | * the device may at times not work immediately. Propagate | ||
1046 | * the error. | ||
1047 | */ | ||
1042 | res = drv_start(local); | 1048 | res = drv_start(local); |
1049 | if (res) { | ||
1050 | WARN(local->suspended, "Harware became unavailable " | ||
1051 | "upon resume. This is could be a software issue" | ||
1052 | "prior to suspend or a harware issue\n"); | ||
1053 | return res; | ||
1054 | } | ||
1043 | 1055 | ||
1044 | ieee80211_led_radio(local, true); | 1056 | ieee80211_led_radio(local, true); |
1045 | } | 1057 | } |