From: Arend van Spriel Date: Wed, 2 Jan 2013 14:22:35 +0000 (+0100) Subject: brcmsmac: use perimeter lock in add_interface() callback X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=66578c0a8cb8c34ef284acf34e05f2d8e7416ee1;p=linux-beck.git brcmsmac: use perimeter lock in add_interface() callback All callbacks that access driver functions should do that under perimeter lock protection. The add_interface() callback was lacking this lock. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Piotr Haber Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index f8e2591961ab..b5b4487006f3 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c @@ -362,8 +362,10 @@ brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) return -EOPNOTSUPP; } + spin_lock_bh(&wl->lock); wl->mute_tx = false; brcms_c_mute(wl->wlc, false); + spin_unlock_bh(&wl->lock); return 0; }