aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
diff options
context:
space:
mode:
authorPiotr Haber <phaber@broadcom.com>2013-01-02 09:22:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 15:16:54 -0500
commit01486c5ad388c8a38f2e075666e8c2ee32bda4b6 (patch)
treeb3dc9f841e480c9fb051964c32b351a0d00e3a35 /drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
parenta02308e931ad0bba19803779bec491c4b2d67b47 (diff)
brcmsmac: increase timer reference count for new timers only
On hardware reintialization reference count of already existing timers would be increased again. This leads to problems on module unloading. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index f0fc8cd4d5df..f8e2591961ab 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1409,9 +1409,10 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
1409#endif 1409#endif
1410 t->ms = ms; 1410 t->ms = ms;
1411 t->periodic = (bool) periodic; 1411 t->periodic = (bool) periodic;
1412 t->set = true; 1412 if (!t->set) {
1413 1413 t->set = true;
1414 atomic_inc(&t->wl->callbacks); 1414 atomic_inc(&t->wl->callbacks);
1415 }
1415 1416
1416 ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); 1417 ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms));
1417} 1418}