Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Buesch <mb@xxxxxxxxx> writes:

>> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux