wifi: (fixes #473) Discard preamble state for truncated TX or device in OFF

This commit is contained in:
Tom Henderson
2021-10-21 14:18:15 -07:00
parent 97d5f8d069
commit e844dfd1d7
2 changed files with 8 additions and 0 deletions

View File

@@ -385,6 +385,7 @@ PhyEntity::StartReceivePreamble (Ptr<WifiPpdu> ppdu, RxPowerWattPerChannelBand&
{
m_wifiPhy->SwitchMaybeToCcaBusy (m_wifiPhy->GetMeasurementChannelWidth (nullptr));
}
DropPreambleEvent (ppdu, WifiPhyRxfailureReason::POWERED_OFF, endRx, m_wifiPhy->GetMeasurementChannelWidth (ppdu));
return;
}
@@ -395,6 +396,7 @@ PhyEntity::StartReceivePreamble (Ptr<WifiPpdu> ppdu, RxPowerWattPerChannelBand&
{
m_wifiPhy->SwitchMaybeToCcaBusy (GetMeasurementChannelWidth (ppdu));
}
DropPreambleEvent (ppdu, WifiPhyRxfailureReason::TRUNCATED_TX, endRx, m_wifiPhy->GetMeasurementChannelWidth (ppdu));
return;
}

View File

@@ -267,6 +267,8 @@ enum WifiPhyRxfailureReason
RXING,
TXING,
SLEEPING,
POWERED_OFF,
TRUNCATED_TX,
BUSY_DECODING_PREAMBLE,
PREAMBLE_DETECT_FAILURE,
RECEPTION_ABORTED_BY_TX,
@@ -302,6 +304,10 @@ inline std::ostream& operator<< (std::ostream &os, const WifiPhyRxfailureReason
return (os << "TXING");
case SLEEPING:
return (os << "SLEEPING");
case POWERED_OFF:
return (os << "OFF");
case TRUNCATED_TX:
return (os << "TRUNCATED_TX");
case BUSY_DECODING_PREAMBLE:
return (os << "BUSY_DECODING_PREAMBLE");
case PREAMBLE_DETECT_FAILURE: