Lines Matching defs:pLed
40 void InitLed819xUsb (struct net_device *dev, PLED_819xUsb pLed,
45 pLed->dev = dev;
46 pLed->LedPin = LedPin;
47 pLed->CurrLedState = LED_OFF;
48 pLed->bLedOn = FALSE;
50 pLed->bLedBlinkInProgress = FALSE;
51 pLed->BlinkTimes = 0;
52 pLed->BlinkingLedState = LED_OFF;
54 init_timer(&pLed->BlinkTimer);
55 pLed->BlinkTimer.data = (unsigned long)dev;
56 pLed->BlinkTimer.function = BlinkTimerCallback;
59 priv->pLed = pLed;
63 void DeInitLed819xUsb (PLED_819xUsb pLed)
65 del_timer_sync(&(pLed->BlinkTimer));
66 pLed->bLedBlinkInProgress = FALSE;
69 void SwLedOn (struct net_device *dev, PLED_819xUsb pLed)
74 switch (pLed->LedPin) {
86 pLed->bLedOn = TRUE;
89 void SwLedOff (struct net_device *dev, PLED_819xUsb pLed)
94 switch (pLed->LedPin) {
108 pLed->bLedOn = FALSE;
139 PLED_819xUsb pLed
142 struct net_device *dev = (struct net_device *)(pLed->dev);
146 if( pLed->BlinkingLedState == LED_ON )
148 SwLedOn(dev, pLed);
149 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
153 SwLedOff(dev, pLed);
154 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
157 pLed->BlinkTimes--;
158 switch(pLed->CurrLedState)
162 if(pLed->BlinkTimes == 0)
177 else if(pLed->BlinkTimes == 0)
184 if( pLed->BlinkTimes == 0 )
201 SwLedOff(dev, pLed);
203 else if( (priv->ieee80211->state == IEEE80211_LINKED) && (pLed->bLedOn == false))
205 SwLedOn(dev, pLed);
207 else if( (priv->ieee80211->state != IEEE80211_LINKED) && pLed->bLedOn == true)
209 SwLedOff(dev, pLed);
212 pLed->BlinkTimes = 0;
213 pLed->bLedBlinkInProgress = FALSE;
217 if( pLed->BlinkingLedState == LED_ON )
218 pLed->BlinkingLedState = LED_OFF;
220 pLed->BlinkingLedState = LED_ON;
222 switch( pLed->CurrLedState )
225 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
230 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
235 if( pLed->BlinkingLedState == LED_ON )
236 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LONG_INTERVAL));
238 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LONG_INTERVAL));
243 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
252 PLED_819xUsb pLed
255 struct net_device *dev = (struct net_device *)(pLed->dev);
261 pLed = &(priv->SwLed1);
263 if( pLed->BlinkingLedState == LED_ON )
265 SwLedOn(dev, pLed);
266 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
270 SwLedOff(dev, pLed);
271 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
301 switch(pLed->CurrLedState)
304 if( pLed->bLedOn )
305 pLed->BlinkingLedState = LED_OFF;
307 pLed->BlinkingLedState = LED_ON;
308 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
312 if( pLed->bLedOn )
313 pLed->BlinkingLedState = LED_OFF;
315 pLed->BlinkingLedState = LED_ON;
316 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
320 pLed->BlinkTimes--;
321 if( pLed->BlinkTimes == 0 )
330 SwLedOff(dev, pLed);
334 pLed->bLedLinkBlinkInProgress = TRUE;
335 pLed->CurrLedState = LED_BLINK_NORMAL;
336 if( pLed->bLedOn )
337 pLed->BlinkingLedState = LED_OFF;
339 pLed->BlinkingLedState = LED_ON;
340 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
341 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
346 pLed->bLedNoLinkBlinkInProgress = TRUE;
347 pLed->CurrLedState = LED_BLINK_SLOWLY;
348 if( pLed->bLedOn )
349 pLed->BlinkingLedState = LED_OFF;
351 pLed->BlinkingLedState = LED_ON;
352 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
353 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
355 pLed->bLedScanBlinkInProgress = FALSE;
361 SwLedOff(dev, pLed);
365 if( pLed->bLedOn )
366 pLed->BlinkingLedState = LED_OFF;
368 pLed->BlinkingLedState = LED_ON;
369 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
375 pLed->BlinkTimes--;
376 if( pLed->BlinkTimes == 0 )
384 SwLedOff(dev, pLed);
388 pLed->bLedLinkBlinkInProgress = TRUE;
389 pLed->CurrLedState = LED_BLINK_NORMAL;
390 if( pLed->bLedOn )
391 pLed->BlinkingLedState = LED_OFF;
393 pLed->BlinkingLedState = LED_ON;
394 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
395 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
399 pLed->bLedNoLinkBlinkInProgress = TRUE;
400 pLed->CurrLedState = LED_BLINK_SLOWLY;
401 if( pLed->bLedOn )
402 pLed->BlinkingLedState = LED_OFF;
404 pLed->BlinkingLedState = LED_ON;
405 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
406 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
408 pLed->BlinkTimes = 0;
409 pLed->bLedBlinkInProgress = FALSE;
415 SwLedOff(dev, pLed);
419 if( pLed->bLedOn )
420 pLed->BlinkingLedState = LED_OFF;
422 pLed->BlinkingLedState = LED_ON;
423 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
429 if( pLed->bLedOn )
430 pLed->BlinkingLedState = LED_OFF;
432 pLed->BlinkingLedState = LED_ON;
433 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
437 if(pLed->BlinkingLedState == LED_ON)
439 pLed->BlinkingLedState = LED_OFF;
440 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
452 SwLedOff(dev, pLed);
456 pLed->bLedLinkBlinkInProgress = TRUE;
457 pLed->CurrLedState = LED_BLINK_NORMAL;
458 if( pLed->bLedOn )
459 pLed->BlinkingLedState = LED_OFF;
461 pLed->BlinkingLedState = LED_ON;
462 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
463 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
465 pLed->bLedWPSBlinkInProgress = FALSE;
477 PLED_819xUsb pLed
480 struct net_device *dev = (struct net_device *)(pLed->dev);
484 if( pLed->BlinkingLedState == LED_ON)
486 SwLedOn(dev, pLed);
487 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
491 SwLedOff(dev, pLed);
492 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
495 switch(pLed->CurrLedState)
498 pLed->BlinkTimes--;
499 if( pLed->BlinkTimes == 0 )
508 SwLedOff(dev, pLed);
513 pLed->CurrLedState = LED_ON;
514 pLed->BlinkingLedState = LED_ON;
515 SwLedOn(dev, pLed);
516 RT_TRACE(COMP_LED, "stop scan blink CurrLedState %d\n", pLed->CurrLedState);
521 pLed->CurrLedState = LED_OFF;
522 pLed->BlinkingLedState = LED_OFF;
523 SwLedOff(dev, pLed);
524 RT_TRACE(COMP_LED, "stop scan blink CurrLedState %d\n", pLed->CurrLedState);
526 pLed->bLedScanBlinkInProgress = FALSE;
532 SwLedOff(dev, pLed);
536 if( pLed->bLedOn )
537 pLed->BlinkingLedState = LED_OFF;
539 pLed->BlinkingLedState = LED_ON;
540 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
546 pLed->BlinkTimes--;
547 if( pLed->BlinkTimes == 0 )
555 SwLedOff(dev, pLed);
559 pLed->CurrLedState = LED_ON;
560 pLed->BlinkingLedState = LED_ON;
561 SwLedOn(dev, pLed);
562 RT_TRACE(COMP_LED, "stop CurrLedState %d\n", pLed->CurrLedState);
567 pLed->CurrLedState = LED_OFF;
568 pLed->BlinkingLedState = LED_OFF;
569 SwLedOff(dev, pLed);
570 RT_TRACE(COMP_LED, "stop CurrLedState %d\n", pLed->CurrLedState);
572 pLed->bLedBlinkInProgress = FALSE;
578 SwLedOff(dev, pLed);
582 if( pLed->bLedOn )
583 pLed->BlinkingLedState = LED_OFF;
585 pLed->BlinkingLedState = LED_ON;
586 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
599 PLED_819xUsb pLed
602 struct net_device *dev = (struct net_device *)(pLed->dev);
606 if( pLed->BlinkingLedState == LED_ON )
608 SwLedOn(dev, pLed);
609 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
613 if(pLed->CurrLedState != LED_BLINK_WPS_STOP)
614 SwLedOff(dev, pLed);
615 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
618 switch(pLed->CurrLedState)
621 pLed->BlinkTimes--;
622 if( pLed->BlinkTimes == 0 )
631 SwLedOff(dev, pLed);
635 pLed->CurrLedState = LED_ON;
636 pLed->BlinkingLedState = LED_ON;
637 if( !pLed->bLedOn )
638 SwLedOn(dev, pLed);
640 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
644 pLed->CurrLedState = LED_OFF;
645 pLed->BlinkingLedState = LED_OFF;
646 if( pLed->bLedOn )
647 SwLedOff(dev, pLed);
649 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
651 pLed->bLedScanBlinkInProgress = FALSE;
657 SwLedOff(dev, pLed);
661 if( pLed->bLedOn )
662 pLed->BlinkingLedState = LED_OFF;
664 pLed->BlinkingLedState = LED_ON;
665 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
671 pLed->BlinkTimes--;
672 if( pLed->BlinkTimes == 0 )
680 SwLedOff(dev, pLed);
684 pLed->CurrLedState = LED_ON;
685 pLed->BlinkingLedState = LED_ON;
687 if( !pLed->bLedOn )
688 SwLedOn(dev, pLed);
690 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
694 pLed->CurrLedState = LED_OFF;
695 pLed->BlinkingLedState = LED_OFF;
697 if( pLed->bLedOn )
698 SwLedOff(dev, pLed);
701 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
703 pLed->bLedBlinkInProgress = FALSE;
709 SwLedOff(dev, pLed);
713 if( pLed->bLedOn )
714 pLed->BlinkingLedState = LED_OFF;
716 pLed->BlinkingLedState = LED_ON;
717 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
723 if( pLed->bLedOn )
724 pLed->BlinkingLedState = LED_OFF;
726 pLed->BlinkingLedState = LED_ON;
727 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
731 if(pLed->BlinkingLedState == LED_ON)
733 pLed->BlinkingLedState = LED_OFF;
734 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
746 SwLedOff(dev, pLed);
750 pLed->CurrLedState = LED_ON;
751 pLed->BlinkingLedState = LED_ON;
752 SwLedOn(dev, pLed);
753 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
755 pLed->bLedWPSBlinkInProgress = FALSE;
769 PLED_819xUsb pLed
772 struct net_device *dev = (struct net_device *)(pLed->dev);
777 if( pLed->BlinkingLedState == LED_ON )
779 SwLedOn(dev, pLed);
780 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
784 SwLedOff(dev, pLed);
785 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
795 switch(pLed->CurrLedState)
798 if( pLed->bLedOn )
799 pLed->BlinkingLedState = LED_OFF;
801 pLed->BlinkingLedState = LED_ON;
802 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
806 if( pLed->bLedOn )
808 pLed->BlinkingLedState = LED_OFF;
809 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
813 pLed->BlinkingLedState = LED_ON;
814 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
819 pLed->BlinkTimes--;
820 if( pLed->BlinkTimes == 0 )
829 SwLedOff(dev, pLed);
833 pLed->bLedNoLinkBlinkInProgress = TRUE;
834 pLed->CurrLedState = LED_BLINK_SLOWLY;
835 if( pLed->bLedOn )
836 pLed->BlinkingLedState = LED_OFF;
838 pLed->BlinkingLedState = LED_ON;
839 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
841 pLed->bLedScanBlinkInProgress = FALSE;
847 SwLedOff(dev, pLed);
851 if( pLed->bLedOn )
852 pLed->BlinkingLedState = LED_OFF;
854 pLed->BlinkingLedState = LED_ON;
855 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
861 pLed->BlinkTimes--;
862 if( pLed->BlinkTimes == 0 )
870 SwLedOff(dev, pLed);
874 pLed->bLedNoLinkBlinkInProgress = TRUE;
875 pLed->CurrLedState = LED_BLINK_SLOWLY;
876 if( pLed->bLedOn )
877 pLed->BlinkingLedState = LED_OFF;
879 pLed->BlinkingLedState = LED_ON;
880 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
882 pLed->bLedBlinkInProgress = FALSE;
888 SwLedOff(dev, pLed);
892 if( pLed->bLedOn )
893 pLed->BlinkingLedState = LED_OFF;
895 pLed->BlinkingLedState = LED_ON;
896 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
902 if( pLed->bLedOn )
904 pLed->BlinkingLedState = LED_OFF;
905 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
909 pLed->BlinkingLedState = LED_ON;
910 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
915 if( pLed->bLedOn )
916 pLed->BlinkingLedState = LED_OFF;
918 pLed->BlinkingLedState = LED_ON;
920 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
924 pLed->BlinkTimes--;
925 if(pLed->BlinkTimes == 0)
927 if(pLed->bLedOn)
929 pLed->BlinkTimes = 1;
939 pLed->BlinkTimes = 10;
940 pLed->BlinkingLedState = LED_ON;
941 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
945 if( pLed->bLedOn )
946 pLed->BlinkingLedState = LED_OFF;
948 pLed->BlinkingLedState = LED_ON;
950 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
959 RT_TRACE(COMP_LED, "SwLedBlink4 CurrLedState %d\n", pLed->CurrLedState);
966 PLED_819xUsb pLed
969 struct net_device *dev = (struct net_device *)(pLed->dev);
973 if( pLed->BlinkingLedState == LED_ON )
975 SwLedOn(dev, pLed);
976 RT_TRACE(COMP_LED, "Blinktimes (%d): turn on\n", pLed->BlinkTimes);
980 SwLedOff(dev, pLed);
981 RT_TRACE(COMP_LED, "Blinktimes (%d): turn off\n", pLed->BlinkTimes);
984 switch(pLed->CurrLedState)
987 pLed->BlinkTimes--;
988 if( pLed->BlinkTimes == 0 )
997 pLed->CurrLedState = LED_OFF;
998 pLed->BlinkingLedState = LED_OFF;
999 if(pLed->bLedOn)
1000 SwLedOff(dev, pLed);
1003 { pLed->CurrLedState = LED_ON;
1004 pLed->BlinkingLedState = LED_ON;
1005 if(!pLed->bLedOn)
1006 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1009 pLed->bLedScanBlinkInProgress = FALSE;
1015 SwLedOff(dev, pLed);
1019 if( pLed->bLedOn )
1020 pLed->BlinkingLedState = LED_OFF;
1022 pLed->BlinkingLedState = LED_ON;
1023 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1030 pLed->BlinkTimes--;
1031 if( pLed->BlinkTimes == 0 )
1040 pLed->CurrLedState = LED_OFF;
1041 pLed->BlinkingLedState = LED_OFF;
1042 if(pLed->bLedOn)
1043 SwLedOff(dev, pLed);
1047 pLed->CurrLedState = LED_ON;
1048 pLed->BlinkingLedState = LED_ON;
1049 if(!pLed->bLedOn)
1050 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1053 pLed->bLedBlinkInProgress = FALSE;
1059 SwLedOff(dev, pLed);
1063 if( pLed->bLedOn )
1064 pLed->BlinkingLedState = LED_OFF;
1066 pLed->BlinkingLedState = LED_ON;
1067 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1076 RT_TRACE(COMP_LED, "SwLedBlink5 CurrLedState %d\n", pLed->CurrLedState);
1098 PLED_819xUsb pLed = priv->pLed;
1103 SwLedBlink(pLed);
1107 SwLedBlink1(pLed);
1111 SwLedBlink2(pLed);
1115 SwLedBlink3(pLed);
1119 SwLedBlink4(pLed);
1123 SwLedBlink5(pLed);
1127 SwLedBlink(pLed);
1142 PLED_819xUsb pLed = &(priv->SwLed1);
1148 if( pLed->bLedBlinkInProgress == FALSE )
1150 pLed->bLedBlinkInProgress = TRUE;
1152 pLed->CurrLedState = LED_BLINK_NORMAL;
1153 pLed->BlinkTimes = 2;
1155 if( pLed->bLedOn )
1156 pLed->BlinkingLedState = LED_OFF;
1158 pLed->BlinkingLedState = LED_ON;
1159 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
1164 if( pLed->bLedBlinkInProgress == FALSE )
1166 pLed->bLedBlinkInProgress = TRUE;
1168 pLed->CurrLedState = LED_BLINK_StartToBlink;
1169 pLed->BlinkTimes = 24;
1171 if( pLed->bLedOn )
1172 pLed->BlinkingLedState = LED_OFF;
1174 pLed->BlinkingLedState = LED_ON;
1175 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
1179 pLed->CurrLedState = LED_BLINK_StartToBlink;
1184 pLed->CurrLedState = LED_ON;
1185 if( pLed->bLedBlinkInProgress == FALSE )
1187 SwLedOn(dev, pLed);
1192 pLed->CurrLedState = LED_OFF;
1193 if( pLed->bLedBlinkInProgress == FALSE )
1195 SwLedOff(dev, pLed);
1200 pLed->CurrLedState = LED_OFF;
1201 if(pLed->bLedBlinkInProgress)
1203 del_timer_sync(&(pLed->BlinkTimer));
1204 pLed->bLedBlinkInProgress = FALSE;
1206 SwLedOff(dev, pLed);
1210 if( pLed->bLedBlinkInProgress == FALSE || pLed->CurrLedState == LED_ON)
1212 pLed->bLedBlinkInProgress = TRUE;
1214 pLed->CurrLedState = LED_BLINK_WPS;
1215 pLed->BlinkTimes = 20;
1217 if( pLed->bLedOn )
1219 pLed->BlinkingLedState = LED_OFF;
1220 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LONG_INTERVAL));
1224 pLed->BlinkingLedState = LED_ON;
1225 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LONG_INTERVAL));
1231 if(pLed->bLedBlinkInProgress)
1233 pLed->CurrLedState = LED_OFF;
1234 del_timer_sync(&(pLed->BlinkTimer));
1235 pLed->bLedBlinkInProgress = FALSE;
1244 RT_TRACE(COMP_LED, "Led %d\n", pLed->CurrLedState);
1255 PLED_819xUsb pLed = &(priv->SwLed0);
1258 pLed = &(priv->SwLed1);
1264 if( pLed->bLedNoLinkBlinkInProgress == FALSE )
1266 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1270 if( pLed->bLedLinkBlinkInProgress == TRUE )
1272 del_timer_sync(&(pLed->BlinkTimer));
1273 pLed->bLedLinkBlinkInProgress = FALSE;
1275 if(pLed->bLedBlinkInProgress ==TRUE)
1277 del_timer_sync(&(pLed->BlinkTimer));
1278 pLed->bLedBlinkInProgress = FALSE;
1281 pLed->bLedNoLinkBlinkInProgress = TRUE;
1282 pLed->CurrLedState = LED_BLINK_SLOWLY;
1283 if( pLed->bLedOn )
1284 pLed->BlinkingLedState = LED_OFF;
1286 pLed->BlinkingLedState = LED_ON;
1287 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
1292 if( pLed->bLedLinkBlinkInProgress == FALSE )
1294 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1298 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1300 del_timer_sync(&(pLed->BlinkTimer));
1301 pLed->bLedNoLinkBlinkInProgress = FALSE;
1303 if(pLed->bLedBlinkInProgress ==TRUE)
1305 del_timer_sync(&(pLed->BlinkTimer));
1306 pLed->bLedBlinkInProgress = FALSE;
1308 pLed->bLedLinkBlinkInProgress = TRUE;
1309 pLed->CurrLedState = LED_BLINK_NORMAL;
1310 if( pLed->bLedOn )
1311 pLed->BlinkingLedState = LED_OFF;
1313 pLed->BlinkingLedState = LED_ON;
1314 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_LINK_INTERVAL_ALPHA));
1321 else if(pLed->bLedScanBlinkInProgress ==FALSE)
1323 if(IS_LED_WPS_BLINKING(pLed))
1326 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1328 del_timer_sync(&(pLed->BlinkTimer));
1329 pLed->bLedNoLinkBlinkInProgress = FALSE;
1331 if( pLed->bLedLinkBlinkInProgress == TRUE )
1333 del_timer_sync(&(pLed->BlinkTimer));
1334 pLed->bLedLinkBlinkInProgress = FALSE;
1336 if(pLed->bLedBlinkInProgress ==TRUE)
1338 del_timer_sync(&(pLed->BlinkTimer));
1339 pLed->bLedBlinkInProgress = FALSE;
1341 pLed->bLedScanBlinkInProgress = TRUE;
1342 pLed->CurrLedState = LED_SCAN_BLINK;
1343 pLed->BlinkTimes = 24;
1344 if( pLed->bLedOn )
1345 pLed->BlinkingLedState = LED_OFF;
1347 pLed->BlinkingLedState = LED_ON;
1348 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1355 if(pLed->bLedBlinkInProgress ==FALSE)
1357 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1360 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1362 del_timer_sync(&(pLed->BlinkTimer));
1363 pLed->bLedNoLinkBlinkInProgress = FALSE;
1365 if( pLed->bLedLinkBlinkInProgress == TRUE )
1367 del_timer_sync(&(pLed->BlinkTimer));
1368 pLed->bLedLinkBlinkInProgress = FALSE;
1370 pLed->bLedBlinkInProgress = TRUE;
1371 pLed->CurrLedState = LED_TXRX_BLINK;
1372 pLed->BlinkTimes = 2;
1373 if( pLed->bLedOn )
1374 pLed->BlinkingLedState = LED_OFF;
1376 pLed->BlinkingLedState = LED_ON;
1377 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1383 if(pLed->bLedWPSBlinkInProgress ==FALSE)
1385 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1387 del_timer_sync(&(pLed->BlinkTimer));
1388 pLed->bLedNoLinkBlinkInProgress = FALSE;
1390 if( pLed->bLedLinkBlinkInProgress == TRUE )
1392 del_timer_sync(&(pLed->BlinkTimer));
1393 pLed->bLedLinkBlinkInProgress = FALSE;
1395 if(pLed->bLedBlinkInProgress ==TRUE)
1397 del_timer_sync(&(pLed->BlinkTimer));
1398 pLed->bLedBlinkInProgress = FALSE;
1400 if(pLed->bLedScanBlinkInProgress ==TRUE)
1402 del_timer_sync(&(pLed->BlinkTimer));
1403 pLed->bLedScanBlinkInProgress = FALSE;
1405 pLed->bLedWPSBlinkInProgress = TRUE;
1406 pLed->CurrLedState = LED_BLINK_WPS;
1407 if( pLed->bLedOn )
1408 pLed->BlinkingLedState = LED_OFF;
1410 pLed->BlinkingLedState = LED_ON;
1411 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1418 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1420 del_timer_sync(&(pLed->BlinkTimer));
1421 pLed->bLedNoLinkBlinkInProgress = FALSE;
1423 if( pLed->bLedLinkBlinkInProgress == TRUE )
1425 del_timer_sync(&(pLed->BlinkTimer));
1426 pLed->bLedLinkBlinkInProgress = FALSE;
1428 if(pLed->bLedBlinkInProgress ==TRUE)
1430 del_timer_sync(&(pLed->BlinkTimer));
1431 pLed->bLedBlinkInProgress = FALSE;
1433 if(pLed->bLedScanBlinkInProgress ==TRUE)
1435 del_timer_sync(&(pLed->BlinkTimer));
1436 pLed->bLedScanBlinkInProgress = FALSE;
1438 if(pLed->bLedWPSBlinkInProgress)
1440 del_timer_sync(&(pLed->BlinkTimer));
1444 pLed->bLedWPSBlinkInProgress = TRUE;
1447 pLed->CurrLedState = LED_BLINK_WPS_STOP;
1448 if(pLed->bLedOn)
1450 pLed->BlinkingLedState = LED_OFF;
1451 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
1455 pLed->BlinkingLedState = LED_ON;
1456 mod_timer(&(pLed->BlinkTimer), 0);
1461 if(pLed->bLedWPSBlinkInProgress)
1463 del_timer_sync(&(pLed->BlinkTimer));
1464 pLed->bLedWPSBlinkInProgress = FALSE;
1467 pLed->bLedNoLinkBlinkInProgress = TRUE;
1468 pLed->CurrLedState = LED_BLINK_SLOWLY;
1469 if( pLed->bLedOn )
1470 pLed->BlinkingLedState = LED_OFF;
1472 pLed->BlinkingLedState = LED_ON;
1473 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
1477 pLed->CurrLedState = LED_OFF;
1478 if( pLed->bLedNoLinkBlinkInProgress)
1480 del_timer_sync(&(pLed->BlinkTimer));
1481 pLed->bLedNoLinkBlinkInProgress = FALSE;
1483 if( pLed->bLedLinkBlinkInProgress)
1485 del_timer_sync(&(pLed->BlinkTimer));
1486 pLed->bLedLinkBlinkInProgress = FALSE;
1488 if( pLed->bLedBlinkInProgress)
1490 del_timer_sync(&(pLed->BlinkTimer));
1491 pLed->bLedBlinkInProgress = FALSE;
1493 if( pLed->bLedWPSBlinkInProgress )
1495 del_timer_sync(&(pLed->BlinkTimer));
1496 pLed->bLedWPSBlinkInProgress = FALSE;
1498 if( pLed->bLedScanBlinkInProgress)
1500 del_timer_sync(&(pLed->BlinkTimer));
1501 pLed->bLedScanBlinkInProgress = FALSE;
1504 SwLedOff(dev, pLed);
1512 RT_TRACE(COMP_LED, "Led %d\n", pLed->CurrLedState);
1522 PLED_819xUsb pLed = &(priv->SwLed0);
1529 else if(pLed->bLedScanBlinkInProgress ==FALSE)
1531 if(IS_LED_WPS_BLINKING(pLed))
1534 if(pLed->bLedBlinkInProgress ==TRUE)
1536 del_timer_sync(&(pLed->BlinkTimer));
1537 pLed->bLedBlinkInProgress = FALSE;
1539 pLed->bLedScanBlinkInProgress = TRUE;
1540 pLed->CurrLedState = LED_SCAN_BLINK;
1541 pLed->BlinkTimes = 24;
1542 if( pLed->bLedOn )
1543 pLed->BlinkingLedState = LED_OFF;
1545 pLed->BlinkingLedState = LED_ON;
1546 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1553 if((pLed->bLedBlinkInProgress ==FALSE) && (priv->ieee80211->state == IEEE80211_LINKED))
1555 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1560 pLed->bLedBlinkInProgress = TRUE;
1561 pLed->CurrLedState = LED_TXRX_BLINK;
1562 pLed->BlinkTimes = 2;
1563 if( pLed->bLedOn )
1564 pLed->BlinkingLedState = LED_OFF;
1566 pLed->BlinkingLedState = LED_ON;
1567 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1572 pLed->CurrLedState = LED_ON;
1573 pLed->BlinkingLedState = LED_ON;
1574 if( pLed->bLedBlinkInProgress)
1576 del_timer_sync(&(pLed->BlinkTimer));
1577 pLed->bLedBlinkInProgress = FALSE;
1579 if( pLed->bLedScanBlinkInProgress)
1581 del_timer_sync(&(pLed->BlinkTimer));
1582 pLed->bLedScanBlinkInProgress = FALSE;
1585 mod_timer(&(pLed->BlinkTimer), 0);
1590 if(pLed->bLedWPSBlinkInProgress ==FALSE)
1592 if(pLed->bLedBlinkInProgress ==TRUE)
1594 del_timer_sync(&(pLed->BlinkTimer));
1595 pLed->bLedBlinkInProgress = FALSE;
1597 if(pLed->bLedScanBlinkInProgress ==TRUE)
1599 del_timer_sync(&(pLed->BlinkTimer));
1600 pLed->bLedScanBlinkInProgress = FALSE;
1602 pLed->bLedWPSBlinkInProgress = TRUE;
1603 pLed->CurrLedState = LED_ON;
1604 pLed->BlinkingLedState = LED_ON;
1605 mod_timer(&(pLed->BlinkTimer), 0);
1610 pLed->bLedWPSBlinkInProgress = FALSE;
1613 SwLedOff(dev, pLed);
1617 pLed->CurrLedState = LED_ON;
1618 pLed->BlinkingLedState = LED_ON;
1619 mod_timer(&(pLed->BlinkTimer), 0);
1620 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
1625 pLed->bLedWPSBlinkInProgress = FALSE;
1628 SwLedOff(dev, pLed);
1632 pLed->CurrLedState = LED_OFF;
1633 pLed->BlinkingLedState = LED_OFF;
1634 mod_timer(&(pLed->BlinkTimer), 0);
1635 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
1641 if(!IS_LED_BLINKING(pLed))
1643 pLed->CurrLedState = LED_OFF;
1644 pLed->BlinkingLedState = LED_OFF;
1645 mod_timer(&(pLed->BlinkTimer), 0);
1650 pLed->CurrLedState = LED_OFF;
1651 pLed->BlinkingLedState = LED_OFF;
1652 if( pLed->bLedBlinkInProgress)
1654 del_timer_sync(&(pLed->BlinkTimer));
1655 pLed->bLedBlinkInProgress = FALSE;
1657 if( pLed->bLedScanBlinkInProgress)
1659 del_timer_sync(&(pLed->BlinkTimer));
1660 pLed->bLedScanBlinkInProgress = FALSE;
1662 if( pLed->bLedWPSBlinkInProgress )
1664 del_timer_sync(&(pLed->BlinkTimer));
1665 pLed->bLedWPSBlinkInProgress = FALSE;
1668 mod_timer(&(pLed->BlinkTimer), 0);
1676 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
1686 PLED_819xUsb pLed = &(priv->SwLed0);
1693 else if(pLed->bLedScanBlinkInProgress ==FALSE)
1695 if(IS_LED_WPS_BLINKING(pLed))
1698 if(pLed->bLedBlinkInProgress ==TRUE)
1700 del_timer_sync(&(pLed->BlinkTimer));
1701 pLed->bLedBlinkInProgress = FALSE;
1703 pLed->bLedScanBlinkInProgress = TRUE;
1704 pLed->CurrLedState = LED_SCAN_BLINK;
1705 pLed->BlinkTimes = 24;
1706 if( pLed->bLedOn )
1707 pLed->BlinkingLedState = LED_OFF;
1709 pLed->BlinkingLedState = LED_ON;
1710 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1717 if((pLed->bLedBlinkInProgress ==FALSE) && (priv->ieee80211->state == IEEE80211_LINKED))
1719 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1724 pLed->bLedBlinkInProgress = TRUE;
1725 pLed->CurrLedState = LED_TXRX_BLINK;
1726 pLed->BlinkTimes = 2;
1727 if( pLed->bLedOn )
1728 pLed->BlinkingLedState = LED_OFF;
1730 pLed->BlinkingLedState = LED_ON;
1731 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
1736 if(IS_LED_WPS_BLINKING(pLed))
1739 pLed->CurrLedState = LED_ON;
1740 pLed->BlinkingLedState = LED_ON;
1741 if( pLed->bLedBlinkInProgress)
1743 del_timer_sync(&(pLed->BlinkTimer));
1744 pLed->bLedBlinkInProgress = FALSE;
1746 if( pLed->bLedScanBlinkInProgress)
1748 del_timer_sync(&(pLed->BlinkTimer));
1749 pLed->bLedScanBlinkInProgress = FALSE;
1752 mod_timer(&(pLed->BlinkTimer), 0);
1757 if(pLed->bLedWPSBlinkInProgress ==FALSE)
1759 if(pLed->bLedBlinkInProgress ==TRUE)
1761 del_timer_sync(&(pLed->BlinkTimer));
1762 pLed->bLedBlinkInProgress = FALSE;
1764 if(pLed->bLedScanBlinkInProgress ==TRUE)
1766 del_timer_sync(&(pLed->BlinkTimer));
1767 pLed->bLedScanBlinkInProgress = FALSE;
1769 pLed->bLedWPSBlinkInProgress = TRUE;
1770 pLed->CurrLedState = LED_BLINK_WPS;
1771 if( pLed->bLedOn )
1772 pLed->BlinkingLedState = LED_OFF;
1774 pLed->BlinkingLedState = LED_ON;
1775 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1781 if(pLed->bLedWPSBlinkInProgress)
1783 del_timer_sync(&(pLed->BlinkTimer));
1784 pLed->bLedWPSBlinkInProgress = FALSE;
1788 pLed->bLedWPSBlinkInProgress = TRUE;
1791 pLed->CurrLedState = LED_BLINK_WPS_STOP;
1792 if(pLed->bLedOn)
1794 pLed->BlinkingLedState = LED_OFF;
1795 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
1799 pLed->BlinkingLedState = LED_ON;
1800 mod_timer(&(pLed->BlinkTimer), 0);
1807 if(pLed->bLedWPSBlinkInProgress)
1809 del_timer_sync(&(pLed->BlinkTimer));
1810 pLed->bLedWPSBlinkInProgress = FALSE;
1813 pLed->CurrLedState = LED_OFF;
1814 pLed->BlinkingLedState = LED_OFF;
1815 mod_timer(&(pLed->BlinkTimer), 0);
1820 if(!IS_LED_BLINKING(pLed))
1822 pLed->CurrLedState = LED_OFF;
1823 pLed->BlinkingLedState = LED_OFF;
1824 mod_timer(&(pLed->BlinkTimer), 0);
1829 pLed->CurrLedState = LED_OFF;
1830 pLed->BlinkingLedState = LED_OFF;
1831 if( pLed->bLedBlinkInProgress)
1833 del_timer_sync(&(pLed->BlinkTimer));
1834 pLed->bLedBlinkInProgress = FALSE;
1836 if( pLed->bLedScanBlinkInProgress)
1838 del_timer_sync(&(pLed->BlinkTimer));
1839 pLed->bLedScanBlinkInProgress = FALSE;
1841 if( pLed->bLedWPSBlinkInProgress )
1843 del_timer_sync(&(pLed->BlinkTimer));
1844 pLed->bLedWPSBlinkInProgress = FALSE;
1847 mod_timer(&(pLed->BlinkTimer), 0);
1855 RT_TRACE(COMP_LED, "CurrLedState %d\n", pLed->CurrLedState);
1866 PLED_819xUsb pLed = &(priv->SwLed0);
1884 if( pLed->bLedStartToLinkBlinkInProgress == FALSE )
1886 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1890 if(pLed->bLedBlinkInProgress ==TRUE)
1892 del_timer_sync(&(pLed->BlinkTimer));
1893 pLed->bLedBlinkInProgress = FALSE;
1895 if(pLed->bLedNoLinkBlinkInProgress ==TRUE)
1897 del_timer_sync(&(pLed->BlinkTimer));
1898 pLed->bLedNoLinkBlinkInProgress = FALSE;
1901 pLed->bLedStartToLinkBlinkInProgress = TRUE;
1902 pLed->CurrLedState = LED_BLINK_StartToBlink;
1903 if( pLed->bLedOn )
1905 pLed->BlinkingLedState = LED_OFF;
1906 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
1910 pLed->BlinkingLedState = LED_ON;
1911 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
1933 if( pLed->bLedNoLinkBlinkInProgress == FALSE )
1935 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1939 if(pLed->bLedBlinkInProgress ==TRUE)
1941 del_timer_sync(&(pLed->BlinkTimer));
1942 pLed->bLedBlinkInProgress = FALSE;
1945 pLed->bLedNoLinkBlinkInProgress = TRUE;
1946 pLed->CurrLedState = LED_BLINK_SLOWLY;
1947 if( pLed->bLedOn )
1948 pLed->BlinkingLedState = LED_OFF;
1950 pLed->BlinkingLedState = LED_ON;
1951 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
1959 else if(pLed->bLedScanBlinkInProgress ==FALSE)
1961 if(IS_LED_WPS_BLINKING(pLed))
1964 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1966 del_timer_sync(&(pLed->BlinkTimer));
1967 pLed->bLedNoLinkBlinkInProgress = FALSE;
1969 if(pLed->bLedBlinkInProgress ==TRUE)
1971 del_timer_sync(&(pLed->BlinkTimer));
1972 pLed->bLedBlinkInProgress = FALSE;
1974 pLed->bLedScanBlinkInProgress = TRUE;
1975 pLed->CurrLedState = LED_SCAN_BLINK;
1976 pLed->BlinkTimes = 24;
1977 if( pLed->bLedOn )
1978 pLed->BlinkingLedState = LED_OFF;
1980 pLed->BlinkingLedState = LED_ON;
1981 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
1988 if(pLed->bLedBlinkInProgress ==FALSE)
1990 if(pLed->CurrLedState == LED_SCAN_BLINK || IS_LED_WPS_BLINKING(pLed))
1994 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
1996 del_timer_sync(&(pLed->BlinkTimer));
1997 pLed->bLedNoLinkBlinkInProgress = FALSE;
1999 pLed->bLedBlinkInProgress = TRUE;
2000 pLed->CurrLedState = LED_TXRX_BLINK;
2001 pLed->BlinkTimes = 2;
2002 if( pLed->bLedOn )
2003 pLed->BlinkingLedState = LED_OFF;
2005 pLed->BlinkingLedState = LED_ON;
2006 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
2024 if(pLed->bLedWPSBlinkInProgress ==FALSE)
2026 if(pLed->bLedNoLinkBlinkInProgress == TRUE)
2028 del_timer_sync(&(pLed->BlinkTimer));
2029 pLed->bLedNoLinkBlinkInProgress = FALSE;
2031 if(pLed->bLedBlinkInProgress ==TRUE)
2033 del_timer_sync(&(pLed->BlinkTimer));
2034 pLed->bLedBlinkInProgress = FALSE;
2036 if(pLed->bLedScanBlinkInProgress ==TRUE)
2038 del_timer_sync(&(pLed->BlinkTimer));
2039 pLed->bLedScanBlinkInProgress = FALSE;
2041 pLed->bLedWPSBlinkInProgress = TRUE;
2042 pLed->CurrLedState = LED_BLINK_WPS;
2043 if( pLed->bLedOn )
2045 pLed->BlinkingLedState = LED_OFF;
2046 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SLOWLY_INTERVAL));
2050 pLed->BlinkingLedState = LED_ON;
2051 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NORMAL_INTERVAL));
2058 if(pLed->bLedWPSBlinkInProgress)
2060 del_timer_sync(&(pLed->BlinkTimer));
2061 pLed->bLedWPSBlinkInProgress = FALSE;
2064 pLed->bLedNoLinkBlinkInProgress = TRUE;
2065 pLed->CurrLedState = LED_BLINK_SLOWLY;
2066 if( pLed->bLedOn )
2067 pLed->BlinkingLedState = LED_OFF;
2069 pLed->BlinkingLedState = LED_ON;
2070 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
2075 if(pLed->bLedWPSBlinkInProgress)
2077 del_timer_sync(&(pLed->BlinkTimer));
2078 pLed->bLedWPSBlinkInProgress = FALSE;
2081 pLed->bLedNoLinkBlinkInProgress = TRUE;
2082 pLed->CurrLedState = LED_BLINK_SLOWLY;
2083 if( pLed->bLedOn )
2084 pLed->BlinkingLedState = LED_OFF;
2086 pLed->BlinkingLedState = LED_ON;
2087 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
2104 if(pLed->bLedWPSBlinkInProgress)
2106 del_timer_sync(&(pLed->BlinkTimer));
2107 pLed->bLedWPSBlinkInProgress = FALSE;
2110 pLed->bLedNoLinkBlinkInProgress = TRUE;
2111 pLed->CurrLedState = LED_BLINK_SLOWLY;
2112 if( pLed->bLedOn )
2113 pLed->BlinkingLedState = LED_OFF;
2115 pLed->BlinkingLedState = LED_ON;
2116 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
2134 pLed->CurrLedState = LED_OFF;
2135 pLed->BlinkingLedState = LED_OFF;
2137 if( pLed->bLedNoLinkBlinkInProgress)
2139 del_timer_sync(&(pLed->BlinkTimer));
2140 pLed->bLedNoLinkBlinkInProgress = FALSE;
2142 if( pLed->bLedLinkBlinkInProgress)
2144 del_timer_sync(&(pLed->BlinkTimer));
2145 pLed->bLedLinkBlinkInProgress = FALSE;
2147 if( pLed->bLedBlinkInProgress)
2149 del_timer_sync(&(pLed->BlinkTimer));
2150 pLed->bLedBlinkInProgress = FALSE;
2152 if( pLed->bLedWPSBlinkInProgress )
2154 del_timer_sync(&(pLed->BlinkTimer));
2155 pLed->bLedWPSBlinkInProgress = FALSE;
2157 if( pLed->bLedScanBlinkInProgress)
2159 del_timer_sync(&(pLed->BlinkTimer));
2160 pLed->bLedScanBlinkInProgress = FALSE;
2162 if( pLed->bLedStartToLinkBlinkInProgress)
2164 del_timer_sync(&(pLed->BlinkTimer));
2165 pLed->bLedStartToLinkBlinkInProgress = FALSE;
2176 SwLedOff(dev, pLed);
2185 RT_TRACE(COMP_LED, "Led %d\n", pLed->CurrLedState);
2197 PLED_819xUsb pLed = &(priv->SwLed0);
2200 pLed = &(priv->SwLed1);
2207 if(pLed->CurrLedState == LED_SCAN_BLINK)
2211 pLed->CurrLedState = LED_ON;
2212 pLed->BlinkingLedState = LED_ON;
2213 pLed->bLedBlinkInProgress = FALSE;
2214 mod_timer(&(pLed->BlinkTimer), 0);
2220 else if(pLed->bLedScanBlinkInProgress ==FALSE)
2222 if(pLed->bLedBlinkInProgress ==TRUE)
2224 del_timer_sync(&(pLed->BlinkTimer));
2225 pLed->bLedBlinkInProgress = FALSE;
2227 pLed->bLedScanBlinkInProgress = TRUE;
2228 pLed->CurrLedState = LED_SCAN_BLINK;
2229 pLed->BlinkTimes = 24;
2230 if( pLed->bLedOn )
2231 pLed->BlinkingLedState = LED_OFF;
2233 pLed->BlinkingLedState = LED_ON;
2234 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_SCAN_INTERVAL_ALPHA));
2241 if(pLed->bLedBlinkInProgress ==FALSE)
2243 if(pLed->CurrLedState == LED_SCAN_BLINK)
2247 pLed->bLedBlinkInProgress = TRUE;
2248 pLed->CurrLedState = LED_TXRX_BLINK;
2249 pLed->BlinkTimes = 2;
2250 if( pLed->bLedOn )
2251 pLed->BlinkingLedState = LED_OFF;
2253 pLed->BlinkingLedState = LED_ON;
2254 mod_timer(&(pLed->BlinkTimer), jiffies + MSECS(LED_BLINK_FASTER_INTERVAL_ALPHA));
2259 pLed->CurrLedState = LED_OFF;
2260 pLed->BlinkingLedState = LED_OFF;
2262 if( pLed->bLedBlinkInProgress)
2264 del_timer_sync(&(pLed->BlinkTimer));
2265 pLed->bLedBlinkInProgress = FALSE;
2268 SwLedOff(dev, pLed);
2276 RT_TRACE(COMP_LED, "Led %d\n", pLed->CurrLedState);