diff --git a/src/wifi/model/frame-exchange-manager.cc b/src/wifi/model/frame-exchange-manager.cc index 1f629bf6c..73e3ca758 100644 --- a/src/wifi/model/frame-exchange-manager.cc +++ b/src/wifi/model/frame-exchange-manager.cc @@ -396,7 +396,7 @@ FrameExchangeManager::SendMpdu (void) + m_phy->CalculatePhyPreambleAndHeaderDuration (normalAcknowledgment->ackTxVector); NS_ASSERT (!m_txTimer.IsRunning ()); m_txTimer.Set (WifiTxTimer::WAIT_NORMAL_ACK, timeout, &FrameExchangeManager::NormalAckTimeout, - this, m_mpdu); + this, m_mpdu, m_txParams.m_txVector); m_channelAccessManager->NotifyAckTimeoutStartNow (timeout); } else @@ -575,7 +575,8 @@ FrameExchangeManager::SendRts (const WifiTxParameters& txParams) + m_phy->GetSlot () + m_phy->CalculatePhyPreambleAndHeaderDuration (rtsCtsProtection->ctsTxVector); NS_ASSERT (!m_txTimer.IsRunning ()); - m_txTimer.Set (WifiTxTimer::WAIT_CTS, timeout, &FrameExchangeManager::CtsTimeout, this); + m_txTimer.Set (WifiTxTimer::WAIT_CTS, timeout, &FrameExchangeManager::CtsTimeout, this, + mpdu, rtsCtsProtection->rtsTxVector); m_channelAccessManager->NotifyCtsTimeoutStartNow (timeout); ForwardMpduDown (mpdu, rtsCtsProtection->rtsTxVector); @@ -748,9 +749,9 @@ FrameExchangeManager::TransmissionFailed (void) } void -FrameExchangeManager::NormalAckTimeout (Ptr mpdu) +FrameExchangeManager::NormalAckTimeout (Ptr mpdu, const WifiTxVector& txVector) { - NS_LOG_FUNCTION (this << *mpdu); + NS_LOG_FUNCTION (this << *mpdu << txVector); m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (mpdu); @@ -784,9 +785,9 @@ FrameExchangeManager::RetransmitMpduAfterMissedAck (Ptr mpdu) } void -FrameExchangeManager::CtsTimeout (void) +FrameExchangeManager::CtsTimeout (Ptr rts, const WifiTxVector& txVector) { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this << *rts << txVector); m_mac->GetWifiRemoteStationManager ()->ReportRtsFailed (m_mpdu->GetHeader ()); diff --git a/src/wifi/model/frame-exchange-manager.h b/src/wifi/model/frame-exchange-manager.h index 9d66bd1d9..9eba4c67d 100644 --- a/src/wifi/model/frame-exchange-manager.h +++ b/src/wifi/model/frame-exchange-manager.h @@ -469,13 +469,17 @@ protected: * Called when the Ack timeout expires. * * \param mpdu the MPDU that solicited a Normal Ack response + * \param txVector the TXVECTOR used to transmit the frame soliciting the Normal Ack */ - void NormalAckTimeout (Ptr mpdu); + void NormalAckTimeout (Ptr mpdu, const WifiTxVector& txVector); /** * Called when the CTS timeout expires. + * + * \param rts the RTS that solicited a CTS response + * \param txVector the TXVECTOR used to transmit the RTS frame */ - virtual void CtsTimeout (void); + virtual void CtsTimeout (Ptr rts, const WifiTxVector& txVector); private: /** diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc index 90c877841..1b2574083 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.cc +++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc @@ -688,15 +688,15 @@ HtFrameExchangeManager::SendPsduWithProtection (Ptr psdu, WifiTxParame } void -HtFrameExchangeManager::CtsTimeout (void) +HtFrameExchangeManager::CtsTimeout (Ptr rts, const WifiTxVector& txVector) { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this << *rts << txVector); if (m_psdu == 0) { // A CTS Timeout occurred when protecting a single MPDU is handled by the // parent classes - QosFrameExchangeManager::CtsTimeout (); + QosFrameExchangeManager::CtsTimeout (rts, txVector); return; } diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.h b/src/wifi/model/ht/ht-frame-exchange-manager.h index 7245b78f3..6418c824d 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.h +++ b/src/wifi/model/ht/ht-frame-exchange-manager.h @@ -195,7 +195,7 @@ protected: virtual void RetransmitMpduAfterMissedAck (Ptr mpdu) const override; virtual void RetransmitMpduAfterMissedCts (Ptr mpdu) const override; virtual void ForwardMpduDown (Ptr mpdu, WifiTxVector& txVector) override; - virtual void CtsTimeout (void) override; + virtual void CtsTimeout (Ptr rts, const WifiTxVector& txVector) override; virtual void TransmissionSucceeded (void) override; virtual void DequeueMpdu (Ptr mpdu) override; diff --git a/src/wifi/test/wifi-aggregation-test.cc b/src/wifi/test/wifi-aggregation-test.cc index a1374fe08..66fd27674 100644 --- a/src/wifi/test/wifi-aggregation-test.cc +++ b/src/wifi/test/wifi-aggregation-test.cc @@ -297,7 +297,7 @@ AmpduAggregationTest::DoRun (void) m_manager->SetMaxSsrc (0); //set to 0 in order to fake that the maximum number of retries has been reached m_mac->TraceConnectWithoutContext ("MacTxDrop", MakeCallback (&AmpduAggregationTest::PacketDiscarded, this)); htFem->m_dcf = m_mac->GetBEQueue (); - htFem->NormalAckTimeout (item); + htFem->NormalAckTimeout (item, txParams.m_txVector); NS_TEST_EXPECT_MSG_EQ (m_discarded, true, "packet should be discarded"); m_mac->GetBEQueue ()->GetWifiMacQueue ()->Flush ();