From d7662fbead26c2c2e0cd3531d6268c35d71c5395 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 22 Oct 2021 12:32:50 +0200 Subject: [PATCH] wifi: Fix misinterpretation of 802.11ax specs --- src/wifi/model/he/he-phy.cc | 21 ++++----------------- src/wifi/test/wifi-phy-ofdma-test.cc | 8 +++----- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/wifi/model/he/he-phy.cc b/src/wifi/model/he/he-phy.cc index d3359ec8c..0a9913e2a 100644 --- a/src/wifi/model/he/he-phy.cc +++ b/src/wifi/model/he/he-phy.cc @@ -434,23 +434,10 @@ HePhy::DoGetEvent (Ptr ppdu, RxPowerWattPerChannelBand& rxPowers { NS_LOG_DEBUG ("Received another HE TB PPDU for UID " << ppdu->GetUid () << " from STA-ID " << ppdu->GetStaId () << " and BSS color " << +txVector.GetBssColor ()); event = it->second; - if (Simulator::Now () - event->GetStartTime () > NanoSeconds (400)) - { - //Section 27.3.14.3 from 802.11ax Draft 4.0: Pre-correction accuracy requirements. - //A STA that transmits an HE TB PPDU, non-HT PPDU, or non-HT duplicate PPDU in response to a triggering PPDU - //shall ensure that the transmission start time of the HE TB PPDU, non-HT PPDU, or non-HT duplicate PPDU is - //within ±0.4 µs + 16 µs from the end, at the STA’s antenna connector, of the last OFDM symbol of the triggering - //PPDU (if it contains no PE field) or of the PE field of the triggering PPDU (if the PE field is present). - //As a result, if an HE TB PPDU arrives later than 0.4 µs, it is added as an interference but PPDU is dropped. - event = CreateInterferenceEvent (ppdu, txVector, rxDuration, rxPowersW); - NS_LOG_DEBUG ("Drop packet because not received within the 400ns window"); - m_wifiPhy->NotifyRxDrop (GetAddressedPsduInPpdu (ppdu), HE_TB_PPDU_TOO_LATE); - } - else - { - //Update received power of the event associated to that UL MU transmission - UpdateInterferenceEvent (event, rxPowersW); - } + + //Update received power of the event associated to that UL MU transmission + UpdateInterferenceEvent (event, rxPowersW); + if ((GetCurrentEvent () != 0) && (GetCurrentEvent ()->GetPpdu ()->GetUid () != ppdu->GetUid ())) { NS_LOG_DEBUG ("Drop packet because already receiving another HE TB PPDU"); diff --git a/src/wifi/test/wifi-phy-ofdma-test.cc b/src/wifi/test/wifi-phy-ofdma-test.cc index 8eff91b3e..91acfddd8 100644 --- a/src/wifi/test/wifi-phy-ofdma-test.cc +++ b/src/wifi/test/wifi-phy-ofdma-test.cc @@ -1608,16 +1608,14 @@ TestMultipleHeTbPreambles::DoRun (void) { //Verify the correct reception of a single UL MU transmission with two stations belonging to the same BSS, - //and the second PPDU arrives 500ns after the first PPDU, i.e. it exceeds the delay spread of 400ns + //and the second PPDU arrives 500ns after the first PPDU std::vector uids {9}; Simulator::Schedule (Seconds (6), &TestMultipleHeTbPreambles::RxHeTbPpdu, this, uids[0], 1, txPowerWatts, 1001); Simulator::Schedule (Seconds (6) + NanoSeconds (500), &TestMultipleHeTbPreambles::RxHeTbPpdu, this, uids[0], 2, txPowerWatts, 1002); //Check that we received a single UL MU transmission with the corresponding UID Simulator::Schedule (Seconds (6.0) + MicroSeconds (1), &TestMultipleHeTbPreambles::CheckHeTbPreambles, this, 1, uids); - //The first packet of 1001 bytes should be dropped because preamble is not detected after 4us (because the PPDU that arrived at 500ns is interfering): - //the second HE TB PPDU is acting as interference since it arrived after the maximum allowed 400ns. - //Obviously, that second packet of 1002 bytes is dropped as well. - Simulator::Schedule (Seconds (6.0) + MicroSeconds (5), &TestMultipleHeTbPreambles::CheckBytesDropped, this, 1001 + 1002); + //No packet is dropped (we check after 5us to verify that PD is successful) + Simulator::Schedule (Seconds (6.0) + MicroSeconds (5), &TestMultipleHeTbPreambles::CheckBytesDropped, this, 0); Simulator::Schedule (Seconds (6.5), &TestMultipleHeTbPreambles::Reset, this); }