summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPiotr Haber <phaber@broadcom.com>2013-01-10 11:20:48 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-01-11 14:12:02 -0500
commita1fe52801a992e590cdaee2fb47a94bac9b5da90 (patch)
tree7a9c7a3a559e76d9569e419bc4a61f2b3bf20a44 /drivers/net
parent4b883f021b9ccf2df3d14425e6e610281fb6a35e (diff)
downloadlinux-a1fe52801a992e590cdaee2fb47a94bac9b5da90.tar.gz
linux-a1fe52801a992e590cdaee2fb47a94bac9b5da90.tar.bz2
linux-a1fe52801a992e590cdaee2fb47a94bac9b5da90.zip
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. Cc: stable@vger.kernel.org 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')
-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 1fbd8ecbe2ea..0f71d1d4339d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1407,9 +1407,10 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
#endif
t->ms = ms;
t->periodic = (bool) periodic;
- t->set = true;
-
- atomic_inc(&t->wl->callbacks);
+ if (!t->set) {
+ t->set = true;
+ atomic_inc(&t->wl->callbacks);
+ }
ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms));
}