Staging: r8187se: Fix for LED not following radio switch

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Sunday, March 7, 2010 - 6:02 pm

Gitweb:     http://git.kernel.org/linus/6de92dd6495e36c0c2cddbee3e7c6a49f608e7cf
Commit:     6de92dd6495e36c0c2cddbee3e7c6a49f608e7cf
Parent:     742821ce5fdf691826154fe72ba0884f71a40982
Author:     Larry Finger <Larry.Finger@lwfinger.net>
AuthorDate: Thu Feb 11 14:41:24 2010 -0600
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Wed Mar 3 16:42:58 2010 -0800

    Staging: r8187se: Fix for LED not following radio switch
    
    The current driver does not follow the state of the RF switch.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_core.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index ac987d1..0b7ec6b 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -4238,11 +4238,12 @@ void GPIOChangeRFWorkItemCallBack(struct work_struct *work)
 	/* 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 git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: r8187se: Fix for LED not following radio switch, Linux Kernel Mailing ..., (Sun Mar 7, 6:02 pm)