mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
staging: r8188eu: summarize tx/rx and scan blinking
Summarize the code for tx/rx blinking and for scan blinking in blink_work. The only difference is the delay for scheduling the next worker. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
126647d113
commit
e1445e7b00
@@ -81,21 +81,6 @@ static void blink_work(struct work_struct *work)
|
||||
schedule_delayed_work(&pLed->blink_work, LED_BLINK_LINK_INTVL);
|
||||
break;
|
||||
case LED_BLINK_SCAN:
|
||||
pLed->BlinkTimes--;
|
||||
if (pLed->BlinkTimes == 0) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||
pLed->CurrLedState = LED_BLINK_NORMAL;
|
||||
schedule_delayed_work(&pLed->blink_work, LED_BLINK_LINK_INTVL);
|
||||
} else {
|
||||
pLed->CurrLedState = LED_BLINK_SLOWLY;
|
||||
schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL);
|
||||
}
|
||||
pLed->bLedBlinkInProgress = false;
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
} else {
|
||||
schedule_delayed_work(&pLed->blink_work, LED_BLINK_SCAN_INTVL);
|
||||
}
|
||||
break;
|
||||
case LED_BLINK_TXRX:
|
||||
pLed->BlinkTimes--;
|
||||
if (pLed->BlinkTimes == 0) {
|
||||
@@ -109,7 +94,9 @@ static void blink_work(struct work_struct *work)
|
||||
pLed->bLedBlinkInProgress = false;
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
} else {
|
||||
schedule_delayed_work(&pLed->blink_work, LED_BLINK_FASTER_INTVL);
|
||||
schedule_delayed_work(&pLed->blink_work,
|
||||
pLed->CurrLedState == LED_BLINK_SCAN ?
|
||||
LED_BLINK_SCAN_INTVL : LED_BLINK_FASTER_INTVL);
|
||||
}
|
||||
break;
|
||||
case LED_BLINK_WPS:
|
||||
|
||||
Reference in New Issue
Block a user