diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 29186e3d1..d44e59c7b 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -470,7 +470,7 @@ WifiPhy::SetEdThreshold (double threshold) double WifiPhy::GetEdThreshold (void) const { - return m_edThresholdW; + return WToDbm (m_edThresholdW); } void @@ -3608,7 +3608,7 @@ void WifiPhy::StartRx (Ptr packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr event) { NS_LOG_FUNCTION (this << packet << txVector << +mpdutype << rxPowerW << rxDuration); - if (rxPowerW > GetEdThreshold ()) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration) + if (rxPowerW > DbmToW (GetEdThreshold ())) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration) { AmpduTag ampduTag; WifiPreamble preamble = txVector.GetPreambleType (); @@ -3673,7 +3673,7 @@ WifiPhy::StartRx (Ptr packet, WifiTxVector txVector, MpduType mpdutype, else { NS_LOG_DEBUG ("drop packet because signal power too Small (" << - rxPowerW << "<" << GetEdThreshold () << ")"); + rxPowerW << "<" << DbmToW (GetEdThreshold ()) << ")"); NotifyRxDrop (packet); m_plcpSuccess = false; MaybeCcaBusyDuration ();