wifi: Do not start access on a link on which no PHY is operating
This commit is contained in:
committed by
Stefano Avallone
parent
2652be78ca
commit
47ebdfbbf0
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user