diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-30 04:43:28 -0400 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-10-05 09:27:38 -0400 |
commit | 117b38d0b9d3efb0adc3e636e73fc67bb53a13d1 (patch) | |
tree | d3156e50eee4284cd2ee6e9c2f74b8cf96c1ff92 | |
parent | a19606b4333ff34e9b2863f37c20fe86b42be14c (diff) |
wl1271: Move work-init calls to hw allocation
Due to legacy reason, dating back to when the wl1251 and wl1271 still were
a unified driver, some work-structures are initialized on hardware startup.
The hardware recovery code creates a scenario in which it is possible for a
workstruct to be re-initialized while the work-function itself is running,
which causes a kernel WARNing and a subsequent reboot.
To remedy this, move the work initialization calls to the hw allocation,
which is the logically correct place for them anyway.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 8071da10dbc..760a5814d4a 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -664,11 +664,6 @@ static int wl1271_setup(struct wl1271 *wl) | |||
664 | return -ENOMEM; | 664 | return -ENOMEM; |
665 | } | 665 | } |
666 | 666 | ||
667 | INIT_WORK(&wl->irq_work, wl1271_irq_work); | ||
668 | INIT_WORK(&wl->tx_work, wl1271_tx_work); | ||
669 | INIT_WORK(&wl->recovery_work, wl1271_recovery_work); | ||
670 | INIT_DELAYED_WORK(&wl->scan_complete_work, wl1271_scan_complete_work); | ||
671 | |||
672 | return 0; | 667 | return 0; |
673 | } | 668 | } |
674 | 669 | ||
@@ -2487,6 +2482,10 @@ struct ieee80211_hw *wl1271_alloc_hw(void) | |||
2487 | 2482 | ||
2488 | INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work); | 2483 | INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work); |
2489 | INIT_DELAYED_WORK(&wl->pspoll_work, wl1271_pspoll_work); | 2484 | INIT_DELAYED_WORK(&wl->pspoll_work, wl1271_pspoll_work); |
2485 | INIT_WORK(&wl->irq_work, wl1271_irq_work); | ||
2486 | INIT_WORK(&wl->tx_work, wl1271_tx_work); | ||
2487 | INIT_WORK(&wl->recovery_work, wl1271_recovery_work); | ||
2488 | INIT_DELAYED_WORK(&wl->scan_complete_work, wl1271_scan_complete_work); | ||
2490 | wl->channel = WL1271_DEFAULT_CHANNEL; | 2489 | wl->channel = WL1271_DEFAULT_CHANNEL; |
2491 | wl->beacon_int = WL1271_DEFAULT_BEACON_INT; | 2490 | wl->beacon_int = WL1271_DEFAULT_BEACON_INT; |
2492 | wl->default_key = 0; | 2491 | wl->default_key = 0; |