|
|
|
@ -258,21 +258,21 @@ static void SwLedBlink(struct LED_871x *pLed)
|
|
|
|
|
/* Schedule a timer to toggle LED state. */
|
|
|
|
|
switch (pLed->CurrLedState) {
|
|
|
|
|
case LED_BLINK_NORMAL:
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_SLOWLY:
|
|
|
|
|
case LED_BLINK_StartToBlink:
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS:
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LONG_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_LONG_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -315,16 +315,16 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA));
|
|
|
|
|
break;
|
|
|
|
|
case LED_SCAN_BLINK:
|
|
|
|
|
pLed->BlinkTimes--;
|
|
|
|
@ -338,8 +338,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
@ -347,8 +347,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
pLed->bLedScanBlinkInProgress = false;
|
|
|
|
|
} else {
|
|
|
|
@ -356,8 +356,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_TXRX_BLINK:
|
|
|
|
@ -372,8 +372,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
@ -381,8 +381,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
pLed->BlinkTimes = 0;
|
|
|
|
|
pLed->bLedBlinkInProgress = false;
|
|
|
|
@ -391,8 +391,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS:
|
|
|
|
@ -400,14 +400,14 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
|
|
|
|
|
bStopBlinking = false;
|
|
|
|
|
} else
|
|
|
|
|
bStopBlinking = true;
|
|
|
|
@ -418,8 +418,8 @@ static void SwLedBlink1(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
pLed->bLedWPSBlinkInProgress = false;
|
|
|
|
|
break;
|
|
|
|
@ -460,8 +460,8 @@ static void SwLedBlink2(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_TXRX_BLINK:
|
|
|
|
@ -484,8 +484,8 @@ static void SwLedBlink2(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -528,8 +528,8 @@ static void SwLedBlink3(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_TXRX_BLINK:
|
|
|
|
@ -554,8 +554,8 @@ static void SwLedBlink3(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS:
|
|
|
|
@ -563,14 +563,14 @@ static void SwLedBlink3(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
|
|
|
|
|
bStopBlinking = false;
|
|
|
|
|
} else
|
|
|
|
|
bStopBlinking = true;
|
|
|
|
@ -610,18 +610,18 @@ static void SwLedBlink4(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_SCAN_BLINK:
|
|
|
|
@ -635,16 +635,16 @@ static void SwLedBlink4(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_TXRX_BLINK:
|
|
|
|
@ -658,27 +658,27 @@ static void SwLedBlink4(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS_STOP: /*WPS authentication fail*/
|
|
|
|
@ -686,7 +686,8 @@ static void SwLedBlink4(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS_STOP_OVERLAP: /*WPS session overlap */
|
|
|
|
|
pLed->BlinkTimes--;
|
|
|
|
@ -699,15 +700,15 @@ static void SwLedBlink4(struct LED_871x *pLed)
|
|
|
|
|
if (bStopBlinking) {
|
|
|
|
|
pLed->BlinkTimes = 10;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA));
|
|
|
|
|
} else {
|
|
|
|
|
if (pLed->bLedOn)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -734,16 +735,16 @@ static void SwLedBlink5(struct LED_871x *pLed)
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
if (!pLed->bLedOn)
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
pLed->bLedScanBlinkInProgress = false;
|
|
|
|
|
} else {
|
|
|
|
|
if (pLed->bLedOn)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_TXRX_BLINK:
|
|
|
|
@ -754,16 +755,16 @@ static void SwLedBlink5(struct LED_871x *pLed)
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
if (!pLed->bLedOn)
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
pLed->bLedBlinkInProgress = false;
|
|
|
|
|
} else {
|
|
|
|
|
if (pLed->bLedOn)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -797,8 +798,8 @@ static void SwLedBlink6(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_BLINK_WPS:
|
|
|
|
@ -806,7 +807,8 @@ static void SwLedBlink6(struct LED_871x *pLed)
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
@ -908,8 +910,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_LINK:
|
|
|
|
@ -931,8 +933,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_SITE_SURVEY:
|
|
|
|
@ -961,8 +963,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_TX:
|
|
|
|
@ -986,8 +988,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -1016,8 +1018,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS:
|
|
|
|
@ -1044,11 +1046,12 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_BLINK_WPS_STOP;
|
|
|
|
|
if (pLed->bLedOn) {
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS_FAIL:
|
|
|
|
@ -1062,8 +1065,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
|
pLed->CurrLedState = LED_OFF;
|
|
|
|
@ -1088,7 +1091,8 @@ static void SwLedControlMode1(struct _adapter *padapter,
|
|
|
|
|
_cancel_timer_ex(&(pLed->BlinkTimer));
|
|
|
|
|
pLed->bLedScanBlinkInProgress = false;
|
|
|
|
|
}
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1121,8 +1125,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -1140,8 +1144,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -1157,7 +1161,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
pLed->bLedScanBlinkInProgress = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case LED_CTL_START_WPS: /*wait until xinpin finish*/
|
|
|
|
@ -1174,7 +1179,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
pLed->bLedWPSBlinkInProgress = true;
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -1182,14 +1188,16 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
pLed->bLedWPSBlinkInProgress = false;
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case LED_CTL_START_TO_LINK:
|
|
|
|
@ -1197,7 +1205,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
if (!IS_LED_BLINKING(pLed)) {
|
|
|
|
|
pLed->CurrLedState = LED_OFF;
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
@ -1215,7 +1224,8 @@ static void SwLedControlMode2(struct _adapter *padapter,
|
|
|
|
|
_cancel_timer_ex(&(pLed->BlinkTimer));
|
|
|
|
|
pLed->bLedWPSBlinkInProgress = false;
|
|
|
|
|
}
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1247,8 +1257,8 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_TX:
|
|
|
|
@ -1265,8 +1275,8 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_LINK:
|
|
|
|
@ -1282,7 +1292,8 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
_cancel_timer_ex(&(pLed->BlinkTimer));
|
|
|
|
|
pLed->bLedScanBlinkInProgress = false;
|
|
|
|
|
}
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_START_WPS: /* wait until xinpin finish */
|
|
|
|
|
case LED_CTL_START_WPS_BOTTON:
|
|
|
|
@ -1301,8 +1312,8 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS:
|
|
|
|
@ -1314,11 +1325,12 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_BLINK_WPS_STOP;
|
|
|
|
|
if (pLed->bLedOn) {
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS_FAIL:
|
|
|
|
@ -1328,14 +1340,16 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
}
|
|
|
|
|
pLed->CurrLedState = LED_OFF;
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
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;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
@ -1353,7 +1367,8 @@ static void SwLedControlMode3(struct _adapter *padapter,
|
|
|
|
|
_cancel_timer_ex(&(pLed->BlinkTimer));
|
|
|
|
|
pLed->bLedWPSBlinkInProgress = false;
|
|
|
|
|
}
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1376,7 +1391,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed1->BlinkingLedState = LED_OFF;
|
|
|
|
|
pLed1->CurrLedState = LED_OFF;
|
|
|
|
|
if (pLed1->bLedOn)
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
if (pLed->bLedStartToLinkBlinkInProgress == false) {
|
|
|
|
|
if (pLed->CurrLedState == LED_SCAN_BLINK ||
|
|
|
|
@ -1394,12 +1410,12 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_BLINK_StartToBlink;
|
|
|
|
|
if (pLed->bLedOn) {
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -1413,7 +1429,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed1->BlinkingLedState = LED_OFF;
|
|
|
|
|
pLed1->CurrLedState = LED_OFF;
|
|
|
|
|
if (pLed1->bLedOn)
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (pLed->bLedNoLinkBlinkInProgress == false) {
|
|
|
|
@ -1430,8 +1447,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_SITE_SURVEY:
|
|
|
|
@ -1456,8 +1473,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_TX:
|
|
|
|
@ -1477,8 +1494,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_START_WPS: /*wait until xinpin finish*/
|
|
|
|
@ -1489,7 +1506,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed1->BlinkingLedState = LED_OFF;
|
|
|
|
|
pLed1->CurrLedState = LED_OFF;
|
|
|
|
|
if (pLed1->bLedOn)
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
}
|
|
|
|
|
if (pLed->bLedWPSBlinkInProgress == false) {
|
|
|
|
|
if (pLed->bLedNoLinkBlinkInProgress == true) {
|
|
|
|
@ -1508,12 +1526,12 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_BLINK_WPS;
|
|
|
|
|
if (pLed->bLedOn) {
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SLOWLY_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
|
|
|
|
|
} else {
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -1528,8 +1546,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS_FAIL: /*WPS authentication fail*/
|
|
|
|
|
if (pLed->bLedWPSBlinkInProgress) {
|
|
|
|
@ -1542,8 +1560,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
/*LED1 settings*/
|
|
|
|
|
if (pLed1->bLedWPSBlinkInProgress)
|
|
|
|
|
_cancel_timer_ex(&(pLed1->BlinkTimer));
|
|
|
|
@ -1554,7 +1572,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed1->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed1->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS_FAIL_OVERLAP: /*WPS session overlap*/
|
|
|
|
|
if (pLed->bLedWPSBlinkInProgress) {
|
|
|
|
@ -1567,8 +1586,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_NO_LINK_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
|
|
|
|
|
/*LED1 settings*/
|
|
|
|
|
if (pLed1->bLedWPSBlinkInProgress)
|
|
|
|
|
_cancel_timer_ex(&(pLed1->BlinkTimer));
|
|
|
|
@ -1580,7 +1599,8 @@ static void SwLedControlMode4(struct _adapter *padapter,
|
|
|
|
|
pLed1->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed1->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), LED_BLINK_NORMAL_INTERVAL);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_NORMAL_INTERVAL));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
|
pLed->CurrLedState = LED_OFF;
|
|
|
|
@ -1641,7 +1661,8 @@ static void SwLedControlMode5(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
pLed->bLedBlinkInProgress = false;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_SITE_SURVEY:
|
|
|
|
|
if ((pmlmepriv->sitesurveyctrl.traffic_busy) &&
|
|
|
|
@ -1659,8 +1680,8 @@ static void SwLedControlMode5(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_TX:
|
|
|
|
@ -1675,8 +1696,8 @@ static void SwLedControlMode5(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
@ -1711,7 +1732,7 @@ static void SwLedControlMode6(struct _adapter *padapter,
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
pLed->bLedBlinkInProgress = false;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&(pLed->BlinkTimer), jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_TX:
|
|
|
|
|
case LED_CTL_RX:
|
|
|
|
@ -1726,8 +1747,8 @@ static void SwLedControlMode6(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_FASTER_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_START_WPS: /*wait until xinpin finish*/
|
|
|
|
@ -1743,8 +1764,8 @@ static void SwLedControlMode6(struct _adapter *padapter,
|
|
|
|
|
pLed->BlinkingLedState = LED_OFF;
|
|
|
|
|
else
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer),
|
|
|
|
|
LED_BLINK_SCAN_INTERVAL_ALPHA);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer, jiffies +
|
|
|
|
|
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_STOP_WPS_FAIL:
|
|
|
|
@ -1755,7 +1776,8 @@ static void SwLedControlMode6(struct _adapter *padapter,
|
|
|
|
|
}
|
|
|
|
|
pLed->CurrLedState = LED_ON;
|
|
|
|
|
pLed->BlinkingLedState = LED_ON;
|
|
|
|
|
_set_timer(&(pLed->BlinkTimer), 0);
|
|
|
|
|
mod_timer(&pLed->BlinkTimer,
|
|
|
|
|
jiffies + msecs_to_jiffies(0));
|
|
|
|
|
break;
|
|
|
|
|
case LED_CTL_POWER_OFF:
|
|
|
|
|
pLed->CurrLedState = LED_OFF;
|
|
|
|
|