diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index e08d100ac..25191fa63 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1764,9 +1764,9 @@ WifiPhy::NotifyMonitorSniffTx (Ptr psdu, uint16_t channelFreqMhz for (size_t i = 0; i < nMpdus;) { m_phyMonitorSniffTxTrace (psdu->GetAmpduSubframe (i), channelFreqMhz, txVector, aMpdu, staId); + ++i; + aMpdu.type = (i == (nMpdus - 1)) ? LAST_MPDU_IN_AGGREGATE : MIDDLE_MPDU_IN_AGGREGATE; } - ++i; - aMpdu.type = (i == (nMpdus - 1)) ? LAST_MPDU_IN_AGGREGATE : MIDDLE_MPDU_IN_AGGREGATE; } } else