From db3659dd875f8bfe36eff572d047456a4560d602 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Mon, 2 Oct 2017 21:26:04 +0200 Subject: [PATCH] Update hal_usb_led.c * Add rtw_led_ctrl module parameter --- hal/led/hal_usb_led.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hal/led/hal_usb_led.c b/hal/led/hal_usb_led.c index 3b9a1ca..d9667dd 100644 --- a/hal/led/hal_usb_led.c +++ b/hal/led/hal_usb_led.c @@ -2308,6 +2308,24 @@ void BlinkHandler(PLED_USB pLed) return; } +#ifdef CONFIG_SW_LED + /* led_enable 1 is normal blinking so don't cause always on/off */ + if (padapter->registrypriv.led_ctrl != 1) { + if (padapter->registrypriv.led_ctrl == 0) + { + /* Cause LED to be always off */ + pLed->BlinkingLedState = RTW_LED_OFF; + /* RTW_INFO("Led off\n"); */ + } else { + /* Cause LED to be always on for led_ctrl 2 or greater */ + pLed->BlinkingLedState = RTW_LED_ON; + /* RTW_INFO("Led on\n"); */ + } + /* Skip various switch cases where SwLedBlink*() called below */ + pLed->CurrLedState = LED_UNKNOWN; + } +#endif + switch(ledpriv->LedStrategy) { case SW_LED_MODE0: