From 0c1d83c495d04658c25e5ccc90109dae452fa441 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 27 Sep 2016 16:51:49 -0500 Subject: [PATCH] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace Adding led support for phy causes namespace conflicts for some phy drivers. The rtl871 driver declared an enum for representing LED states. The enum contains constant LED_OFF which conflicted with declaration found in linux/leds.h. LED_OFF changed to LED_STATE_OFF In order to avoid a possible future collision LED_ON was changed to LED_STATE_ON as well. Signed-off-by: Zach Brown Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl8712_led.c | 388 +++++++++++++------------- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index a6cbfdc487a4..a8e237e480c9 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -51,8 +51,8 @@ */ enum _LED_STATE_871x { LED_UNKNOWN = 0, - LED_ON = 1, - LED_OFF = 2, + LED_STATE_ON = 1, + LED_STATE_OFF = 2, LED_BLINK_NORMAL = 3, LED_BLINK_SLOWLY = 4, LED_POWER_ON_BLINK = 5, @@ -94,7 +94,7 @@ static void InitLed871x(struct _adapter *padapter, struct LED_871x *pLed, nic = padapter->pnetdev; pLed->padapter = padapter; pLed->LedPin = LedPin; - pLed->CurrLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; pLed->bLedOn = false; pLed->bLedBlinkInProgress = false; pLed->BlinkTimes = 0; @@ -211,7 +211,7 @@ static void SwLedBlink(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); @@ -251,10 +251,10 @@ static void SwLedBlink(struct LED_871x *pLed) pLed->bLedBlinkInProgress = false; } else { /* Assign LED state to toggle. */ - if (pLed->BlinkingLedState == LED_ON) - pLed->BlinkingLedState = LED_OFF; + if (pLed->BlinkingLedState == LED_STATE_ON) + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; /* Schedule a timer to toggle LED state. */ switch (pLed->CurrLedState) { @@ -291,7 +291,7 @@ static void SwLedBlink1(struct LED_871x *pLed) if (peeprompriv->CustomerID == RT_CID_819x_CAMEO) pLed = &(ledpriv->SwLed1); /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); @@ -315,17 +315,17 @@ static void SwLedBlink1(struct LED_871x *pLed) switch (pLed->CurrLedState) { case LED_BLINK_SLOWLY: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); break; case LED_BLINK_NORMAL: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); break; @@ -338,27 +338,27 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); } pLed->bLedScanBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -372,18 +372,18 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); } @@ -391,24 +391,24 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_BLINK_WPS: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); break; case LED_BLINK_WPS_STOP: /* WPS success */ - if (pLed->BlinkingLedState == LED_ON) { - pLed->BlinkingLedState = LED_OFF; + if (pLed->BlinkingLedState == LED_STATE_ON) { + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA)); bStopBlinking = false; @@ -419,9 +419,9 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); } @@ -439,7 +439,7 @@ static void SwLedBlink2(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); @@ -450,20 +450,20 @@ static void SwLedBlink2(struct LED_871x *pLed) bStopBlinking = true; if (bStopBlinking) { if (check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; SwLedOn(padapter, pLed); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; SwLedOff(padapter, pLed); } pLed->bLedScanBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -474,20 +474,20 @@ static void SwLedBlink2(struct LED_871x *pLed) bStopBlinking = true; if (bStopBlinking) { if (check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; SwLedOn(padapter, pLed); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; SwLedOff(padapter, pLed); } pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -504,7 +504,7 @@ static void SwLedBlink3(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else if (pLed->CurrLedState != LED_BLINK_WPS_STOP) @@ -516,22 +516,22 @@ static void SwLedBlink3(struct LED_871x *pLed) bStopBlinking = true; if (bStopBlinking) { if (check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (!pLed->bLedOn) SwLedOn(padapter, pLed); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedOn) SwLedOff(padapter, pLed); } pLed->bLedScanBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -542,37 +542,37 @@ static void SwLedBlink3(struct LED_871x *pLed) bStopBlinking = true; if (bStopBlinking) { if (check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (!pLed->bLedOn) SwLedOn(padapter, pLed); } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedOn) SwLedOff(padapter, pLed); } pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_BLINK_WPS: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); break; case LED_BLINK_WPS_STOP: /*WPS success*/ - if (pLed->BlinkingLedState == LED_ON) { - pLed->BlinkingLedState = LED_OFF; + if (pLed->BlinkingLedState == LED_STATE_ON) { + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA)); bStopBlinking = false; @@ -580,8 +580,8 @@ static void SwLedBlink3(struct LED_871x *pLed) bStopBlinking = true; } if (bStopBlinking) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; SwLedOn(padapter, pLed); pLed->bLedWPSBlinkInProgress = false; } @@ -599,32 +599,32 @@ static void SwLedBlink4(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); if (!pLed1->bLedWPSBlinkInProgress && pLed1->BlinkingLedState == LED_UNKNOWN) { - pLed1->BlinkingLedState = LED_OFF; - pLed1->CurrLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; + pLed1->CurrLedState = LED_STATE_OFF; SwLedOff(padapter, pLed1); } switch (pLed->CurrLedState) { case LED_BLINK_SLOWLY: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); break; case LED_BLINK_StartToBlink: if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); } @@ -637,17 +637,17 @@ static void SwLedBlink4(struct LED_871x *pLed) pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); pLed->bLedScanBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -660,37 +660,37 @@ static void SwLedBlink4(struct LED_871x *pLed) pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_BLINK_WPS: if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); } break; case LED_BLINK_WPS_STOP: /*WPS authentication fail*/ if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); break; @@ -704,14 +704,14 @@ static void SwLedBlink4(struct LED_871x *pLed) } if (bStopBlinking) { pLed->BlinkTimes = 10; - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); } @@ -727,7 +727,7 @@ static void SwLedBlink5(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); @@ -737,17 +737,17 @@ static void SwLedBlink5(struct LED_871x *pLed) if (pLed->BlinkTimes == 0) bStopBlinking = true; if (bStopBlinking) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (!pLed->bLedOn) mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); pLed->bLedScanBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -757,17 +757,17 @@ static void SwLedBlink5(struct LED_871x *pLed) if (pLed->BlinkTimes == 0) bStopBlinking = true; if (bStopBlinking) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (!pLed->bLedOn) mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -783,7 +783,7 @@ static void SwLedBlink6(struct LED_871x *pLed) u8 bStopBlinking = false; /* Change LED according to BlinkingLedState specified. */ - if (pLed->BlinkingLedState == LED_ON) + if (pLed->BlinkingLedState == LED_STATE_ON) SwLedOn(padapter, pLed); else SwLedOff(padapter, pLed); @@ -793,25 +793,25 @@ static void SwLedBlink6(struct LED_871x *pLed) if (pLed->BlinkTimes == 0) bStopBlinking = true; if (bStopBlinking) { - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (!pLed->bLedOn) SwLedOn(padapter, pLed); pLed->bLedBlinkInProgress = false; } else { if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_BLINK_WPS: if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); break; @@ -912,9 +912,9 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); } @@ -935,9 +935,9 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->bLedLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_NORMAL; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA)); } @@ -965,9 +965,9 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->CurrLedState = LED_SCAN_BLINK; pLed->BlinkTimes = 24; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -990,9 +990,9 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -1020,9 +1020,9 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1050,11 +1050,11 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); } @@ -1067,15 +1067,15 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedNoLinkBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedNoLinkBlinkInProgress = false; @@ -1127,9 +1127,9 @@ static void SwLedControlMode2(struct _adapter *padapter, pLed->CurrLedState = LED_SCAN_BLINK; pLed->BlinkTimes = 24; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1146,17 +1146,17 @@ static void SwLedControlMode2(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_CTL_LINK: - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; @@ -1182,8 +1182,8 @@ static void SwLedControlMode2(struct _adapter *padapter, pLed->bLedScanBlinkInProgress = false; } pLed->bLedWPSBlinkInProgress = true; - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); } @@ -1191,16 +1191,16 @@ static void SwLedControlMode2(struct _adapter *padapter, case LED_CTL_STOP_WPS: pLed->bLedWPSBlinkInProgress = false; - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); break; case LED_CTL_STOP_WPS_FAIL: pLed->bLedWPSBlinkInProgress = false; - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); break; @@ -1208,15 +1208,15 @@ static void SwLedControlMode2(struct _adapter *padapter, case LED_CTL_START_TO_LINK: case LED_CTL_NO_LINK: if (!IS_LED_BLINKING(pLed)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); } break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; @@ -1259,9 +1259,9 @@ static void SwLedControlMode3(struct _adapter *padapter, pLed->CurrLedState = LED_SCAN_BLINK; pLed->BlinkTimes = 24; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1277,9 +1277,9 @@ static void SwLedControlMode3(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -1287,8 +1287,8 @@ static void SwLedControlMode3(struct _adapter *padapter, case LED_CTL_LINK: if (IS_LED_WPS_BLINKING(pLed)) return; - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; @@ -1314,9 +1314,9 @@ static void SwLedControlMode3(struct _adapter *padapter, pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1330,11 +1330,11 @@ static void SwLedControlMode3(struct _adapter *padapter, } pLed->CurrLedState = LED_BLINK_WPS_STOP; if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); } @@ -1344,23 +1344,23 @@ static void SwLedControlMode3(struct _adapter *padapter, del_timer(&pLed->BlinkTimer); pLed->bLedWPSBlinkInProgress = false; } - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); break; case LED_CTL_START_TO_LINK: case LED_CTL_NO_LINK: if (!IS_LED_BLINKING(pLed)) { - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); } break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; @@ -1394,8 +1394,8 @@ static void SwLedControlMode4(struct _adapter *padapter, if (pLed1->bLedWPSBlinkInProgress) { pLed1->bLedWPSBlinkInProgress = false; del_timer(&pLed1->BlinkTimer); - pLed1->BlinkingLedState = LED_OFF; - pLed1->CurrLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; + pLed1->CurrLedState = LED_STATE_OFF; if (pLed1->bLedOn) mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); @@ -1415,11 +1415,11 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedStartToLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_StartToBlink; if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); } @@ -1432,8 +1432,8 @@ static void SwLedControlMode4(struct _adapter *padapter, if (pLed1->bLedWPSBlinkInProgress) { pLed1->bLedWPSBlinkInProgress = false; del_timer(&pLed1->BlinkTimer); - pLed1->BlinkingLedState = LED_OFF; - pLed1->CurrLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; + pLed1->CurrLedState = LED_STATE_OFF; if (pLed1->bLedOn) mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); @@ -1450,9 +1450,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); } @@ -1476,9 +1476,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->CurrLedState = LED_SCAN_BLINK; pLed->BlinkTimes = 24; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1497,9 +1497,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -1509,8 +1509,8 @@ static void SwLedControlMode4(struct _adapter *padapter, if (pLed1->bLedWPSBlinkInProgress) { pLed1->bLedWPSBlinkInProgress = false; del_timer(&pLed1->BlinkTimer); - pLed1->BlinkingLedState = LED_OFF; - pLed1->CurrLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; + pLed1->CurrLedState = LED_STATE_OFF; if (pLed1->bLedOn) mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); @@ -1531,11 +1531,11 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) { - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL)); } else { - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); } @@ -1549,9 +1549,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); break; @@ -1563,9 +1563,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); /*LED1 settings*/ @@ -1575,9 +1575,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed1->bLedWPSBlinkInProgress = true; pLed1->CurrLedState = LED_BLINK_WPS_STOP; if (pLed1->bLedOn) - pLed1->BlinkingLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; else - pLed1->BlinkingLedState = LED_ON; + pLed1->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); break; @@ -1589,9 +1589,9 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed->bLedNoLinkBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_SLOWLY; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); /*LED1 settings*/ @@ -1602,15 +1602,15 @@ static void SwLedControlMode4(struct _adapter *padapter, pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP; pLed1->BlinkTimes = 10; if (pLed1->bLedOn) - pLed1->BlinkingLedState = LED_OFF; + pLed1->BlinkingLedState = LED_STATE_OFF; else - pLed1->BlinkingLedState = LED_ON; + pLed1->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL)); break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedNoLinkBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedNoLinkBlinkInProgress = false; @@ -1664,8 +1664,8 @@ static void SwLedControlMode5(struct _adapter *padapter, case LED_CTL_LINK: /* solid blue */ if (pLed->CurrLedState == LED_SCAN_BLINK) return; - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; pLed->bLedBlinkInProgress = false; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); @@ -1683,9 +1683,9 @@ static void SwLedControlMode5(struct _adapter *padapter, pLed->CurrLedState = LED_SCAN_BLINK; pLed->BlinkTimes = 24; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1699,16 +1699,16 @@ static void SwLedControlMode5(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; @@ -1735,8 +1735,8 @@ static void SwLedControlMode6(struct _adapter *padapter, case LED_CTL_SITE_SURVEY: if (IS_LED_WPS_BLINKING(pLed)) return; - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; pLed->bLedBlinkInProgress = false; mod_timer(&(pLed->BlinkTimer), jiffies + msecs_to_jiffies(0)); break; @@ -1750,9 +1750,9 @@ static void SwLedControlMode6(struct _adapter *padapter, pLed->CurrLedState = LED_TXRX_BLINK; pLed->BlinkTimes = 2; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); } @@ -1767,9 +1767,9 @@ static void SwLedControlMode6(struct _adapter *padapter, pLed->bLedWPSBlinkInProgress = true; pLed->CurrLedState = LED_BLINK_WPS; if (pLed->bLedOn) - pLed->BlinkingLedState = LED_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; else - pLed->BlinkingLedState = LED_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); } @@ -1780,14 +1780,14 @@ static void SwLedControlMode6(struct _adapter *padapter, del_timer(&pLed->BlinkTimer); pLed->bLedWPSBlinkInProgress = false; } - pLed->CurrLedState = LED_ON; - pLed->BlinkingLedState = LED_ON; + pLed->CurrLedState = LED_STATE_ON; + pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); break; case LED_CTL_POWER_OFF: - pLed->CurrLedState = LED_OFF; - pLed->BlinkingLedState = LED_OFF; + pLed->CurrLedState = LED_STATE_OFF; + pLed->BlinkingLedState = LED_STATE_OFF; if (pLed->bLedBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedBlinkInProgress = false; -- 2.20.1