|
@@ -316,17 +316,19 @@ s_MgrMakeProbeRequest(
|
|
|
return pTxPacket;
|
|
|
}
|
|
|
|
|
|
-void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond)
|
|
|
+void vCommandTimerWait(void *hDeviceContext, unsigned long MSecond)
|
|
|
{
|
|
|
- PSDevice pDevice = (PSDevice)hDeviceContext;
|
|
|
+ PSDevice pDevice = (PSDevice)hDeviceContext;
|
|
|
|
|
|
- init_timer(&pDevice->sTimerCommand);
|
|
|
- pDevice->sTimerCommand.data = (unsigned long)pDevice;
|
|
|
- pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
|
|
|
- // RUN_AT :1 msec ~= (HZ/1024)
|
|
|
- pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10);
|
|
|
- add_timer(&pDevice->sTimerCommand);
|
|
|
- return;
|
|
|
+ init_timer(&pDevice->sTimerCommand);
|
|
|
+
|
|
|
+ pDevice->sTimerCommand.data = (unsigned long)pDevice;
|
|
|
+ pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
|
|
|
+ pDevice->sTimerCommand.expires = RUN_AT((MSecond * HZ) / 1000);
|
|
|
+
|
|
|
+ add_timer(&pDevice->sTimerCommand);
|
|
|
+
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
void vRunCommand(void *hDeviceContext)
|