b43: Fix PPC crash in rfkill polling on unload
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 2 Oct 2009 17:54:34 +0000 (12:54 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Oct 2009 20:33:51 +0000 (16:33 -0400)
In Bugzilla No. 14181, a PowerMac G4 crashes on ifdown or
module unload because the rfkill polling has not been stopped.
For the x86 architectures, the attempt to reach a now unmapped
register is not fatal as it is on PPC.

(Includes "b43: Fix locking problem when stopping rfkill polling". -- JWL)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/main.c

index 86f35827f0085a19d01d94624c4f2aee3603df3f..df6b26a0c05ed47d356a4a38e58891ba08acff02 100644 (file)
@@ -4501,6 +4501,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
 
        cancel_work_sync(&(wl->beacon_update_trigger));
 
 
        cancel_work_sync(&(wl->beacon_update_trigger));
 
+       wiphy_rfkill_stop_polling(hw->wiphy);
        mutex_lock(&wl->mutex);
        if (b43_status(dev) >= B43_STAT_STARTED) {
                dev = b43_wireless_core_stop(dev);
        mutex_lock(&wl->mutex);
        if (b43_status(dev) >= B43_STAT_STARTED) {
                dev = b43_wireless_core_stop(dev);