wifi: (fixes #2421) Forbid negative RemainingAmpduDuration for the last MPDU in A-MPDU tag

This commit is contained in:
Sébastien Deronne
2016-06-17 13:52:50 +02:00
parent e96f106db0
commit 20719679ad
2 changed files with 10 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ Bugs fixed
- Bug 2414 - UdpSocket doesn't call NotifyConnectionFailed
- Bug 2419 - BsmApplication should use RecvFrom and not SocketAddressTag
- Bug 2420 - Remove code duplication between Wifi and Wave modules
- Bug 2421 - Negative RemainingAmpduDuration for the last MPDU in A-MPDU tag
- Bug 2425 - UdpSocketImpl simplification
- Bug 2427 - 802.11ac selects wrong slot duration
- Bug 2433 - Bic does not copy private parameters

View File

@@ -1694,7 +1694,14 @@ MacLow::ForwardDown (Ptr<const Packet> packet, const WifiMacHeader* hdr,
remainingAmpduDuration -= mpduDuration;
ampdutag.SetRemainingNbOfMpdus (queueSize - 1);
ampdutag.SetRemainingAmpduDuration (remainingAmpduDuration);
if (queueSize > 1)
{
ampdutag.SetRemainingAmpduDuration (remainingAmpduDuration);
}
else
{
ampdutag.SetRemainingAmpduDuration (NanoSeconds (0));
}
newPacket->AddPacketTag (ampdutag);
if (delay == Seconds (0))
@@ -1707,6 +1714,7 @@ MacLow::ForwardDown (Ptr<const Packet> packet, const WifiMacHeader* hdr,
}
if (queueSize > 1)
{
NS_ASSERT (remainingAmpduDuration > 0);
delay = delay + mpduDuration;
}