linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: Suspend MAC while killing the radio
@ 2008-12-19 17:40 Michael Buesch
  2008-12-19 18:14 ` Larry Finger
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Buesch @ 2008-12-19 17:40 UTC (permalink / raw)
  To: linville; +Cc: Larry Finger, linux-wireless, bcm43xx-dev

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>

---

For 2.6.29

Index: wireless-testing/drivers/net/wireless/b43/phy_common.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_common.c	2008-12-19 18:32:33.000000000 +0100
+++ wireless-testing/drivers/net/wireless/b43/phy_common.c	2008-12-19 18:35:49.000000000 +0100
@@ -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.

-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] b43: Suspend MAC while killing the radio
  2008-12-19 17:40 [PATCH] b43: Suspend MAC while killing the radio Michael Buesch
@ 2008-12-19 18:14 ` Larry Finger
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2008-12-19 18:14 UTC (permalink / raw)
  To: Michael Buesch; +Cc: linville, linux-wireless, bcm43xx-dev

Michael Buesch wrote:
> 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>
> 
> ---
> 
> For 2.6.29

This patch removes the messages. ACK.

Larry


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-19 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19 17:40 [PATCH] b43: Suspend MAC while killing the radio Michael Buesch
2008-12-19 18:14 ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).