22 u16 Duration, NextBodyLen, OffsetSize;
24 unsigned char CTS_on =
false, RTS_on =
false;
27 unsigned char boGroupAddr =
false;
63 if (RTS_on || CTS_on) {
71 ((BodyLen*8 + 22 + Rate*4 - 1)/(Rate*4))*
Tsym +
72 ((112 + 22 + 95)/96)*
Tsym;
83 Duration += (((BodyLen + 14)*8 + Rate-1) / Rate +
94 ((112 + 22 + 95)/96)*
Tsym);
130 Duration += (((NextBodyLen*8 + 22 + Rate*4 - 1)/(Rate*4)) *
Tsym +
131 (((2*14)*8 + 22 + 95)/96)*
Tsym +
144 Duration += (((NextBodyLen + (2*14))*8 + Rate-1) / Rate +
155 buffer += OffsetSize;
202 u16 SizeLeft, CopySize, CopyLeft, stmp;
203 u8 buf_index, FragmentCount = 0;
207 buffer = TargetBuffer;
221 SizeLeft -= CopySize;
226 *pctmp |= FragmentCount;
255 memcpy(buffer, src_buffer, CopyLeft);
257 CopySize -= CopyLeft;
266 }
else if (SizeLeft < 8) {
276 buffer = TargetBuffer +
Size;
277 memcpy(buffer, TargetBuffer, 32);
287 buffer = (
u8 *)pT00 + 8;
300 u8 i, ctmp1, ctmp2, ctmpf;
331 FragmentThreshold -= (DOT_11_MAC_HEADER_SIZE + 4);
335 TargetBuffer[1] |= 0x04;
340 stmp = *(
u16 *)(TargetBuffer+30);
350 for (i = 0; i < 2; i++) {
358 else if (ctmp1 == 96)
360 else if (ctmp1 == 72)
362 else if (ctmp1 == 48)
364 else if (ctmp1 == 36)
366 else if (ctmp1 == 24)
368 else if (ctmp1 == 18)
370 else if (ctmp1 == 12)
372 else if (ctmp1 == 22)
374 else if (ctmp1 == 11)
426 static void MLME_SendComplete(
struct wbsoft_priv *adapter,
u8 PacketID,
unsigned char SendOK)
430 MLMEfreeMMPDUBuffer(adapter, adapter->
sMlmeFrame.pMMPDU);
446 unsigned char BufferFilled =
false;
461 if (pMds->
TxOwner[FillIndex]) {
462 pr_debug(
"[Mds_Tx] Tx Owner is H/W.\n");
477 FragmentCount = PacketSize/FragmentThreshold + 1;
478 stmp = PacketSize + FragmentCount*32 + 8;
480 printk(
"[Mds_Tx] Excess max tx buffer.\n");
499 MLME_GetNextPacket(adapter, pTxDes);
502 Mds_HeaderCopy(adapter, pTxDes, XmitBufAddress);
506 pr_debug(
"35: EPA 4th frame detected. Size = %d\n", PacketSize);
511 CurrentSize = Mds_BodyCopy(adapter, pTxDes, XmitBufAddress);
514 Mds_DurationSet(adapter, pTxDes, XmitBufAddress);
517 XmitBufSize += CurrentSize;
518 XmitBufAddress += CurrentSize;
521 MLME_SendComplete(adapter, 0,
true);
525 if (pMds->
TxTsc == 0)
544 BufferFilled =
false;
569 unsigned char SendOK =
true;
570 u8 RetryCount, TxRate;
577 TxRate = pMds->
TxRate[PacketId][0];