diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-04-17 15:25:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-22 15:20:22 -0400 |
commit | 6d421e54c2277990f3b0e3dd92e446800c90efa3 (patch) | |
tree | b4b148d49d66344a38ef1b8c31beefb6c5078350 | |
parent | a5e9d805f907bb910fe3d10a721c24f6a4ee8237 (diff) |
brcmfmac: use lock in brcmf_fws_del_interface()
When deleting an interface in firmware-signalling module it will
clear any destination descriptors. To avoid concurrency issues it
should take the lock using brcmf_fws_lock().
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c index 648f9bd89dac..1cfec5601c68 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | |||
@@ -1821,14 +1821,17 @@ void brcmf_fws_add_interface(struct brcmf_if *ifp) | |||
1821 | void brcmf_fws_del_interface(struct brcmf_if *ifp) | 1821 | void brcmf_fws_del_interface(struct brcmf_if *ifp) |
1822 | { | 1822 | { |
1823 | struct brcmf_fws_mac_descriptor *entry = ifp->fws_desc; | 1823 | struct brcmf_fws_mac_descriptor *entry = ifp->fws_desc; |
1824 | ulong flags; | ||
1824 | 1825 | ||
1825 | brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); | 1826 | brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); |
1826 | if (!entry) | 1827 | if (!entry) |
1827 | return; | 1828 | return; |
1828 | 1829 | ||
1830 | brcmf_fws_lock(ifp->drvr, flags); | ||
1829 | ifp->fws_desc = NULL; | 1831 | ifp->fws_desc = NULL; |
1830 | brcmf_fws_clear_mac_descriptor(entry); | 1832 | brcmf_fws_clear_mac_descriptor(entry); |
1831 | brcmf_fws_cleanup(ifp->drvr->fws, ifp->ifidx); | 1833 | brcmf_fws_cleanup(ifp->drvr->fws, ifp->ifidx); |
1834 | brcmf_fws_unlock(ifp->drvr, flags); | ||
1832 | } | 1835 | } |
1833 | 1836 | ||
1834 | static void brcmf_fws_dequeue_worker(struct work_struct *worker) | 1837 | static void brcmf_fws_dequeue_worker(struct work_struct *worker) |