wifi: Do not recalculate RX duration in PhyEntity::StartReceivePreamble

This commit is contained in:
Sebastien Deronne
2022-04-23 14:36:13 +02:00
committed by Stefano Avallone
parent e5b30b5c0e
commit e736151b27
2 changed files with 2 additions and 3 deletions

View File

@@ -380,7 +380,7 @@ HePhy::StartReceivePreamble (Ptr<WifiPpdu> ppdu, RxPowerWattPerChannelBand& rxPo
}
else
{
PhyEntity::StartReceivePreamble (ppdu, rxPowersW, rxDuration);
PhyEntity::StartReceivePreamble (ppdu, rxPowersW, ppdu->GetTxDuration ()); // The actual duration of the PPDU should be used
}
}

View File

@@ -360,7 +360,7 @@ PhyEntity::DoEndReceiveField (WifiPpduField field, Ptr<Event> event)
void
PhyEntity::StartReceivePreamble (Ptr<WifiPpdu> 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<WifiPpdu> 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> event = DoGetEvent (ppdu, rxPowersW);
if (event == nullptr)