diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 2db05a0b7..44a98218b 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -533,7 +533,7 @@ void MacLow::ResetPhy (void) { m_phy->SetReceiveOkCallback (MakeNullCallback, double, WifiTxVector, enum WifiPreamble> ()); - m_phy->SetReceiveErrorCallback (MakeNullCallback, double, bool> ()); + m_phy->SetReceiveErrorCallback (MakeNullCallback, double, bool> ()); RemovePhyMacLowListener (m_phy); m_phy = 0; } @@ -837,14 +837,15 @@ MacLow::NeedCtsToSelf (void) } void -MacLow::ReceiveError (Ptr packet, double rxSnr, bool isEndOfFrame) +MacLow::ReceiveError (Ptr packet, double rxSnr, bool isEndOfFrame) { NS_LOG_FUNCTION (this << packet << rxSnr << isEndOfFrame); NS_LOG_DEBUG ("rx failed "); if (isEndOfFrame == true && m_receivedAtLeastOneMpdu == true) { WifiMacHeader hdr; - packet->PeekHeader (hdr); + MpduAggregator::DeaggregatedMpdus mpdu = MpduAggregator::Deaggregate (packet); + mpdu.begin ()->first->PeekHeader (hdr); if (hdr.GetAddr1 () != m_self) { NS_LOG_DEBUG ("hdr addr1 " << hdr.GetAddr1 () << "not for me (" << m_self << "); returning"); @@ -1684,7 +1685,7 @@ MacLow::ForwardDown (Ptr packet, const WifiMacHeader* hdr, ampdutag.SetNoOfMpdus (queueSize); newPacket->AddPacketTag (ampdutag); - + if (delay == Seconds (0)) { if (!vhtSingleMpdu) diff --git a/src/wifi/model/mac-low.h b/src/wifi/model/mac-low.h index ecc7f6002..2dbdc57bd 100644 --- a/src/wifi/model/mac-low.h +++ b/src/wifi/model/mac-low.h @@ -732,7 +732,7 @@ public: * This method is typically invoked by the lower PHY layer to notify * the MAC layer that a packet was unsuccessfully received. */ - void ReceiveError (Ptr packet, double rxSnr, bool isEndOfFrame); + void ReceiveError (Ptr packet, double rxSnr, bool isEndOfFrame); /** * \param duration switching delay duration. * diff --git a/src/wifi/model/wifi-phy-state-helper.cc b/src/wifi/model/wifi-phy-state-helper.cc index 8ae904cef..28533c5b8 100644 --- a/src/wifi/model/wifi-phy-state-helper.cc +++ b/src/wifi/model/wifi-phy-state-helper.cc @@ -442,7 +442,7 @@ WifiPhyStateHelper::SwitchFromRxEndOk (Ptr packet, double snr, WifiTxVec } void -WifiPhyStateHelper::SwitchFromRxEndError (Ptr packet, double snr, bool isEndOfFrame) +WifiPhyStateHelper::SwitchFromRxEndError (Ptr packet, double snr, bool isEndOfFrame) { m_rxErrorTrace (packet, snr); NotifyRxEndError (); diff --git a/src/wifi/model/wifi-phy-state-helper.h b/src/wifi/model/wifi-phy-state-helper.h index 66f9fc063..da8301f26 100644 --- a/src/wifi/model/wifi-phy-state-helper.h +++ b/src/wifi/model/wifi-phy-state-helper.h @@ -169,7 +169,7 @@ public: * \param snr the SNR of the received packet * \param isEndOfFrame PHY-RXEND indication. */ - void SwitchFromRxEndError (Ptr packet, double snr, bool isEndOfFrame); + void SwitchFromRxEndError (Ptr packet, double snr, bool isEndOfFrame); /** * Switch to CCA busy. * diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 04403120a..4e015dc43 100755 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -194,7 +194,7 @@ public: * arg2: snr of packet * arg3: PHY-RXEND flag */ - typedef Callback, double, bool> RxErrorCallback; + typedef Callback, double, bool> RxErrorCallback; static TypeId GetTypeId (void);