|
Lines 544-556
MacLow::StartTransmission (Ptr<const Packet> packet,
|
Link Here
|
|---|
|
| 544 |
//In that case, we transmit the same A-MPDU as previously. |
544 |
//In that case, we transmit the same A-MPDU as previously. |
| 545 |
uint32_t sentMpdus = m_aggregateQueue[GetTid (packet, *hdr)]->GetNPackets (); |
545 |
uint32_t sentMpdus = m_aggregateQueue[GetTid (packet, *hdr)]->GetNPackets (); |
| 546 |
m_ampdu = true; |
546 |
m_ampdu = true; |
| 547 |
if (sentMpdus > 64) |
547 |
if (sentMpdus > 1) |
| 548 |
{ |
548 |
{ |
| 549 |
m_txParams.EnableExtendedCompressedBlockAck (); |
549 |
AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr)); |
| 550 |
} |
550 |
std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac); |
| 551 |
else if (sentMpdus > 1) |
551 |
if (edcaIt->second->GetBaBufferSize (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) > 64) |
| 552 |
{ |
552 |
{ |
| 553 |
m_txParams.EnableCompressedBlockAck (); |
553 |
m_txParams.EnableExtendedCompressedBlockAck (); |
|
|
554 |
} |
| 555 |
else |
| 556 |
{ |
| 557 |
m_txParams.EnableCompressedBlockAck (); |
| 558 |
} |
| 554 |
} |
559 |
} |
| 555 |
else if (m_currentHdr.IsQosData ()) |
560 |
else if (m_currentHdr.IsQosData ()) |
| 556 |
{ |
561 |
{ |
|
Lines 579-591
MacLow::StartTransmission (Ptr<const Packet> packet,
|
Link Here
|
|---|
|
| 579 |
{ |
584 |
{ |
| 580 |
AmpduTag ampdu; |
585 |
AmpduTag ampdu; |
| 581 |
m_currentPacket->PeekPacketTag (ampdu); |
586 |
m_currentPacket->PeekPacketTag (ampdu); |
| 582 |
if (ampdu.GetRemainingNbOfMpdus () > 63) |
587 |
if (ampdu.GetRemainingNbOfMpdus () > 0) |
| 583 |
{ |
|
|
| 584 |
m_txParams.EnableExtendedCompressedBlockAck (); |
| 585 |
} |
| 586 |
else if (ampdu.GetRemainingNbOfMpdus () > 0) |
| 587 |
{ |
588 |
{ |
| 588 |
m_txParams.EnableCompressedBlockAck (); |
589 |
AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr)); |
|
|
590 |
std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac); |
| 591 |
if (edcaIt->second->GetBaBufferSize (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) > 64) |
| 592 |
{ |
| 593 |
m_txParams.EnableExtendedCompressedBlockAck (); |
| 594 |
} |
| 595 |
else |
| 596 |
{ |
| 597 |
m_txParams.EnableCompressedBlockAck (); |
| 598 |
} |
| 589 |
} |
599 |
} |
| 590 |
else if (m_currentHdr.IsQosData ()) |
600 |
else if (m_currentHdr.IsQosData ()) |
| 591 |
{ |
601 |
{ |
|
Lines 2319-2324
MacLow::RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_
|
Link Here
|
|---|
|
| 2319 |
(*it).second.second.erase ((*it).second.second.begin (), lastComplete); |
2329 |
(*it).second.second.erase ((*it).second.second.begin (), lastComplete); |
| 2320 |
} |
2330 |
} |
| 2321 |
} |
2331 |
} |
|
|
2332 |
|
| 2322 |
void |
2333 |
void |
| 2323 |
MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Address originator, bool immediate, |
2334 |
MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Address originator, bool immediate, |
| 2324 |
Time duration, WifiMode blockAckReqTxMode, double rxSnr) |
2335 |
Time duration, WifiMode blockAckReqTxMode, double rxSnr) |
|
Lines 2370-2376
MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Addre
|
Link Here
|
|---|
|
| 2370 |
} |
2381 |
} |
| 2371 |
|
2382 |
|
| 2372 |
void |
2383 |
void |
| 2373 |
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr, uint8_t nMpdus) |
2384 |
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr) |
| 2374 |
{ |
2385 |
{ |
| 2375 |
NS_LOG_FUNCTION (this); |
2386 |
NS_LOG_FUNCTION (this); |
| 2376 |
if (!m_phy->IsStateTx () && !m_phy->IsStateRx ()) |
2387 |
if (!m_phy->IsStateTx () && !m_phy->IsStateRx ()) |
|
Lines 2387-2393
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time durat
|
Link Here
|
|---|
|
| 2387 |
blockAck.SetStartingSequence (seqNumber); |
2398 |
blockAck.SetStartingSequence (seqNumber); |
| 2388 |
blockAck.SetTidInfo (tid); |
2399 |
blockAck.SetTidInfo (tid); |
| 2389 |
immediate = (*it).second.first.IsImmediateBlockAck (); |
2400 |
immediate = (*it).second.first.IsImmediateBlockAck (); |
| 2390 |
if (nMpdus > 63) |
2401 |
if ((*it).second.first.GetBufferSize () > 64) |
| 2391 |
{ |
2402 |
{ |
| 2392 |
blockAck.SetType (EXTENDED_COMPRESSED_BLOCK_ACK); |
2403 |
blockAck.SetType (EXTENDED_COMPRESSED_BLOCK_ACK); |
| 2393 |
} |
2404 |
} |
|
Lines 2398-2404
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time durat
|
Link Here
|
|---|
|
| 2398 |
NS_LOG_DEBUG ("Got Implicit block Ack Req with seq " << seqNumber); |
2409 |
NS_LOG_DEBUG ("Got Implicit block Ack Req with seq " << seqNumber); |
| 2399 |
(*i).second.FillBlockAckBitmap (&blockAck); |
2410 |
(*i).second.FillBlockAckBitmap (&blockAck); |
| 2400 |
|
2411 |
|
| 2401 |
SendBlockAckResponse (&blockAck, originator, immediate, duration, blockAckReqTxVector.GetMode (), rxSnr); |
2412 |
WifiTxVector blockAckTxVector = GetBlockAckTxVector (originator, blockAckReqTxVector.GetMode ()); |
|
|
2413 |
|
| 2414 |
SendBlockAckResponse (&blockAck, originator, immediate, duration, blockAckTxVector.GetMode (), rxSnr); |
| 2402 |
} |
2415 |
} |
| 2403 |
else |
2416 |
else |
| 2404 |
{ |
2417 |
{ |
|
Lines 2530-2537
MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr,
|
Link Here
|
|---|
|
| 2530 |
firsthdr.GetQosTid (), |
2543 |
firsthdr.GetQosTid (), |
| 2531 |
firsthdr.GetAddr2 (), |
2544 |
firsthdr.GetAddr2 (), |
| 2532 |
firsthdr.GetDuration (), |
2545 |
firsthdr.GetDuration (), |
| 2533 |
txVector, rxSnr, |
2546 |
txVector, rxSnr); |
| 2534 |
ampdu.GetRemainingNbOfMpdus () + 1); |
|
|
| 2535 |
} |
2547 |
} |
| 2536 |
|
2548 |
|
| 2537 |
if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ()) |
2549 |
if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ()) |