wifi: (fixes #2307) reset m_receivedAtLeastOneAmpdu regardless of ACK policy

This commit is contained in:
Alexander Krotov
2016-02-24 17:40:04 +01:00
parent a02ee29905
commit 140d614f13
2 changed files with 27 additions and 23 deletions

View File

@@ -110,6 +110,7 @@ Bugs fixed
- Bug 2297 - 802.11n/ac networks are not compatible with legacy clients
- Bug 2302 - Fixing RTT calculation inside TCP Socket
- Bug 2303 - WifiMacQueue::GetSize should cleanup queue beforehand
- Bug 2307 - m_receivedAtLeastOneMpdu is not always reset
Known issues
------------

View File

@@ -2853,31 +2853,34 @@ MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr,
}
}
if (normalAck && (ampdu.GetNoOfMpdus () == 1) && !vhtSingleMpdu)
if (ampdu.GetNoOfMpdus () == 1 && !vhtSingleMpdu)
{
//send block Ack
if (firsthdr.IsBlockAckReq ())
if (normalAck)
{
NS_FATAL_ERROR ("Sending a BlockAckReq with QosPolicy equal to Normal Ack");
}
uint8_t tid = firsthdr.GetQosTid ();
AgreementsI it = m_bAckAgreements.find (std::make_pair (firsthdr.GetAddr2 (), tid));
if (it != m_bAckAgreements.end ())
{
NS_ASSERT (m_sendAckEvent.IsExpired ());
/* See section 11.5.3 in IEEE 802.11 for mean of this timer */
ResetBlockAckInactivityTimerIfNeeded (it->second.first);
NS_LOG_DEBUG ("rx A-MPDU/sendImmediateBlockAck from=" << firsthdr.GetAddr2 ());
m_sendAckEvent = Simulator::Schedule (GetSifs (),
&MacLow::SendBlockAckAfterAmpdu, this,
firsthdr.GetQosTid (),
firsthdr.GetAddr2 (),
firsthdr.GetDuration (),
txVector);
}
else
{
NS_LOG_DEBUG ("There's not a valid agreement for this block ack request.");
//send block Ack
if (firsthdr.IsBlockAckReq ())
{
NS_FATAL_ERROR ("Sending a BlockAckReq with QosPolicy equal to Normal Ack");
}
uint8_t tid = firsthdr.GetQosTid ();
AgreementsI it = m_bAckAgreements.find (std::make_pair (firsthdr.GetAddr2 (), tid));
if (it != m_bAckAgreements.end ())
{
NS_ASSERT (m_sendAckEvent.IsExpired ());
/* See section 11.5.3 in IEEE 802.11 for mean of this timer */
ResetBlockAckInactivityTimerIfNeeded (it->second.first);
NS_LOG_DEBUG ("rx A-MPDU/sendImmediateBlockAck from=" << firsthdr.GetAddr2 ());
m_sendAckEvent = Simulator::Schedule (GetSifs (),
&MacLow::SendBlockAckAfterAmpdu, this,
firsthdr.GetQosTid (),
firsthdr.GetAddr2 (),
firsthdr.GetDuration (),
txVector);
}
else
{
NS_LOG_DEBUG ("There's not a valid agreement for this block ack request.");
}
}
m_receivedAtLeastOneMpdu = false;
}