From 9d172ac9a1dcdb7ccac6194296abdda2d4aafbd4 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 19 Sep 2023 17:44:48 +0200 Subject: [PATCH] wifi: Generate backoff if needed when a PHY wakes up or is turned on --- src/wifi/model/txop.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index fd59629f8..a39176d09 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -679,7 +679,8 @@ void Txop::NotifyWakeUp(uint8_t linkId) { NS_LOG_FUNCTION(this << +linkId); - StartAccessIfNeeded(linkId); + // before wake up, no packet can be transmitted + StartAccessAfterEvent(linkId, false, false); } void @@ -688,7 +689,8 @@ Txop::NotifyOn() NS_LOG_FUNCTION(this); for (const auto& [id, link] : m_links) { - StartAccessIfNeeded(id); + // before being turned on, no packet can be transmitted + StartAccessAfterEvent(id, false, false); } }