Commit cee4fd27 authored by Kalle Valo's avatar Kalle Valo Committed by John W. Linville

wl12xx: protect wl12xx_op_set_rts_threshold()

The function doesn't lock the mutex before sending the acx.
Signed-off-by: default avatarKalle Valo <kalle.valo@nokia.com>
Reviewed-by: default avatarVidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6021b289
...@@ -957,11 +957,15 @@ static int wl12xx_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) ...@@ -957,11 +957,15 @@ static int wl12xx_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
struct wl12xx *wl = hw->priv; struct wl12xx *wl = hw->priv;
int ret; int ret;
mutex_lock(&wl->mutex);
ret = wl12xx_acx_rts_threshold(wl, (u16) value); ret = wl12xx_acx_rts_threshold(wl, (u16) value);
if (ret < 0) if (ret < 0)
wl12xx_warning("wl12xx_op_set_rts_threshold failed: %d", ret); wl12xx_warning("wl12xx_op_set_rts_threshold failed: %d", ret);
mutex_unlock(&wl->mutex);
return ret; return ret;
} }
......
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