]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmsmac: use perimeter lock in add_interface() callback
authorArend van Spriel <arend@broadcom.com>
Wed, 2 Jan 2013 14:22:35 +0000 (15:22 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jan 2013 20:16:55 +0000 (15:16 -0500)
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 <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c

index f8e2591961ab3032187b53994db83a89e95a30be..b5b4487006f32183fa67a78fe87b88db5d37f688 100644 (file)
@@ -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;
 }