From 02db76a86cc405e94c7c32947fe534ff0a3449ef Mon Sep 17 00:00:00 2001 From: Rediet Date: Mon, 23 Dec 2019 12:21:49 +0100 Subject: [PATCH] wifi: Keep the medium busy if reception is aborted ahead of scheduled time --- src/wifi/model/channel-access-manager.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index a36309a3a..3517373fc 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -561,6 +561,11 @@ ChannelAccessManager::NotifyRxEndErrorNow (void) { NS_LOG_FUNCTION (this); NS_LOG_DEBUG ("rx end error"); + if (m_lastRxEnd > Simulator::Now ()) + { + m_lastBusyStart = Simulator::Now (); + m_lastBusyDuration = m_lastRxEnd - m_lastBusyStart; + } m_lastRxEnd = Simulator::Now (); m_lastRxDuration = m_lastRxEnd - m_lastRxStart; m_lastRxReceivedOk = false;