staging: r8188eu: do not "scan blink" if we have a link
authorMartin Kaiser <martin@kaiser.cx>
Mon, 5 Sep 2022 20:01:46 +0000 (22:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Sep 2022 07:52:08 +0000 (09:52 +0200)
Do not blink the led to indicate that we're scanning if we are already
connected to a wireless network.

Tested-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220905200146.82259-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c

index f5af2e2..5b7e124 100644 (file)
@@ -258,9 +258,10 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
                }
                break;
        case LED_CTL_SITE_SURVEY:
-               if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED))) {
-                       ;
-               } else if (!pLed->bLedScanBlinkInProgress) {
+               if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED)))
+                       return;
+
+               if (!pLed->bLedScanBlinkInProgress) {
                        if (IS_LED_WPS_BLINKING(pLed))
                                return;
                        if (pLed->bLedNoLinkBlinkInProgress) {