From: Juuso Oikarinen Date: Thu, 8 Jul 2010 14:50:04 +0000 (+0300) Subject: wl1271: Fix warning when disconnecting and ad-hoc network X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9a547bf9a83ce7211d4290956d9fca8044a409de;p=linux-beck.git wl1271: Fix warning when disconnecting and ad-hoc network Signed-off-by: Juuso Oikarinen Reviewed-by: Luciano Coelho Reviewed-by: Teemu Paasikivi Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 366e41518feb..d50c0a9835a0 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -938,7 +938,8 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw, WARN_ON(wl->state != WL1271_STATE_ON); /* enable dyn ps just in case (if left on due to fw crash etc) */ - ieee80211_disable_dyn_ps(wl->vif, false); + if (wl->bss_type == BSS_TYPE_STA_BSS) + ieee80211_disable_dyn_ps(wl->vif, false); if (test_and_clear_bit(WL1271_FLAG_SCANNING, &wl->flags)) { mutex_unlock(&wl->mutex);