wifi: GetEdThreshold should return a dBm value
This commit is contained in:
@@ -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> packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr<InterferenceHelper::Event> 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> 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 ();
|
||||
|
||||
Reference in New Issue
Block a user