/* 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;
}
}
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--;
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;
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 {
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:
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;
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;
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:
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;
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;
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:
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:
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:
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:
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;
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:
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:
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*/
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--;
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:
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:
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:
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:
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:
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:
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:
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:
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;
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:
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:
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;
_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;
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;
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;
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*/
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;
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:
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:
_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;
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:
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:
_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:
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:
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:
}
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:
_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;
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 ||
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;
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) {
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:
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:
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*/
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) {
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;
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) {
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));
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) {
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));
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;
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) &&
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:
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:
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:
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*/
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:
}
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;