Commit 126647d1 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: set two more state variables

Set two more state variables in the blink worker when scan blinking and
tx/rx blinking are finished.

bLedBlinkInProgress is true during tx/rx blinking, bLedScanBlinkInProgress
is true during scan blinking. If we doing neither of the two, we may
safely set both variables to false.

This change makes the scan and tx/rx cases almost identical, we are now
ready to summarize the two cases.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221015151115.232095-10-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1188cfa6
...@@ -90,6 +90,7 @@ static void blink_work(struct work_struct *work) ...@@ -90,6 +90,7 @@ static void blink_work(struct work_struct *work)
pLed->CurrLedState = LED_BLINK_SLOWLY; pLed->CurrLedState = LED_BLINK_SLOWLY;
schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL); schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL);
} }
pLed->bLedBlinkInProgress = false;
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} else { } else {
schedule_delayed_work(&pLed->blink_work, LED_BLINK_SCAN_INTVL); schedule_delayed_work(&pLed->blink_work, LED_BLINK_SCAN_INTVL);
...@@ -106,6 +107,7 @@ static void blink_work(struct work_struct *work) ...@@ -106,6 +107,7 @@ static void blink_work(struct work_struct *work)
schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL); schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL);
} }
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
pLed->bLedScanBlinkInProgress = false;
} else { } else {
schedule_delayed_work(&pLed->blink_work, LED_BLINK_FASTER_INTVL); schedule_delayed_work(&pLed->blink_work, LED_BLINK_FASTER_INTVL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment