wifi: Fix misinterpretation of 802.11ax specs

This commit is contained in:
Stefano Avallone
2021-10-22 12:32:50 +02:00
committed by Stefano Avallone
parent 7d9939dd00
commit d7662fbead
2 changed files with 7 additions and 22 deletions

View File

@@ -434,23 +434,10 @@ HePhy::DoGetEvent (Ptr<const WifiPpdu> 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 ()); 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; event = it->second;
if (Simulator::Now () - event->GetStartTime () > NanoSeconds (400))
{ //Update received power of the event associated to that UL MU transmission
//Section 27.3.14.3 from 802.11ax Draft 4.0: Pre-correction accuracy requirements. UpdateInterferenceEvent (event, rxPowersW);
//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 STAs 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);
}
if ((GetCurrentEvent () != 0) && (GetCurrentEvent ()->GetPpdu ()->GetUid () != ppdu->GetUid ())) if ((GetCurrentEvent () != 0) && (GetCurrentEvent ()->GetPpdu ()->GetUid () != ppdu->GetUid ()))
{ {
NS_LOG_DEBUG ("Drop packet because already receiving another HE TB PPDU"); NS_LOG_DEBUG ("Drop packet because already receiving another HE TB PPDU");

View File

@@ -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, //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<uint64_t> uids {9}; std::vector<uint64_t> uids {9};
Simulator::Schedule (Seconds (6), &TestMultipleHeTbPreambles::RxHeTbPpdu, this, uids[0], 1, txPowerWatts, 1001); 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); 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 //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); 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): //No packet is dropped (we check after 5us to verify that PD is successful)
//the second HE TB PPDU is acting as interference since it arrived after the maximum allowed 400ns. Simulator::Schedule (Seconds (6.0) + MicroSeconds (5), &TestMultipleHeTbPreambles::CheckBytesDropped, this, 0);
//Obviously, that second packet of 1002 bytes is dropped as well.
Simulator::Schedule (Seconds (6.0) + MicroSeconds (5), &TestMultipleHeTbPreambles::CheckBytesDropped, this, 1001 + 1002);
Simulator::Schedule (Seconds (6.5), &TestMultipleHeTbPreambles::Reset, this); Simulator::Schedule (Seconds (6.5), &TestMultipleHeTbPreambles::Reset, this);
} }