|
Lines 101-109
EdcaTxopN::DoDispose (void)
|
Link Here
|
|---|
|
| 101 |
} |
101 |
} |
| 102 |
|
102 |
|
| 103 |
bool |
103 |
bool |
| 104 |
EdcaTxopN::GetBaAgreementExists (Mac48Address address, uint8_t tid) const |
104 |
EdcaTxopN::GetEstablishedBaAgreementExists (Mac48Address address, uint8_t tid) const |
| 105 |
{ |
105 |
{ |
| 106 |
return m_baManager->ExistsAgreement (address, tid); |
106 |
return m_baManager->ExistsAgreementInState (address, tid, OriginatorBlockAckAgreement::ESTABLISHED); |
|
|
107 |
} |
| 108 |
|
| 109 |
uint16_t |
| 110 |
EdcaTxopN::GetAgreementBufferSize (Mac48Address recipient, uint8_t tid) const |
| 111 |
{ |
| 112 |
NS_LOG_FUNCTION (this << recipient << static_cast<uint16_t> (tid)); |
| 113 |
NS_ASSERT (GetEstablishedBaAgreementExists (recipient, tid)); |
| 114 |
uint16_t bufferSize = m_baManager->GetAgreementBufferSize (recipient, tid); |
| 115 |
return bufferSize; |
| 116 |
} |
| 117 |
|
| 118 |
Ptr<BlockAckManager> |
| 119 |
EdcaTxopN::GetBlockAckManager (void) const |
| 120 |
{ |
| 121 |
return m_baManager; |
| 107 |
} |
122 |
} |
| 108 |
|
123 |
|
| 109 |
void |
124 |
void |
|
Lines 435-441
EdcaTxopN::MissedCts (void)
|
Link Here
|
|---|
|
| 435 |
uint8_t tid = GetTid (m_currentPacket, m_currentHdr); |
450 |
uint8_t tid = GetTid (m_currentPacket, m_currentHdr); |
| 436 |
m_low->FlushAggregateQueue (tid); |
451 |
m_low->FlushAggregateQueue (tid); |
| 437 |
|
452 |
|
| 438 |
if (GetBaAgreementExists (m_currentHdr.GetAddr1 (), tid)) |
453 |
if (GetEstablishedBaAgreementExists (m_currentHdr.GetAddr1 (), tid)) |
| 439 |
{ |
454 |
{ |
| 440 |
NS_LOG_DEBUG ("Transmit Block Ack Request"); |
455 |
NS_LOG_DEBUG ("Transmit Block Ack Request"); |
| 441 |
CtrlBAckRequestHeader reqHdr; |
456 |
CtrlBAckRequestHeader reqHdr; |
|
Lines 563-569
EdcaTxopN::MissedAck (void)
|
Link Here
|
|---|
|
| 563 |
{ |
578 |
{ |
| 564 |
uint8_t tid = GetTid (m_currentPacket, m_currentHdr); |
579 |
uint8_t tid = GetTid (m_currentPacket, m_currentHdr); |
| 565 |
|
580 |
|
| 566 |
if (GetBaAgreementExists (m_currentHdr.GetAddr1 (), tid)) |
581 |
if (GetEstablishedBaAgreementExists (m_currentHdr.GetAddr1 (), tid)) |
| 567 |
{ |
582 |
{ |
| 568 |
//send Block ACK Request in order to shift WinStart at the receiver |
583 |
//send Block ACK Request in order to shift WinStart at the receiver |
| 569 |
NS_LOG_DEBUG ("Transmit Block Ack Request"); |
584 |
NS_LOG_DEBUG ("Transmit Block Ack Request"); |
|
Lines 955-961
EdcaTxopN::NeedFragmentation (void) const
|
Link Here
|
|---|
|
| 955 |
|| GetAmpduExist (m_currentHdr.GetAddr1 ()) |
970 |
|| GetAmpduExist (m_currentHdr.GetAddr1 ()) |
| 956 |
|| (m_stationManager->HasHtSupported () |
971 |
|| (m_stationManager->HasHtSupported () |
| 957 |
&& m_currentHdr.IsQosData () |
972 |
&& m_currentHdr.IsQosData () |
| 958 |
&& GetBaAgreementExists (m_currentHdr.GetAddr1 (), GetTid (m_currentPacket, m_currentHdr)) |
973 |
&& GetEstablishedBaAgreementExists (m_currentHdr.GetAddr1 (), GetTid (m_currentPacket, m_currentHdr)) |
| 959 |
&& GetMpduAggregator ()->GetMaxAmpduSize () >= m_currentPacket->GetSize ())) |
974 |
&& GetMpduAggregator ()->GetMaxAmpduSize () >= m_currentPacket->GetSize ())) |
| 960 |
{ |
975 |
{ |
| 961 |
//MSDU is not fragmented when it is transmitted using an HT-immediate or |
976 |
//MSDU is not fragmented when it is transmitted using an HT-immediate or |
|
Lines 1469-1478
EdcaTxopN::SendAddBaRequest (Mac48Address dest, uint8_t tid, uint16_t startSeq,
|
Link Here
|
|---|
|
| 1469 |
reqHdr.SetDelayedBlockAck (); |
1484 |
reqHdr.SetDelayedBlockAck (); |
| 1470 |
} |
1485 |
} |
| 1471 |
reqHdr.SetTid (tid); |
1486 |
reqHdr.SetTid (tid); |
| 1472 |
/* For now we don't use buffer size field in the ADDBA request frame. The recipient |
1487 |
/* Send the device's max buffer size field in the ADDBA request frame to facilitate analysis through sniffers. |
| 1473 |
* will choose how many packets it can receive under block ack. |
1488 |
* Note that this information is only advisory since it's up to the recipient to choose how many packets |
|
|
1489 |
* it can receive under block ack. |
| 1474 |
*/ |
1490 |
*/ |
| 1475 |
reqHdr.SetBufferSize (0); |
1491 |
reqHdr.SetBufferSize (m_baManager->GetMaxBufferSize () - 1); |
| 1476 |
reqHdr.SetTimeout (timeout); |
1492 |
reqHdr.SetTimeout (timeout); |
| 1477 |
reqHdr.SetStartingSequence (startSeq); |
1493 |
reqHdr.SetStartingSequence (startSeq); |
| 1478 |
|
1494 |
|