Commit aecb0565 authored by Saravanan Dhanabal's avatar Saravanan Dhanabal Committed by John W. Linville

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: default avatarSaravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2c10bb9c
...@@ -1582,10 +1582,13 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, ...@@ -1582,10 +1582,13 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
{ {
struct wl1271 *wl = hw->priv; struct wl1271 *wl = hw->priv;
int ret; int ret = 0;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (unlikely(wl->state == WL1271_STATE_OFF))
goto out;
ret = wl1271_ps_elp_wakeup(wl, false); ret = wl1271_ps_elp_wakeup(wl, false);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment