Skip to content

Commit

Permalink
Staging: r8187se: Fix for LED not following radio switch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Larry Finger authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 742821c commit 6de92dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6de92dd

Please sign in to comment.