Skip to contentSkip to conversation

b43: Suspend MAC while killing the radio

PATCH In review Michael Buesch 2 participants 2 messages Dec 19, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: Suspend MAC while killing the radio

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.

---

For 2.6.29

drivers/net/wireless/b43/phy_common.c +2 -0
Index: wireless-testing/drivers/net/wireless/b43/phy_common.c
===================================================================
@@ -293,14 +293,16 @@ void b43_software_rfkill(struct b43_wlde
 
 	if (state == RFKILL_STATE_HARD_BLOCKED) {
 		/* We cannot hardware-block the device */
 		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);
 }
 
 /**
  * b43_phy_txpower_adjust_work - TX power workqueue.
  *
  * Workqueue for updating the TX power parameters in hardware.
Signature · 1 line
Greetings, Michael.
#1 lore raw
Quoted 9 lines · Michael Buesch

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.

---

For 2.6.29

This patch removes the messages. ACK.

Larry