From: Eliad Peller Date: Wed, 1 Aug 2012 15:44:22 +0000 (+0300) Subject: wlcore: resume() only if sta is associated X-Git-Tag: upstream/snapshot3+hdmi~6565^2~30^2~38^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d49524d3e8406e3b858650abcf846531a2104120;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git wlcore: resume() only if sta is associated mac80211's resume() callback might get called even if the sta is not associated (but only up). The resume sequence in this case results in configuring the wake-up conditions of a non-started role, which causes fw assertion. Fix it by bailing out if the STA is not connected (like we do on suspend()). Signed-off-by: Eliad Peller Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index a797ce7..ae2b0fd 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -1672,6 +1672,9 @@ static void wl1271_configure_resume(struct wl1271 *wl, if ((!is_ap) && (!is_sta)) return; + if (is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) + return; + ret = wl1271_ps_elp_wakeup(wl); if (ret < 0) return;