Skip to content

Commit

Permalink
wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF
Browse files Browse the repository at this point in the history
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 <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Saravanan Dhanabal authored and John W. Linville committed Apr 9, 2010
1 parent 2c10bb9 commit aecb056
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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;
Expand Down

0 comments on commit aecb056

Please sign in to comment.