Search Linux Wireless

[PATCH] staging: r8187se: Fix for LED not following radio switch

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

 



The current driver does not follow the state of the RF switch.

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---

Index: wireless-testing/drivers/staging/rtl8187se/r8180_core.c
===================================================================
--- wireless-testing.orig/drivers/staging/rtl8187se/r8180_core.c
+++ wireless-testing/drivers/staging/rtl8187se/r8180_core.c
@@ -4293,11 +4293,12 @@ void GPIOChangeRFWorkItemCallBack(struct
 			//HW radio On/Off according to the value of FF51[4](config0)
 			btConfig0 = btPSR = read_nic_byte(dev, CONFIG0);
 
-			//Turn on LED.
-			write_nic_byte(dev, PSR, btPSR| BIT3);
-
 			eRfPowerStateToSet = (btConfig0 & BIT4) ?  eRfOn : eRfOff;
 
+			/* Turn LED back on when radio enabled */
+			if (eRfPowerStateToSet == eRfOn)
+				write_nic_byte(dev, PSR, btPSR | BIT3);
+
 			if((priv->ieee80211->bHwRadioOff == true) && (eRfPowerStateToSet == eRfOn))
 			{
 				priv->ieee80211->bHwRadioOff = false;
--
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