From 609773ca22c3fad51ec8e4156ef3ea8f3e2916d8 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 20 Jun 2023 16:42:29 +0200 Subject: [PATCH] wifi: Use ForwardMpduDown to send CF-End frame --- src/wifi/model/qos-frame-exchange-manager.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wifi/model/qos-frame-exchange-manager.cc b/src/wifi/model/qos-frame-exchange-manager.cc index 96b901081..8549c3b9b 100644 --- a/src/wifi/model/qos-frame-exchange-manager.cc +++ b/src/wifi/model/qos-frame-exchange-manager.cc @@ -99,15 +99,15 @@ QosFrameExchangeManager::SendCfEndIfNeeded() WifiTxVector cfEndTxVector = GetWifiRemoteStationManager()->GetRtsTxVector(cfEnd.GetAddr1()); - Time txDuration = m_phy->CalculateTxDuration(cfEnd.GetSize() + WIFI_MAC_FCS_LENGTH, - cfEndTxVector, - m_phy->GetPhyBand()); + auto mpdu = Create(Create(), cfEnd); + auto txDuration = + m_phy->CalculateTxDuration(mpdu->GetSize(), cfEndTxVector, m_phy->GetPhyBand()); // Send the CF-End frame if the remaining duration is long enough to transmit this frame if (m_edca->GetRemainingTxop(m_linkId) > txDuration) { NS_LOG_DEBUG("Send CF-End frame"); - m_phy->Send(Create(Create(), cfEnd), cfEndTxVector); + ForwardMpduDown(mpdu, cfEndTxVector); Simulator::Schedule(txDuration, &QosFrameExchangeManager::NotifyChannelReleased, this,