rtl8188eu: Add rtw_led_enable module parameter

Make it possible to disable the LED, as it can be pretty annoying
depending on where it's located.
This commit is contained in:
Bastien Nocera 2020-01-06 21:15:07 +01:00
parent 4930848feb
commit 627a577e5c
3 changed files with 12 additions and 0 deletions

View file

@ -1652,6 +1652,7 @@ void BlinkHandler(struct LED_871x *pLed)
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{
struct led_priv *ledpriv = &(padapter->ledpriv);
struct registry_priv *registry_par;
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) ||
(!padapter->hw_init_completed))
@ -1660,6 +1661,10 @@ void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
if (!ledpriv->bRegUseLed)
return;
registry_par = &padapter->registrypriv;
if (!registry_par->led_enable)
return;
if ((padapter->pwrctrlpriv.rf_pwrstate != rf_on &&
padapter->pwrctrlpriv.rfoff_reason > RF_CHANGE_BY_PS) &&
(LedAction == LED_CTL_TX || LedAction == LED_CTL_RX ||