From e736151b27e200d4af0e1b3f3ac079ba650cae9f Mon Sep 17 00:00:00 2001 From: Sebastien Deronne Date: Sat, 23 Apr 2022 14:36:13 +0200 Subject: [PATCH] wifi: Do not recalculate RX duration in PhyEntity::StartReceivePreamble --- src/wifi/model/he/he-phy.cc | 2 +- src/wifi/model/phy-entity.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/he/he-phy.cc b/src/wifi/model/he/he-phy.cc index 6e6ac6aa3..4ac305e8f 100644 --- a/src/wifi/model/he/he-phy.cc +++ b/src/wifi/model/he/he-phy.cc @@ -380,7 +380,7 @@ HePhy::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPo } else { - PhyEntity::StartReceivePreamble (ppdu, rxPowersW, rxDuration); + PhyEntity::StartReceivePreamble (ppdu, rxPowersW, ppdu->GetTxDuration ()); // The actual duration of the PPDU should be used } } diff --git a/src/wifi/model/phy-entity.cc b/src/wifi/model/phy-entity.cc index 3f402f1dc..9974b786a 100644 --- a/src/wifi/model/phy-entity.cc +++ b/src/wifi/model/phy-entity.cc @@ -360,7 +360,7 @@ PhyEntity::DoEndReceiveField (WifiPpduField field, Ptr event) void PhyEntity::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& rxPowersW, - Time /* rxDuration */) + Time rxDuration) { //The total RX power corresponds to the maximum over all the bands auto it = std::max_element (rxPowersW.begin (), rxPowersW.end (), @@ -368,7 +368,6 @@ PhyEntity::StartReceivePreamble (Ptr ppdu, RxPowerWattPerChannelBand& return p1.second < p2.second; }); NS_LOG_FUNCTION (this << ppdu << it->second); - Time rxDuration = ppdu->GetTxDuration (); //the actual duration of the PPDU should be considered Ptr event = DoGetEvent (ppdu, rxPowersW); if (event == nullptr)