diff options
author | Piotr Haber <phaber@broadcom.com> | 2013-01-10 05:20:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-11 14:12:02 -0500 |
commit | a1fe52801a992e590cdaee2fb47a94bac9b5da90 (patch) | |
tree | 7a9c7a3a559e76d9569e419bc4a61f2b3bf20a44 /drivers | |
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')
-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) | |||
1407 | #endif | 1407 | #endif |
1408 | t->ms = ms; | 1408 | t->ms = ms; |
1409 | t->periodic = (bool) periodic; | 1409 | t->periodic = (bool) periodic; |
1410 | t->set = true; | 1410 | if (!t->set) { |
1411 | 1411 | t->set = true; | |
1412 | atomic_inc(&t->wl->callbacks); | 1412 | atomic_inc(&t->wl->callbacks); |
1413 | } | ||
1413 | 1414 | ||
1414 | ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); | 1415 | ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); |
1415 | } | 1416 | } |