diff --git a/src/wifi/model/phy-entity.cc b/src/wifi/model/phy-entity.cc index 593be14ef..afe6a8c60 100644 --- a/src/wifi/model/phy-entity.cc +++ b/src/wifi/model/phy-entity.cc @@ -1375,13 +1375,19 @@ PhyEntity::CanStartRx(Ptr ppdu) const // then we consider the primary20 channel const auto p20CenterFreq = m_wifiPhy->GetOperatingChannel().GetPrimaryChannelCenterFrequency(primaryWidth); - const auto p20MinFreq = p20CenterFreq - (primaryWidth / 2); - const auto p20MaxFreq = p20CenterFreq + (primaryWidth / 2); - const auto txCenterFreq = ppdu->GetTxCenterFreqs().front(); - const auto txChannelWidth = ppdu->GetTxChannelWidth(); - const auto minTxFreq = txCenterFreq - txChannelWidth / 2; - const auto maxTxFreq = txCenterFreq + txChannelWidth / 2; - return p20MinFreq >= minTxFreq && p20MaxFreq <= maxTxFreq; + const uint16_t p20MinFreq = p20CenterFreq - (primaryWidth / 2); + const uint16_t p20MaxFreq = p20CenterFreq + (primaryWidth / 2); + const auto txChannelWidth = (ppdu->GetTxChannelWidth() / ppdu->GetTxCenterFreqs().size()); + for (auto txCenterFreq : ppdu->GetTxCenterFreqs()) + { + const uint16_t minTxFreq = txCenterFreq - txChannelWidth / 2; + const uint16_t maxTxFreq = txCenterFreq + txChannelWidth / 2; + if ((p20MinFreq >= minTxFreq) && (p20MaxFreq <= maxTxFreq)) + { + return true; + } + } + return false; } Ptr