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>
This commit is contained in:
Larry Finger 2010-02-11 14:41:24 -06:00 committed by Greg Kroah-Hartman
parent 742821ce5f
commit 6de92dd649
1 changed files with 4 additions and 3 deletions

View File

@ -4238,11 +4238,12 @@ void GPIOChangeRFWorkItemCallBack(struct work_struct *work)
/* HW radio On/Off according to the value of FF51[4](config0) */ /* HW radio On/Off according to the value of FF51[4](config0) */
btConfig0 = btPSR = read_nic_byte(dev, CONFIG0); btConfig0 = btPSR = read_nic_byte(dev, CONFIG0);
/* Turn on LED. */
write_nic_byte(dev, PSR, btPSR | BIT3);
eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff; 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) && if ((priv->ieee80211->bHwRadioOff == true) &&
(eRfPowerStateToSet == eRfOn)) { (eRfPowerStateToSet == eRfOn)) {
priv->ieee80211->bHwRadioOff = false; priv->ieee80211->bHwRadioOff = false;