diff --git a/src/wifi/model/eht/eht-frame-exchange-manager.cc b/src/wifi/model/eht/eht-frame-exchange-manager.cc index cf2efeab0..a552d8bce 100644 --- a/src/wifi/model/eht/eht-frame-exchange-manager.cc +++ b/src/wifi/model/eht/eht-frame-exchange-manager.cc @@ -416,10 +416,10 @@ EhtFrameExchangeManager::ForwardPsduDown(Ptr psdu, WifiTxVector& if (auto phy = m_mac->GetWifiPhy(linkId); phy && linkId != m_linkId && m_staMac->IsEmlsrLink(linkId)) { - auto txPowerDbm = phy->GetPower(txVector.GetTxPowerLevel()) + phy->GetTxGain(); + const auto txPower = phy->GetPower(txVector.GetTxPowerLevel()) + phy->GetTxGain(); // generate in-device interference on the other EMLSR link for the duration of this // transmission - GenerateInDeviceInterference(linkId, txDuration, DbmToW(txPowerDbm)); + GenerateInDeviceInterference(linkId, txDuration, DbmToW(txPower)); } } } @@ -505,10 +505,10 @@ EhtFrameExchangeManager::ForwardPsduMapDown(WifiConstPsduMap psduMap, WifiTxVect if (auto phy = m_mac->GetWifiPhy(linkId); phy && linkId != m_linkId && m_staMac->IsEmlsrLink(linkId)) { - auto txPowerDbm = phy->GetPower(txVector.GetTxPowerLevel()) + phy->GetTxGain(); + const auto txPower = phy->GetPower(txVector.GetTxPowerLevel()) + phy->GetTxGain(); // generate in-device interference on the other EMLSR link for the duration of this // transmission - GenerateInDeviceInterference(linkId, txDuration, DbmToW(txPowerDbm)); + GenerateInDeviceInterference(linkId, txDuration, DbmToW(txPower)); } } } diff --git a/src/wifi/model/phy-entity.cc b/src/wifi/model/phy-entity.cc index ec05248a3..60ad464ed 100644 --- a/src/wifi/model/phy-entity.cc +++ b/src/wifi/model/phy-entity.cc @@ -1345,10 +1345,10 @@ void PhyEntity::StartTx(Ptr ppdu) { NS_LOG_FUNCTION(this << ppdu); - auto txPowerDbm = m_wifiPhy->GetTxPowerForTransmission(ppdu) + m_wifiPhy->GetTxGain(); + auto txPower = m_wifiPhy->GetTxPowerForTransmission(ppdu) + m_wifiPhy->GetTxGain(); auto txVector = ppdu->GetTxVector(); - auto txPowerSpectrum = GetTxPowerSpectralDensity(DbmToW(txPowerDbm), ppdu); - Transmit(ppdu->GetTxDuration(), ppdu, txPowerDbm, txPowerSpectrum, "transmission"); + auto txPowerSpectrum = GetTxPowerSpectralDensity(DbmToW(txPower), ppdu); + Transmit(ppdu->GetTxDuration(), ppdu, txPower, txPowerSpectrum, "transmission"); } void diff --git a/src/wifi/model/wifi-spectrum-value-helper.cc b/src/wifi/model/wifi-spectrum-value-helper.cc index ab6a747b5..4ab719705 100644 --- a/src/wifi/model/wifi-spectrum-value-helper.cc +++ b/src/wifi/model/wifi-spectrum-value-helper.cc @@ -132,13 +132,13 @@ WifiSpectrumValueHelper::GetSpectrumModel(const std::vector& centerFreque // total width, only a quarter of the channel width has to be subtracted. Finally, we // remove the guard band width to get the center frequency of the first band and half the // carrier spacing to get the effective starting frequency of the first band. - const auto startingFrequencyHz = *minCenterFrequency * 1e6 - - ((channelWidth * 1e6) / (2 * centerFrequencies.size())) - - (guardBandwidth * 1e6) - (carrierSpacing / 2); + const auto startingFrequency = *minCenterFrequency * 1e6 - + ((channelWidth * 1e6) / (2 * centerFrequencies.size())) - + (guardBandwidth * 1e6) - (carrierSpacing / 2); for (size_t i = 0; i < numBands; i++) { BandInfo info; - auto f = startingFrequencyHz + (i * carrierSpacing); + auto f = startingFrequency + (i * carrierSpacing); info.fl = f; f += carrierSpacing / 2; info.fc = f;