--- a/src/wifi/model/mac-low.cc Mon Mar 21 22:11:53 2016 -0700
+++ b/src/wifi/model/mac-low.cc Mon Mar 21 22:25:34 2016 -0700
@@ -2349,9 +2349,7 @@
MacLow::SendAckAfterData (Mac48Address source, Time duration, WifiMode dataTxMode, double dataSnr)
{
NS_LOG_FUNCTION (this);
- /* send an ACK when you receive
- * a packet after SIFS.
- */
+ // send an ACK, after SIFS, when you receive a packet
WifiTxVector ackTxVector = GetAckTxVector (source, dataTxMode);
WifiMacHeader ack;
ack.SetType (WIFI_MAC_CTL_ACK);
@@ -2360,9 +2358,11 @@
ack.SetNoRetry ();
ack.SetNoMoreFragments ();
ack.SetAddr1 (source);
+ // 802.11-2012, Section 8.3.1.4: Duration/ID is received duration value
+ // minus the time to transmit the ACK frame and its SIFS interval
duration -= GetAckDuration (ackTxVector);
duration -= GetSifs ();
- NS_ASSERT (duration >= MicroSeconds (0));
+ NS_ASSERT_MSG (duration >= MicroSeconds (0), "Please provide test case to maintainers if this assert is hit.");
ack.SetDuration (duration);
Ptr<Packet> packet = Create<Packet> ();