Commit f6cf663a authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: remove unnecessary parentheses in core/rtw_led.c

Remove unnecessary parentheses in core/rtw_led.c reported by
checkpatch.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210809165007.23204-7-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5f7cd5f
...@@ -17,7 +17,7 @@ void BlinkTimerCallback(struct timer_list *t) ...@@ -17,7 +17,7 @@ void BlinkTimerCallback(struct timer_list *t)
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped)) if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
return; return;
_set_workitem(&(pLed->BlinkWorkItem)); _set_workitem(&pLed->BlinkWorkItem);
} }
/* */ /* */
...@@ -62,7 +62,7 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_8 ...@@ -62,7 +62,7 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_8
ResetLedStatus(pLed); ResetLedStatus(pLed);
timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0); timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0);
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed); _init_workitem(&pLed->BlinkWorkItem, BlinkWorkItemCallback, pLed);
} }
/* */ /* */
...@@ -71,8 +71,8 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_8 ...@@ -71,8 +71,8 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_8
/* */ /* */
void DeInitLed871x(struct LED_871x *pLed) void DeInitLed871x(struct LED_871x *pLed)
{ {
_cancel_workitem_sync(&(pLed->BlinkWorkItem)); _cancel_workitem_sync(&pLed->BlinkWorkItem);
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
ResetLedStatus(pLed); ResetLedStatus(pLed);
} }
...@@ -85,7 +85,7 @@ void DeInitLed871x(struct LED_871x *pLed) ...@@ -85,7 +85,7 @@ void DeInitLed871x(struct LED_871x *pLed)
static void SwLedBlink(struct LED_871x *pLed) static void SwLedBlink(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
...@@ -141,20 +141,20 @@ static void SwLedBlink(struct LED_871x *pLed) ...@@ -141,20 +141,20 @@ static void SwLedBlink(struct LED_871x *pLed)
/* Schedule a timer to toggle LED state. */ /* Schedule a timer to toggle LED state. */
switch (pLed->CurrLedState) { switch (pLed->CurrLedState) {
case LED_BLINK_NORMAL: case LED_BLINK_NORMAL:
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
break; break;
case LED_BLINK_SLOWLY: case LED_BLINK_SLOWLY:
case LED_BLINK_StartToBlink: case LED_BLINK_StartToBlink:
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
break; break;
case LED_BLINK_WPS: case LED_BLINK_WPS:
if (pLed->BlinkingLedState == RTW_LED_ON) if (pLed->BlinkingLedState == RTW_LED_ON)
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LONG_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_LONG_INTERVAL);
else else
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LONG_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_LONG_INTERVAL);
break; break;
default: default:
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
break; break;
} }
} }
...@@ -163,7 +163,7 @@ static void SwLedBlink(struct LED_871x *pLed) ...@@ -163,7 +163,7 @@ static void SwLedBlink(struct LED_871x *pLed)
static void SwLedBlink1(struct LED_871x *pLed) static void SwLedBlink1(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
...@@ -184,14 +184,14 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -184,14 +184,14 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
break; break;
case LED_BLINK_NORMAL: case LED_BLINK_NORMAL:
if (pLed->bLedOn) if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
break; break;
case LED_BLINK_SCAN: case LED_BLINK_SCAN:
pLed->BlinkTimes--; pLed->BlinkTimes--;
...@@ -205,7 +205,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -205,7 +205,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
} else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
pLed->bLedNoLinkBlinkInProgress = true; pLed->bLedNoLinkBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_SLOWLY; pLed->CurrLedState = LED_BLINK_SLOWLY;
...@@ -213,7 +213,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -213,7 +213,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} else { } else {
...@@ -221,7 +221,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -221,7 +221,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_BLINK_TXRX: case LED_BLINK_TXRX:
...@@ -236,7 +236,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -236,7 +236,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
} else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
pLed->bLedNoLinkBlinkInProgress = true; pLed->bLedNoLinkBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_SLOWLY; pLed->CurrLedState = LED_BLINK_SLOWLY;
...@@ -244,7 +244,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -244,7 +244,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
pLed->BlinkTimes = 0; pLed->BlinkTimes = 0;
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
...@@ -253,7 +253,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -253,7 +253,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_BLINK_WPS: case LED_BLINK_WPS:
...@@ -261,7 +261,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -261,7 +261,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
break; break;
case LED_BLINK_WPS_STOP: /* WPS success */ case LED_BLINK_WPS_STOP: /* WPS success */
if (pLed->BlinkingLedState == RTW_LED_ON) if (pLed->BlinkingLedState == RTW_LED_ON)
...@@ -276,12 +276,12 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -276,12 +276,12 @@ static void SwLedBlink1(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} else { } else {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
} }
break; break;
default: default:
...@@ -292,7 +292,7 @@ static void SwLedBlink1(struct LED_871x *pLed) ...@@ -292,7 +292,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
static void SwLedBlink2(struct LED_871x *pLed) static void SwLedBlink2(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
...@@ -327,7 +327,7 @@ static void SwLedBlink2(struct LED_871x *pLed) ...@@ -327,7 +327,7 @@ static void SwLedBlink2(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -356,7 +356,7 @@ static void SwLedBlink2(struct LED_871x *pLed) ...@@ -356,7 +356,7 @@ static void SwLedBlink2(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -368,7 +368,7 @@ static void SwLedBlink2(struct LED_871x *pLed) ...@@ -368,7 +368,7 @@ static void SwLedBlink2(struct LED_871x *pLed)
static void SwLedBlink3(struct LED_871x *pLed) static void SwLedBlink3(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
...@@ -407,7 +407,7 @@ static void SwLedBlink3(struct LED_871x *pLed) ...@@ -407,7 +407,7 @@ static void SwLedBlink3(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -439,7 +439,7 @@ static void SwLedBlink3(struct LED_871x *pLed) ...@@ -439,7 +439,7 @@ static void SwLedBlink3(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -448,12 +448,12 @@ static void SwLedBlink3(struct LED_871x *pLed) ...@@ -448,12 +448,12 @@ static void SwLedBlink3(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
break; break;
case LED_BLINK_WPS_STOP: /* WPS success */ case LED_BLINK_WPS_STOP: /* WPS success */
if (pLed->BlinkingLedState == RTW_LED_ON) { if (pLed->BlinkingLedState == RTW_LED_ON) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
bStopBlinking = false; bStopBlinking = false;
} else { } else {
bStopBlinking = true; bStopBlinking = true;
...@@ -477,8 +477,8 @@ static void SwLedBlink3(struct LED_871x *pLed) ...@@ -477,8 +477,8 @@ static void SwLedBlink3(struct LED_871x *pLed)
static void SwLedBlink4(struct LED_871x *pLed) static void SwLedBlink4(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct LED_871x *pLed1 = &(ledpriv->SwLed1); struct LED_871x *pLed1 = &ledpriv->SwLed1;
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
...@@ -499,15 +499,15 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -499,15 +499,15 @@ static void SwLedBlink4(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
break; break;
case LED_BLINK_StartToBlink: case LED_BLINK_StartToBlink:
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
} }
break; break;
case LED_BLINK_SCAN: case LED_BLINK_SCAN:
...@@ -524,7 +524,7 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -524,7 +524,7 @@ static void SwLedBlink4(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} else { } else {
...@@ -535,7 +535,7 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -535,7 +535,7 @@ static void SwLedBlink4(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -553,7 +553,7 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -553,7 +553,7 @@ static void SwLedBlink4(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} else { } else {
...@@ -564,17 +564,17 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -564,17 +564,17 @@ static void SwLedBlink4(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
} }
break; break;
case LED_BLINK_WPS: case LED_BLINK_WPS:
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
} }
break; break;
case LED_BLINK_WPS_STOP: /* WPS authentication fail */ case LED_BLINK_WPS_STOP: /* WPS authentication fail */
...@@ -583,7 +583,7 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -583,7 +583,7 @@ static void SwLedBlink4(struct LED_871x *pLed)
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
break; break;
case LED_BLINK_WPS_STOP_OVERLAP: /* WPS session overlap */ case LED_BLINK_WPS_STOP_OVERLAP: /* WPS session overlap */
pLed->BlinkTimes--; pLed->BlinkTimes--;
...@@ -597,14 +597,14 @@ static void SwLedBlink4(struct LED_871x *pLed) ...@@ -597,14 +597,14 @@ static void SwLedBlink4(struct LED_871x *pLed)
if (bStopBlinking) { if (bStopBlinking) {
pLed->BlinkTimes = 10; pLed->BlinkTimes = 10;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
} else { } else {
if (pLed->bLedOn) if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
} }
break; break;
default: default:
...@@ -639,7 +639,7 @@ static void SwLedBlink5(struct LED_871x *pLed) ...@@ -639,7 +639,7 @@ static void SwLedBlink5(struct LED_871x *pLed)
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
if (!pLed->bLedOn) if (!pLed->bLedOn)
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
...@@ -651,7 +651,7 @@ static void SwLedBlink5(struct LED_871x *pLed) ...@@ -651,7 +651,7 @@ static void SwLedBlink5(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -670,7 +670,7 @@ static void SwLedBlink5(struct LED_871x *pLed) ...@@ -670,7 +670,7 @@ static void SwLedBlink5(struct LED_871x *pLed)
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
if (!pLed->bLedOn) if (!pLed->bLedOn)
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
...@@ -682,7 +682,7 @@ static void SwLedBlink5(struct LED_871x *pLed) ...@@ -682,7 +682,7 @@ static void SwLedBlink5(struct LED_871x *pLed)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
} }
break; break;
...@@ -706,9 +706,9 @@ static void SwLedBlink6(struct LED_871x *pLed) ...@@ -706,9 +706,9 @@ static void SwLedBlink6(struct LED_871x *pLed)
/* ALPHA, added by chiyoko, 20090106 */ /* ALPHA, added by chiyoko, 20090106 */
static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAction) static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct LED_871x *pLed = &(ledpriv->SwLed0); struct LED_871x *pLed = &ledpriv->SwLed0;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
switch (LedAction) { switch (LedAction) {
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
...@@ -718,11 +718,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -718,11 +718,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
...@@ -732,7 +732,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -732,7 +732,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_LINK: case LED_CTL_LINK:
...@@ -740,11 +740,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -740,11 +740,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedLinkBlinkInProgress = true; pLed->bLedLinkBlinkInProgress = true;
...@@ -753,7 +753,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -753,7 +753,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_LINK_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
...@@ -763,15 +763,15 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -763,15 +763,15 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (IS_LED_WPS_BLINKING(pLed)) if (IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedScanBlinkInProgress = true; pLed->bLedScanBlinkInProgress = true;
...@@ -781,7 +781,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -781,7 +781,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_TX: case LED_CTL_TX:
...@@ -790,11 +790,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -790,11 +790,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
pLed->bLedBlinkInProgress = true; pLed->bLedBlinkInProgress = true;
...@@ -804,26 +804,26 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -804,26 +804,26 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS: /* wait until xinpin finish */
case LED_CTL_START_WPS_BOTTON: case LED_CTL_START_WPS_BOTTON:
if (!pLed->bLedWPSBlinkInProgress) { if (!pLed->bLedWPSBlinkInProgress) {
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
...@@ -832,42 +832,42 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -832,42 +832,42 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_STOP_WPS: case LED_CTL_STOP_WPS:
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
if (pLed->bLedWPSBlinkInProgress) if (pLed->bLedWPSBlinkInProgress)
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
else else
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_WPS_STOP; pLed->CurrLedState = LED_BLINK_WPS_STOP;
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_STOP_WPS_FAIL: case LED_CTL_STOP_WPS_FAIL:
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
pLed->bLedNoLinkBlinkInProgress = true; pLed->bLedNoLinkBlinkInProgress = true;
...@@ -876,29 +876,29 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -876,29 +876,29 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
SwLedOff(padapter, pLed); SwLedOff(padapter, pLed);
...@@ -911,9 +911,9 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -911,9 +911,9 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
/* Arcadyan/Sitecom , added by chiyoko, 20090216 */ /* Arcadyan/Sitecom , added by chiyoko, 20090216 */
static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAction) static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct LED_871x *pLed = &(ledpriv->SwLed0); struct LED_871x *pLed = &ledpriv->SwLed0;
switch (LedAction) { switch (LedAction) {
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
...@@ -923,7 +923,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -923,7 +923,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
return; return;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedScanBlinkInProgress = true; pLed->bLedScanBlinkInProgress = true;
...@@ -933,7 +933,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -933,7 +933,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_TX: case LED_CTL_TX:
...@@ -948,37 +948,37 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -948,37 +948,37 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_LINK: case LED_CTL_LINK:
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS: /* wait until xinpin finish */
case LED_CTL_START_WPS_BOTTON: case LED_CTL_START_WPS_BOTTON:
if (!pLed->bLedWPSBlinkInProgress) { if (!pLed->bLedWPSBlinkInProgress) {
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_STOP_WPS: case LED_CTL_STOP_WPS:
...@@ -988,7 +988,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -988,7 +988,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
} else { } else {
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_STOP_WPS_FAIL: case LED_CTL_STOP_WPS_FAIL:
...@@ -998,7 +998,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -998,7 +998,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
} else { } else {
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
...@@ -1006,26 +1006,26 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1006,26 +1006,26 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (!IS_LED_BLINKING(pLed)) { if (!IS_LED_BLINKING(pLed)) {
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
default: default:
break; break;
...@@ -1035,9 +1035,9 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1035,9 +1035,9 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
/* COREGA, added by chiyoko, 20090316 */ /* COREGA, added by chiyoko, 20090316 */
static void SwLedControlMode3(struct adapter *padapter, enum LED_CTL_MODE LedAction) static void SwLedControlMode3(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct LED_871x *pLed = &(ledpriv->SwLed0); struct LED_871x *pLed = &ledpriv->SwLed0;
switch (LedAction) { switch (LedAction) {
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
...@@ -1047,7 +1047,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1047,7 +1047,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
return; return;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedScanBlinkInProgress = true; pLed->bLedScanBlinkInProgress = true;
...@@ -1057,7 +1057,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1057,7 +1057,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_TX: case LED_CTL_TX:
...@@ -1072,7 +1072,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1072,7 +1072,7 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_LINK: case LED_CTL_LINK:
...@@ -1081,25 +1081,25 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1081,25 +1081,25 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS: /* wait until xinpin finish */
case LED_CTL_START_WPS_BOTTON: case LED_CTL_START_WPS_BOTTON:
if (!pLed->bLedWPSBlinkInProgress) { if (!pLed->bLedWPSBlinkInProgress) {
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
...@@ -1108,12 +1108,12 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1108,12 +1108,12 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_STOP_WPS: case LED_CTL_STOP_WPS:
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} else { } else {
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
...@@ -1122,46 +1122,46 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1122,46 +1122,46 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->CurrLedState = LED_BLINK_WPS_STOP; pLed->CurrLedState = LED_BLINK_WPS_STOP;
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_STOP_WPS_FAIL: case LED_CTL_STOP_WPS_FAIL:
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
if (!IS_LED_BLINKING(pLed)) { if (!IS_LED_BLINKING(pLed)) {
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
default: default:
break; break;
...@@ -1171,33 +1171,33 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1171,33 +1171,33 @@ static void SwLedControlMode2(struct adapter *padapter, enum LED_CTL_MODE LedAct
/* Edimax-Belkin, added by chiyoko, 20090413 */ /* Edimax-Belkin, added by chiyoko, 20090413 */
static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAction) static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct LED_871x *pLed = &(ledpriv->SwLed0); struct LED_871x *pLed = &ledpriv->SwLed0;
struct LED_871x *pLed1 = &(ledpriv->SwLed1); struct LED_871x *pLed1 = &ledpriv->SwLed1;
switch (LedAction) { switch (LedAction) {
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
if (pLed1->bLedWPSBlinkInProgress) { if (pLed1->bLedWPSBlinkInProgress) {
pLed1->bLedWPSBlinkInProgress = false; pLed1->bLedWPSBlinkInProgress = false;
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
pLed1->BlinkingLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF;
pLed1->CurrLedState = RTW_LED_OFF; pLed1->CurrLedState = RTW_LED_OFF;
if (pLed1->bLedOn) if (pLed1->bLedOn)
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
if (!pLed->bLedStartToLinkBlinkInProgress) { if (!pLed->bLedStartToLinkBlinkInProgress) {
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
...@@ -1205,10 +1205,10 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1205,10 +1205,10 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->CurrLedState = LED_BLINK_StartToBlink; pLed->CurrLedState = LED_BLINK_StartToBlink;
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
} }
} }
break; break;
...@@ -1218,13 +1218,13 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1218,13 +1218,13 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (LedAction == LED_CTL_LINK) { if (LedAction == LED_CTL_LINK) {
if (pLed1->bLedWPSBlinkInProgress) { if (pLed1->bLedWPSBlinkInProgress) {
pLed1->bLedWPSBlinkInProgress = false; pLed1->bLedWPSBlinkInProgress = false;
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
pLed1->BlinkingLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF;
pLed1->CurrLedState = RTW_LED_OFF; pLed1->CurrLedState = RTW_LED_OFF;
if (pLed1->bLedOn) if (pLed1->bLedOn)
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
} }
...@@ -1232,7 +1232,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1232,7 +1232,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
...@@ -1242,7 +1242,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1242,7 +1242,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
...@@ -1252,11 +1252,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1252,11 +1252,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
return; return;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedScanBlinkInProgress = true; pLed->bLedScanBlinkInProgress = true;
...@@ -1266,7 +1266,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1266,7 +1266,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_TX: case LED_CTL_TX:
...@@ -1275,7 +1275,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1275,7 +1275,7 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
return; return;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
pLed->bLedBlinkInProgress = true; pLed->bLedBlinkInProgress = true;
...@@ -1285,49 +1285,49 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1285,49 +1285,49 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_START_WPS: /* wait until xinpin finish */ case LED_CTL_START_WPS: /* wait until xinpin finish */
case LED_CTL_START_WPS_BOTTON: case LED_CTL_START_WPS_BOTTON:
if (pLed1->bLedWPSBlinkInProgress) { if (pLed1->bLedWPSBlinkInProgress) {
pLed1->bLedWPSBlinkInProgress = false; pLed1->bLedWPSBlinkInProgress = false;
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
pLed1->BlinkingLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF;
pLed1->CurrLedState = RTW_LED_OFF; pLed1->CurrLedState = RTW_LED_OFF;
if (pLed1->bLedOn) if (pLed1->bLedOn)
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
} }
if (!pLed->bLedWPSBlinkInProgress) { if (!pLed->bLedWPSBlinkInProgress) {
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_WPS; pLed->CurrLedState = LED_BLINK_WPS;
if (pLed->bLedOn) { if (pLed->bLedOn) {
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_SLOWLY_INTERVAL);
} else { } else {
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
} }
} }
break; break;
case LED_CTL_STOP_WPS: /* WPS connect success */ case LED_CTL_STOP_WPS: /* WPS connect success */
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
...@@ -1337,12 +1337,12 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1337,12 +1337,12 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
break; break;
case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */ case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
pLed->bLedNoLinkBlinkInProgress = true; pLed->bLedNoLinkBlinkInProgress = true;
...@@ -1351,11 +1351,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1351,11 +1351,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
/* LED1 settings */ /* LED1 settings */
if (pLed1->bLedWPSBlinkInProgress) if (pLed1->bLedWPSBlinkInProgress)
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
else else
pLed1->bLedWPSBlinkInProgress = true; pLed1->bLedWPSBlinkInProgress = true;
pLed1->CurrLedState = LED_BLINK_WPS_STOP; pLed1->CurrLedState = LED_BLINK_WPS_STOP;
...@@ -1363,11 +1363,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1363,11 +1363,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed1->BlinkingLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF;
else else
pLed1->BlinkingLedState = RTW_LED_ON; pLed1->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
break; break;
case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */ case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
pLed->bLedNoLinkBlinkInProgress = true; pLed->bLedNoLinkBlinkInProgress = true;
...@@ -1376,11 +1376,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1376,11 +1376,11 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NO_LINK_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_NO_LINK_INTERVAL_ALPHA);
/* LED1 settings */ /* LED1 settings */
if (pLed1->bLedWPSBlinkInProgress) if (pLed1->bLedWPSBlinkInProgress)
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
else else
pLed1->bLedWPSBlinkInProgress = true; pLed1->bLedWPSBlinkInProgress = true;
pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP; pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP;
...@@ -1389,38 +1389,38 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct ...@@ -1389,38 +1389,38 @@ static void SwLedControlMode4(struct adapter *padapter, enum LED_CTL_MODE LedAct
pLed1->BlinkingLedState = RTW_LED_OFF; pLed1->BlinkingLedState = RTW_LED_OFF;
else else
pLed1->BlinkingLedState = RTW_LED_ON; pLed1->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL); _set_timer(&pLed->BlinkTimer, LED_BLINK_NORMAL_INTERVAL);
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedNoLinkBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedNoLinkBlinkInProgress = false; pLed->bLedNoLinkBlinkInProgress = false;
} }
if (pLed->bLedLinkBlinkInProgress) { if (pLed->bLedLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedLinkBlinkInProgress = false; pLed->bLedLinkBlinkInProgress = false;
} }
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
if (pLed->bLedWPSBlinkInProgress) { if (pLed->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedWPSBlinkInProgress = false; pLed->bLedWPSBlinkInProgress = false;
} }
if (pLed->bLedScanBlinkInProgress) { if (pLed->bLedScanBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} }
if (pLed->bLedStartToLinkBlinkInProgress) { if (pLed->bLedStartToLinkBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedStartToLinkBlinkInProgress = false; pLed->bLedStartToLinkBlinkInProgress = false;
} }
if (pLed1->bLedWPSBlinkInProgress) { if (pLed1->bLedWPSBlinkInProgress) {
_cancel_timer_ex(&(pLed1->BlinkTimer)); _cancel_timer_ex(&pLed1->BlinkTimer);
pLed1->bLedWPSBlinkInProgress = false; pLed1->bLedWPSBlinkInProgress = false;
} }
pLed1->BlinkingLedState = LED_UNKNOWN; pLed1->BlinkingLedState = LED_UNKNOWN;
...@@ -1439,9 +1439,9 @@ SwLedControlMode5( ...@@ -1439,9 +1439,9 @@ SwLedControlMode5(
enum LED_CTL_MODE LedAction enum LED_CTL_MODE LedAction
) )
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct LED_871x *pLed = &(ledpriv->SwLed0); struct LED_871x *pLed = &ledpriv->SwLed0;
switch (LedAction) { switch (LedAction) {
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
...@@ -1450,13 +1450,13 @@ SwLedControlMode5( ...@@ -1450,13 +1450,13 @@ SwLedControlMode5(
pLed->CurrLedState = RTW_LED_ON; pLed->CurrLedState = RTW_LED_ON;
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), 0); _set_timer(&pLed->BlinkTimer, 0);
break; break;
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED))) { if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED))) {
} else if (!pLed->bLedScanBlinkInProgress) { } else if (!pLed->bLedScanBlinkInProgress) {
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
pLed->bLedScanBlinkInProgress = true; pLed->bLedScanBlinkInProgress = true;
...@@ -1466,7 +1466,7 @@ SwLedControlMode5( ...@@ -1466,7 +1466,7 @@ SwLedControlMode5(
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_SCAN_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_TX: case LED_CTL_TX:
...@@ -1481,7 +1481,7 @@ SwLedControlMode5( ...@@ -1481,7 +1481,7 @@ SwLedControlMode5(
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
pLed->BlinkingLedState = RTW_LED_ON; pLed->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA); _set_timer(&pLed->BlinkTimer, LED_BLINK_FASTER_INTERVAL_ALPHA);
} }
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
...@@ -1489,7 +1489,7 @@ SwLedControlMode5( ...@@ -1489,7 +1489,7 @@ SwLedControlMode5(
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedBlinkInProgress) { if (pLed->bLedBlinkInProgress) {
_cancel_timer_ex(&(pLed->BlinkTimer)); _cancel_timer_ex(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
SwLedOff(padapter, pLed); SwLedOff(padapter, pLed);
...@@ -1506,17 +1506,17 @@ SwLedControlMode6( ...@@ -1506,17 +1506,17 @@ SwLedControlMode6(
enum LED_CTL_MODE LedAction enum LED_CTL_MODE LedAction
) )
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct LED_871x *pLed0 = &(ledpriv->SwLed0); struct LED_871x *pLed0 = &ledpriv->SwLed0;
switch (LedAction) { switch (LedAction) {
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
case LED_CTL_LINK: case LED_CTL_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
_cancel_timer_ex(&(pLed0->BlinkTimer)); _cancel_timer_ex(&pLed0->BlinkTimer);
pLed0->CurrLedState = RTW_LED_ON; pLed0->CurrLedState = RTW_LED_ON;
pLed0->BlinkingLedState = RTW_LED_ON; pLed0->BlinkingLedState = RTW_LED_ON;
_set_timer(&(pLed0->BlinkTimer), 0); _set_timer(&pLed0->BlinkTimer, 0);
break; break;
case LED_CTL_POWER_OFF: case LED_CTL_POWER_OFF:
SwLedOff(padapter, pLed0); SwLedOff(padapter, pLed0);
...@@ -1534,7 +1534,7 @@ SwLedControlMode6( ...@@ -1534,7 +1534,7 @@ SwLedControlMode6(
void BlinkHandler(struct LED_871x *pLed) void BlinkHandler(struct LED_871x *pLed)
{ {
struct adapter *padapter = pLed->padapter; struct adapter *padapter = pLed->padapter;
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped)) if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
return; return;
...@@ -1568,7 +1568,7 @@ void BlinkHandler(struct LED_871x *pLed) ...@@ -1568,7 +1568,7 @@ void BlinkHandler(struct LED_871x *pLed)
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction) void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{ {
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &padapter->ledpriv;
struct registry_priv *registry_par; struct registry_priv *registry_par;
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) || if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) ||
......
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