b43: Suspend MAC while killing the radio
authorMichael Buesch <mb@bu3sch.de>
Fri, 19 Dec 2008 17:40:00 +0000 (18:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Dec 2008 20:24:04 +0000 (15:24 -0500)
We should suspend the MAC, before we kill the radio. This gives
the MAC a chance to leave any TX/RX state and it avoids races on
the PHY/RADIO registers.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/phy_common.c

index 2ebfc7d1508be1ba56464bcb39b63c58140f65cf..026b61c03fb9fb4432492bc8ddad32a617d72b6a 100644 (file)
@@ -296,8 +296,10 @@ void b43_software_rfkill(struct b43_wldev *dev, enum rfkill_state state)
                state = RFKILL_STATE_SOFT_BLOCKED;
        }
 
+       b43_mac_suspend(dev);
        phy->ops->software_rfkill(dev, state);
        phy->radio_on = (state == RFKILL_STATE_UNBLOCKED);
+       b43_mac_enable(dev);
 }
 
 /**