From: Kalle Valo Date: Fri, 12 Jun 2009 11:16:20 +0000 (+0300) Subject: wl12xx: protect wl12xx_op_set_rts_threshold() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cee4fd2712a3db21f432bdff14e59aed160453b2;p=openwrt%2Fstaging%2Fblogic.git wl12xx: protect wl12xx_op_set_rts_threshold() The function doesn't lock the mutex before sending the acx. Signed-off-by: Kalle Valo Reviewed-by: Vidhya Govindan Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 8feba36ff48d..7ec174992787 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -957,11 +957,15 @@ static int wl12xx_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) struct wl12xx *wl = hw->priv; int ret; + mutex_lock(&wl->mutex); + ret = wl12xx_acx_rts_threshold(wl, (u16) value); if (ret < 0) wl12xx_warning("wl12xx_op_set_rts_threshold failed: %d", ret); + mutex_unlock(&wl->mutex); + return ret; }