wifi: Do not receive a packet sent with an unsupported channel width
This commit is contained in:
committed by
Sebastien Deronne
parent
2d5713f6b5
commit
7309a96f37
@@ -2692,6 +2692,14 @@ WifiPhy::StartReceiveHeader (Ptr<Event> event, Time rxDuration)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((txVector.GetChannelWidth () >= 40) && (txVector.GetChannelWidth () > GetChannelWidth ()))
|
||||
{
|
||||
NS_LOG_DEBUG ("Packet reception could not be started because not enough channel width");
|
||||
NotifyRxDrop (event->GetPacket (), UNSUPPORTED_SETTINGS);
|
||||
MaybeCcaBusyDuration ();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT) && (txVector.GetPreambleType () == WIFI_PREAMBLE_HT_GF))
|
||||
{
|
||||
//No non-HT PHY header for HT GF
|
||||
@@ -3001,6 +3009,7 @@ WifiPhy::StartReceivePayload (Ptr<Event> event)
|
||||
{
|
||||
InterferenceHelper::SnrPer snrPer;
|
||||
snrPer = m_interference.CalculateHtPhyHeaderSnrPer (event);
|
||||
NS_LOG_DEBUG ("snr(dB)=" << RatioToDb (snrPer.snr) << ", per=" << snrPer.per);
|
||||
canReceivePayload = (m_random->GetValue () > snrPer.per);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user