wifi: (fixes #211) Remove MSDUs with expired lifetime when (re)starting channel access
This commit is contained in:
committed by
Tom Henderson
parent
dded72e02e
commit
4547326445
@@ -985,11 +985,15 @@ void
|
||||
QosTxop::RestartAccessIfNeeded (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
if ((m_currentPacket != 0
|
||||
// check first if the BA manager retransmit queue is empty, so that expired
|
||||
// frames (if any) are removed and a BlockAckRequest is scheduled to advance
|
||||
// the starting sequence number of the transmit (and receiver) window
|
||||
|| m_baManager->HasPackets () || !m_queue->IsEmpty ())
|
||||
|
||||
// check if the BA manager retransmit queue is empty, so that expired
|
||||
// frames (if any) are removed and a BlockAckRequest is scheduled to advance
|
||||
// the starting sequence number of the transmit (and receiver) window
|
||||
bool baManagerHasPackets = m_baManager->HasPackets ();
|
||||
// remove MSDUs with expired lifetime starting from the head of the queue
|
||||
bool queueIsNotEmpty = !m_queue->IsEmpty ();
|
||||
|
||||
if ((m_currentPacket != 0 || baManagerHasPackets || queueIsNotEmpty)
|
||||
&& !IsAccessRequested ())
|
||||
{
|
||||
Ptr<const Packet> packet;
|
||||
@@ -1024,11 +1028,16 @@ void
|
||||
QosTxop::StartAccessIfNeeded (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
// check if the BA manager retransmit queue is empty, so that expired
|
||||
// frames (if any) are removed and a BlockAckRequest is scheduled to advance
|
||||
// the starting sequence number of the transmit (and receiver) window
|
||||
bool baManagerHasPackets = m_baManager->HasPackets ();
|
||||
// remove MSDUs with expired lifetime starting from the head of the queue
|
||||
bool queueIsNotEmpty = !m_queue->IsEmpty ();
|
||||
|
||||
if (m_currentPacket == 0
|
||||
// check first if the BA manager retransmit queue is empty, so that expired
|
||||
// frames (if any) are removed and a BlockAckRequest is scheduled to advance
|
||||
// the starting sequence number of the transmit (and receiver) window
|
||||
&& (m_baManager->HasPackets () || !m_queue->IsEmpty ())
|
||||
&& (baManagerHasPackets || queueIsNotEmpty)
|
||||
&& !IsAccessRequested ())
|
||||
{
|
||||
Ptr<const Packet> packet;
|
||||
|
||||
Reference in New Issue
Block a user