wifi: Fix band stop index when DC subcarrier is skipped

This commit is contained in:
Sébastien Deronne
2022-08-14 11:40:47 +02:00
committed by Sebastien Deronne
parent 18a0cd9ecd
commit fe60645362

View File

@@ -497,12 +497,12 @@ SpectrumWifiPhy::GetBand (uint16_t bandWidth, uint8_t bandIndex)
NS_ASSERT_MSG ((bandIndex * bandWidth) < channelWidth, "Band index is out of bound");
WifiSpectrumBand band;
band.first = ((totalNumBands - numBandsInChannel) / 2) + (bandIndex * numBandsInBand);
band.second = band.first + numBandsInBand - 1;
if (band.first >= totalNumBands / 2)
{
//step past DC
band.first += 1;
}
band.second = band.first + numBandsInBand - 1;
return band;
}