wifi: Fix wrong channel width when HT, VHT or HE STA receives a legacy PPDU

This commit is contained in:
Sébastien Deronne
2019-05-08 22:09:36 +02:00
parent 1e62164705
commit 0adc099679

View File

@@ -2781,7 +2781,8 @@ WifiPhy::StartReceivePreamble (Ptr<Packet> packet, double rxPowerW, Time rxDurat
NS_FATAL_ERROR ("Received OFDM 802.11 signal with no SIG field");
return;
}
txVector.SetChannelWidth (GetChannelWidth ());
uint16_t channelWidth = GetChannelWidth ();
txVector.SetChannelWidth (channelWidth > 20 ? 20 : channelWidth);
for (uint8_t i = 0; i < GetNModes (); i++)
{
WifiMode mode = GetMode (i);