diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 07:16:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:47 -0400 |
commit | cee4fd2712a3db21f432bdff14e59aed160453b2 (patch) | |
tree | 92b6fb3e3d0b0d4bbea26e24bf4b4b9a70c02cab /drivers | |
parent | 6021b2895891b161f73ede9938c101234c63218e (diff) |
wl12xx: protect wl12xx_op_set_rts_threshold()
The function doesn't lock the mutex before sending the acx.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 8feba36ff48..7ec17499278 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) | |||
957 | struct wl12xx *wl = hw->priv; | 957 | struct wl12xx *wl = hw->priv; |
958 | int ret; | 958 | int ret; |
959 | 959 | ||
960 | mutex_lock(&wl->mutex); | ||
961 | |||
960 | ret = wl12xx_acx_rts_threshold(wl, (u16) value); | 962 | ret = wl12xx_acx_rts_threshold(wl, (u16) value); |
961 | 963 | ||
962 | if (ret < 0) | 964 | if (ret < 0) |
963 | wl12xx_warning("wl12xx_op_set_rts_threshold failed: %d", ret); | 965 | wl12xx_warning("wl12xx_op_set_rts_threshold failed: %d", ret); |
964 | 966 | ||
967 | mutex_unlock(&wl->mutex); | ||
968 | |||
965 | return ret; | 969 | return ret; |
966 | } | 970 | } |
967 | 971 | ||