diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index 653e922ec..cfbfa426a 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -25,6 +25,7 @@ #include "wifi-mac-queue.h" #include "wifi-mac-trailer.h" #include "wifi-mac.h" +#include "wifi-phy.h" #include "ns3/attribute-container.h" #include "ns3/log.h" @@ -602,6 +603,12 @@ Txop::StartAccessAfterEvent(uint8_t linkId, bool hadFramesToTransmit, bool check { NS_LOG_FUNCTION(this << linkId << hadFramesToTransmit << checkMediumBusy); + if (!m_mac->GetWifiPhy(linkId)) + { + NS_LOG_DEBUG("No PHY operating on link " << +linkId); + return; + } + if (GetLink(linkId).access != NOT_REQUESTED) { NS_LOG_DEBUG("Channel access already requested or granted on link " << +linkId);