Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6de92dd6 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

Staging: r8187se: Fix for LED not following radio switch



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

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 742821ce
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;