summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-09-11 17:51:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-24 14:07:49 +0300
commit8a8380fff3cbd8138a4e09b4d47a8717f14463a5 (patch)
tree7771abb80a90259db0a4a6cf8c7719d52d268d9b /drivers/staging
parent21cce84a7c3526ce6aa3186161ba574db7245ab6 (diff)
downloadlinux-8a8380fff3cbd8138a4e09b4d47a8717f14463a5.tar.xz
staging: r8188eu: update status before link blinking
Always update the status variables in rtw_led_control when we start link blinking. The if statements are not necessary. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/r8188eu/core/rtw_led.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 0881c81f4c74..98eebe3e4119 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -244,13 +244,11 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
return;
cancel_delayed_work(&pLed->blink_work);
- if (pLed->bLedNoLinkBlinkInProgress)
- pLed->bLedNoLinkBlinkInProgress = false;
-
- if (pLed->bLedBlinkInProgress)
- pLed->bLedBlinkInProgress = false;
+ pLed->bLedNoLinkBlinkInProgress = false;
+ pLed->bLedBlinkInProgress = false;
pLed->bLedLinkBlinkInProgress = true;
+
pLed->CurrLedState = LED_BLINK_NORMAL;
if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF;