brcmsmac: increase timer reference count for new timers only
PATCH 1/1 brcmsmac: increase timer reference count for new timers only
From: Piotr Haber <[email protected]>
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 <[email protected]>
Reviewed-by Hante Meuleman <[email protected]>
Reviewed-by Arend van Spriel <[email protected]>
Signed-off-by Piotr Haber <[email protected]>
Signed-off-by Arend van Spriel <[email protected]>
---
Hi John,
This patch fixes driver unload issue after driver restart due to fatal hardware problem. Because for 3.8 brcmsmac has been reported to restart (looking into that) this fix may be helpful to at least get the driver removed.
Gr. AvS
--- drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +4 -3
@@ -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)); }
Signature · 1 line
1.7.10.4