Skip to content

Commit

Permalink
wl12xx: protect wl12xx_op_set_rts_threshold()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kalle Valo authored and John W. Linville committed Jul 10, 2009
1 parent 6021b28 commit cee4fd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cee4fd2

Please sign in to comment.