From 63749b37c5815fd969687f1ba98c92b4454d5fc4 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Sat, 12 Aug 2023 23:53:16 +0200 Subject: [PATCH] wifi: Fix condition for aborting RX when starting TX The end time of the current reception cannot be later than now plus the delay until idle (the delay until idle is at least the delay until reception ends), hence the current reception is not aborted when TX starts while receiving a PPDU payload. --- src/wifi/model/wifi-phy.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 60551e481..07cba0bad 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1770,9 +1770,7 @@ WifiPhy::Send(WifiConstPsduMap psdus, const WifiTxVector& txVector) { noEndPreambleDetectionEvent &= it.second->NoEndPreambleDetectionEvents(); } - if (!noEndPreambleDetectionEvent || - (m_currentEvent && - (m_currentEvent->GetEndTime() > (Simulator::Now() + m_state->GetDelayUntilIdle())))) + if (!noEndPreambleDetectionEvent || m_currentEvent) { AbortCurrentReception(RECEPTION_ABORTED_BY_TX); }