|
|
| 561 |
(*queueIt).hdr.GetFragmentNumber ())) |
561 |
(*queueIt).hdr.GetFragmentNumber ())) |
| 562 |
{ |
562 |
{ |
| 563 |
nSuccessfulMpdus++; |
563 |
nSuccessfulMpdus++; |
|
|
564 |
RemoveFromRetryQueue (recipient, tid, (*queueIt).hdr.GetSequenceNumber ()); |
| 564 |
queueIt = it->second.second.erase (queueIt); |
565 |
queueIt = it->second.second.erase (queueIt); |
| 565 |
} |
566 |
} |
| 566 |
else |
567 |
else |
|
|
| 584 |
{ |
585 |
{ |
| 585 |
for (PacketQueueI queueIt = it->second.second.begin (); queueIt != queueEnd; ) |
586 |
for (PacketQueueI queueIt = it->second.second.begin (); queueIt != queueEnd; ) |
| 586 |
{ |
587 |
{ |
| 587 |
if (blockAck->IsPacketReceived ((*queueIt).hdr.GetSequenceNumber ())) |
588 |
uint16_t currentSeq = (*queueIt).hdr.GetSequenceNumber (); |
|
|
589 |
if (blockAck->IsPacketReceived (currentSeq)) |
| 588 |
{ |
590 |
{ |
| 589 |
uint16_t currentSeq = (*queueIt).hdr.GetSequenceNumber (); |
|
|
| 590 |
while (queueIt != queueEnd |
591 |
while (queueIt != queueEnd |
| 591 |
&& (*queueIt).hdr.GetSequenceNumber () == currentSeq) |
592 |
&& (*queueIt).hdr.GetSequenceNumber () == currentSeq) |
| 592 |
{ |
593 |
{ |
|
|
| 595 |
{ |
596 |
{ |
| 596 |
m_txOkCallback ((*queueIt).hdr); |
597 |
m_txOkCallback ((*queueIt).hdr); |
| 597 |
} |
598 |
} |
|
|
599 |
RemoveFromRetryQueue (recipient, tid, currentSeq); |
| 598 |
queueIt = it->second.second.erase (queueIt); |
600 |
queueIt = it->second.second.erase (queueIt); |
| 599 |
} |
601 |
} |
| 600 |
} |
602 |
} |
|
|
| 820 |
} |
822 |
} |
| 821 |
|
823 |
|
| 822 |
void |
824 |
void |
|
|
825 |
BlockAckManager::RemoveFromRetryQueue (Mac48Address address, uint8_t tid, uint16_t seq) |
| 826 |
{ |
| 827 |
/* remove retry packet iterator if it's present in retry queue */ |
| 828 |
std::list<PacketQueueI>::iterator it = m_retryPackets.begin (); |
| 829 |
while (it != m_retryPackets.end ()) |
| 830 |
{ |
| 831 |
if ((*it)->hdr.GetAddr1 () == address && |
| 832 |
(*it)->hdr.GetQosTid () == tid && |
| 833 |
(*it)->hdr.GetSequenceNumber () == seq) |
| 834 |
{ |
| 835 |
it = m_retryPackets.erase (it); |
| 836 |
} |
| 837 |
else |
| 838 |
{ |
| 839 |
it++; |
| 840 |
} |
| 841 |
} |
| 842 |
} |
| 843 |
|
| 844 |
void |
| 823 |
BlockAckManager::CleanupBuffers (void) |
845 |
BlockAckManager::CleanupBuffers (void) |
| 824 |
{ |
846 |
{ |
| 825 |
NS_LOG_FUNCTION (this); |
847 |
NS_LOG_FUNCTION (this); |
|
|
| 840 |
} |
862 |
} |
| 841 |
else |
863 |
else |
| 842 |
{ |
864 |
{ |
| 843 |
/* remove retry packet iterator if it's present in retry queue */ |
865 |
RemoveFromRetryQueue (j->second.first.GetPeer (), |
| 844 |
for (std::list<PacketQueueI>::iterator it = m_retryPackets.begin (); it != m_retryPackets.end (); ) |
866 |
j->second.first.GetTid (), |
| 845 |
{ |
867 |
i->hdr.GetSequenceNumber ()); |
| 846 |
if ((*it)->hdr.GetAddr1 () == j->second.first.GetPeer () |
|
|
| 847 |
&& (*it)->hdr.GetQosTid () == j->second.first.GetTid () |
| 848 |
&& (*it)->hdr.GetSequenceNumber () == i->hdr.GetSequenceNumber ()) |
| 849 |
{ |
| 850 |
it = m_retryPackets.erase (it); |
| 851 |
} |
| 852 |
else |
| 853 |
{ |
| 854 |
it++; |
| 855 |
} |
| 856 |
} |
| 857 |
} |
868 |
} |
| 858 |
} |
869 |
} |
| 859 |
j->second.second.erase (j->second.second.begin (), end); |
870 |
j->second.second.erase (j->second.second.begin (), end); |