From 13fe5a59b3c79e03cea3f7232a05e79bc5aad70a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Mon, 20 Apr 2020 18:02:56 +0200 Subject: [PATCH] staging: wfx: simplify the check if the the device is associated MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Firmware dislikes the driver enables PS when it is not yet associated. The current check for that condition is more complex than necessary. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200420160311.57323-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wfx/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index c73dbb3..c0c3eb9 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -263,7 +263,7 @@ static int wfx_update_pm(struct wfx_vif *wvif) struct ieee80211_channel *chan0 = NULL, *chan1 = NULL; WARN_ON(conf->dynamic_ps_timeout < 0); - if (wvif->state != WFX_STATE_STA || !wvif->bss_params.aid) + if (!wvif->vif->bss_conf.assoc) return 0; if (!ps) ps_timeout = 0; -- 2.7.4