UBUNTU: SAUCE: iwl3945: Don't queue rfkill_poll work when module is exiting
When the wireless interface is active and the iwl3945 module is unloaded the
call to ieee80211_unregister_hw() would call iwl3945_mac_stop() which would
restart the delayed workqueue for rfkill_poll. That workqueue had already been
cancelled so when the next work item was run (2 seconds later) the system would
suffer a hard lock-up because the module had been unloaded by then.
This patch implements STATUS_EXIT_PENDING checks in places where the rfkill_poll
work is scheduled, and moves the final workqueue cancellation to occur after the
call to ieee80211_unregister_hw().
Bug discovered, experienced and fix tested on my PC.
+ /* ieee80211_unregister_hw calls iwl3945_mac_stop which used to restart the rfkill
+ polling. Although that now checks STATUS_EXIT_PENDING do cancel and wait for any
+ pending work to complete */
/* ieee80211_unregister_hw calls iwl3945_mac_stop, which flushes
* priv->workqueue... so we can't take down the workqueue
* until now... */
kernel-team mailing list