35 (1 == Adapter->
PackInfo[i].ucDirection))
37 liCurrentTime = ((tv.tv_sec-
38 Adapter->
PackInfo[
i].stLastUpdateTokenAt.tv_sec)*1000 +
39 (tv.tv_usec-Adapter->
PackInfo[i].stLastUpdateTokenAt.tv_usec)/
44 ((Adapter->
PackInfo[i].uiMaxAllowedRate) *
45 ((
ULONG)((liCurrentTime)))/1000);
48 Adapter->
PackInfo[
i].liLastUpdateTokenAt = liCurrentTime;
49 if((Adapter->
PackInfo[i].uiCurrentTokenCount) >=
50 Adapter->
PackInfo[i].uiMaxBucketSize)
52 Adapter->
PackInfo[
i].uiCurrentTokenCount =
82 if(
NULL == Adapter || (psSF < Adapter->PackInfo &&
120 UINT uiIndex =0,PktLen = 0;
123 if(!Adapter || !Packet || !psSF)
134 PktLen = Packet->
len;
162 char *pControlPacket =
NULL;
192 iPacketLen = QueuePacket->
len;
197 if(iPacketLen <= GetSFTokenCount(Adapter, psSF))
208 Status = SendPacketFromQueue(Adapter, psSF, QueuePacket);
278 UINT uiPrevTotalCount = 0;
298 UpdateTokenCount(Adapter);
306 for(iIndex=HiPriority;iIndex>=0;iIndex--)
311 if(Adapter->
PackInfo[iIndex].bValid &&
312 Adapter->
PackInfo[iIndex].uiPendedLast &&
313 Adapter->
PackInfo[iIndex].uiCurrentBytesOnHost)
316 CheckAndSendPacketFromIndex(Adapter, &Adapter->
PackInfo[iIndex]);
325 for(iIndex=HiPriority;iIndex>=0;iIndex--)
330 if(Adapter->
PackInfo[iIndex].bValid &&
331 Adapter->
PackInfo[iIndex].uiCurrentBytesOnHost &&
332 !Adapter->
PackInfo[iIndex].uiPendedLast )
335 CheckAndSendPacketFromIndex(Adapter, &Adapter->
PackInfo[iIndex]);
346 if(exit_flag ==
TRUE )