38 #define LED_BLINK_NORMAL_INTERVAL 100
39 #define LED_BLINK_SLOWLY_INTERVAL 200
40 #define LED_BLINK_LONG_INTERVAL 400
42 #define LED_BLINK_NO_LINK_INTERVAL_ALPHA 1000
43 #define LED_BLINK_LINK_INTERVAL_ALPHA 500
44 #define LED_BLINK_SCAN_INTERVAL_ALPHA 180
45 #define LED_BLINK_FASTER_INTERVAL_ALPHA 50
46 #define LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA 5000
75 static void BlinkTimerCallback(
unsigned long data);
100 _init_timer(&(pLed->
BlinkTimer), nic, BlinkTimerCallback, pLed);
101 _init_workitem(&(pLed->
BlinkWorkItem), BlinkWorkItemCallback, pLed);
108 static void DeInitLed871x(
struct LED_871x *pLed)
197 DeInitLed871x(&(ledpriv->
SwLed0));
198 DeInitLed871x(&(ledpriv->
SwLed1));
205 static void SwLedBlink(
struct LED_871x *pLed)
209 u8 bStopBlinking =
false;
213 SwLedOn(padapter, pLed);
215 SwLedOff(padapter, pLed);
221 bStopBlinking =
true;
224 if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) &&
226 bStopBlinking =
true;
227 if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) &&
230 bStopBlinking =
true;
232 bStopBlinking =
true;
236 bStopBlinking =
true;
239 bStopBlinking =
true;
243 if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) &&
245 SwLedOn(padapter, pLed);
246 else if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
247 true) && pLed->
bLedOn ==
true)
248 SwLedOff(padapter, pLed);
285 static void SwLedBlink1(
struct LED_871x *pLed)
292 u8 bStopBlinking =
false;
295 pLed = &(ledpriv->
SwLed1);
298 SwLedOn(padapter, pLed);
300 SwLedOff(padapter, pLed);
302 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
304 SwLedOn(padapter, pLed1);
306 }
else if (!pLed1->
bLedOn)
307 SwLedOn(padapter, pLed1);
310 SwLedOff(padapter, pLed1);
313 SwLedOff(padapter, pLed1);
336 bStopBlinking =
true;
338 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
347 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
370 bStopBlinking =
true;
372 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
381 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
415 bStopBlinking =
false;
417 bStopBlinking =
true;
435 static void SwLedBlink2(
struct LED_871x *pLed)
439 u8 bStopBlinking =
false;
443 SwLedOn(padapter, pLed);
445 SwLedOff(padapter, pLed);
450 bStopBlinking =
true;
452 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
455 SwLedOn(padapter, pLed);
456 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
459 SwLedOff(padapter, pLed);
474 bStopBlinking =
true;
476 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
479 SwLedOn(padapter, pLed);
480 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
483 SwLedOff(padapter, pLed);
500 static void SwLedBlink3(
struct LED_871x *pLed)
504 u8 bStopBlinking =
false;
508 SwLedOn(padapter, pLed);
511 SwLedOff(padapter, pLed);
516 bStopBlinking =
true;
518 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
522 SwLedOn(padapter, pLed);
523 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
527 SwLedOff(padapter, pLed);
542 bStopBlinking =
true;
544 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
548 SwLedOn(padapter, pLed);
549 }
else if (!check_fwstate(pmlmepriv,
_FW_LINKED)) {
553 SwLedOff(padapter, pLed);
578 bStopBlinking =
false;
580 bStopBlinking =
true;
584 SwLedOn(padapter, pLed);
593 static void SwLedBlink4(
struct LED_871x *pLed)
598 u8 bStopBlinking =
false;
602 SwLedOn(padapter, pLed);
604 SwLedOff(padapter, pLed);
609 SwLedOff(padapter, pLed1);
634 bStopBlinking =
true;
657 bStopBlinking =
true;
701 bStopBlinking =
true;
722 static void SwLedBlink5(
struct LED_871x *pLed)
725 u8 bStopBlinking =
false;
729 SwLedOn(padapter, pLed);
731 SwLedOff(padapter, pLed);
736 bStopBlinking =
true;
756 bStopBlinking =
true;
778 static void SwLedBlink6(
struct LED_871x *pLed)
781 u8 bStopBlinking =
false;
785 SwLedOn(padapter, pLed);
787 SwLedOff(padapter, pLed);
792 bStopBlinking =
true;
797 SwLedOn(padapter, pLed);
825 static void BlinkTimerCallback(
unsigned long data)
831 if ((pLed->
padapter->bSurpriseRemoved ==
true) ||
832 (pLed->
padapter->bDriverStopped ==
true))
884 static void SwLedControlMode1(
struct _adapter *padapter,
893 pLed = &(ledpriv->
SwLed1);
944 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true))
1102 static void SwLedControlMode2(
struct _adapter *padapter,
1109 switch (LedAction) {
1136 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true)) {
1229 static void SwLedControlMode3(
struct _adapter *padapter,
1236 switch (LedAction) {
1261 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true)) {
1367 static void SwLedControlMode4(
struct _adapter *padapter,
1375 switch (LedAction) {
1443 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true))
1621 SwLedOff(padapter, pLed);
1622 SwLedOff(padapter, pLed1);
1629 static void SwLedControlMode5(
struct _adapter *padapter,
1637 pLed = &(ledpriv->
SwLed1);
1639 switch (LedAction) {
1652 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true))
1693 SwLedOff(padapter, pLed);
1701 static void SwLedControlMode6(
struct _adapter *padapter,
1708 switch (LedAction) {
1723 (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true)) {
1775 SwLedOff(padapter, pLed);
1795 SwLedControlMode1(padapter, LedAction);
1798 SwLedControlMode2(padapter, LedAction);
1801 SwLedControlMode3(padapter, LedAction);
1804 SwLedControlMode4(padapter, LedAction);
1807 SwLedControlMode5(padapter, LedAction);
1810 SwLedControlMode6(padapter, LedAction);