From: Saravanan Dhanabal Date: Fri, 9 Apr 2010 08:07:28 +0000 (+0300) Subject: wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF X-Git-Tag: v2.6.35-rc1~473^2~167^2~313 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aecb0565e3e331d4dd23b4d35180519532015f22;p=profile%2Fivi%2Fkernel-x86-ivi.git wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF mac80211 sends RTS threshold configuration request even if the wl1271 interface state is WL1271_STATE_OFF. This leads to failures during pm tests. This patch leaves the configuration function, if the interface is going down. Signed-off-by: Saravanan Dhanabal Reviewed-by: Juuso Oikarinen 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 2eb7b99..4adc516 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -1582,10 +1582,13 @@ out: static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) { struct wl1271 *wl = hw->priv; - int ret; + int ret = 0; mutex_lock(&wl->mutex); + if (unlikely(wl->state == WL1271_STATE_OFF)) + goto out; + ret = wl1271_ps_elp_wakeup(wl, false); if (ret < 0) goto out;