diff options
author | Piotr Haber <phaber@broadcom.com> | 2013-01-10 11:20:48 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-11 14:12:02 -0500 |
commit | a1fe52801a992e590cdaee2fb47a94bac9b5da90 (patch) | |
tree | 7a9c7a3a559e76d9569e419bc4a61f2b3bf20a44 /drivers/net/wireless/brcm80211/brcmsmac | |
parent | 4b883f021b9ccf2df3d14425e6e610281fb6a35e (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.
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/wireless/brcm80211/brcmsmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 7 |
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)); } |