From: Seth Forshee Date: Wed, 25 Apr 2012 22:28:00 +0000 (-0500) Subject: b43: only reload config after successful initialization X-Git-Tag: v3.3.5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcc81764edda16e022c9f0b96324e9efc22525c0;p=thirdparty%2Fkernel%2Fstable.git b43: only reload config after successful initialization commit dbdedbdf4fbff3d4962a0786f37aa86dfdc48a7e upstream. Commit 2a19032 (b43: reload phy and bss settings after core restarts) introduced an unconditional call to b43_op_config() at the end of b43_op_start(). When firmware fails to load this can wedge the system. There's no need to reload the configuration after a failed initialization anyway, so only make the call if initialization was successful. BugLink: http://bugs.launchpad.net/bugs/950295 Cc: Felix Fietkau Signed-off-by: Seth Forshee Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 23ffb1b9a86f4..11ab4a46ea853 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -4841,8 +4841,14 @@ static int b43_op_start(struct ieee80211_hw *hw) out_mutex_unlock: mutex_unlock(&wl->mutex); - /* reload configuration */ - b43_op_config(hw, ~0); + /* + * Configuration may have been overwritten during initialization. + * Reload the configuration, but only if initialization was + * successful. Reloading the configuration after a failed init + * may hang the system. + */ + if (!err) + b43_op_config(hw, ~0); return err; }