wifi: Schedule a BAR (if needed) when requesting channel access

This commit is contained in:
Stefano Avallone
2019-08-28 11:46:27 +02:00
parent 5b4527e695
commit 7eae5c8387

View File

@@ -941,7 +941,10 @@ QosTxop::RestartAccessIfNeeded (void)
{
NS_LOG_FUNCTION (this);
if ((m_currentPacket != 0
|| !m_queue->IsEmpty () || m_baManager->HasPackets ())
// check first if the BA manager retransmit queue is empty, so that expired
// frames (if any) are removed and a Block Ack Request is scheduled to advance
// the starting sequence number of the transmit (and receiver) window
|| m_baManager->HasPackets () || !m_queue->IsEmpty ())
&& !IsAccessRequested ())
{
Ptr<const Packet> packet;
@@ -978,7 +981,10 @@ QosTxop::StartAccessIfNeeded (void)
{
NS_LOG_FUNCTION (this);
if (m_currentPacket == 0
&& (!m_queue->IsEmpty () || m_baManager->HasPackets ())
// check first if the BA manager retransmit queue is empty, so that expired
// frames (if any) are removed and a Block Ack Request is scheduled to advance
// the starting sequence number of the transmit (and receiver) window
&& (m_baManager->HasPackets () || !m_queue->IsEmpty ())
&& !IsAccessRequested ())
{
Ptr<const Packet> packet;