Thread (4 messages) 4 messages, 3 authors, 2007-09-22

Re: [PATCH] b43legacy: Change the hardware radio enable logic and cleanup code

From: Kalle Valo <hidden>
Date: 2007-09-22 07:13:40

Michael Buesch [off-list ref] writes:
quoted
Index: wireless-dev/drivers/net/wireless/b43legacy/leds.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/b43legacy/leds.c
+++ wireless-dev/drivers/net/wireless/b43legacy/leds.c
@@ -182,6 +182,7 @@ void b43legacy_leds_update(struct b43leg
 	unsigned long interval = 0;
 	u16 ledctl;
 	unsigned long flags;
+	bool radio_enabled = (phy->radio_on && dev->radio_hw_enable);
Just that you are aware of it:
This is a racy access to the radio_hw_enable variable, as we don't take
the mutex here (we can't and we don't want). But it's OK, since nobody
cares if the LED is racing for a second and displays the wrong state
for a second.
Same goes for the phy->radio_on access.
As a side note, it would be nice to have this as a comment in the
code. Makes it easier for other people reading the code and wondering
if this a bug or not.

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help