wifi: Set TXOP holder when receiving a Trigger Frame

This commit is contained in:
Stefano Avallone
2021-12-18 18:36:27 +01:00
parent 158bf67696
commit a4626d178a
2 changed files with 19 additions and 1 deletions

View File

@@ -1234,7 +1234,9 @@ HeFrameExchangeManager::SendQosNullFramesInTbPpdu (const CtrlTriggerHeader& trig
if (trigger.GetCsRequired () && hdr.GetAddr2 () != m_txopHolder && m_navEnd > Simulator::Now ())
{
NS_LOG_DEBUG ("Carrier Sensing required and channel busy, do nothing");
NS_LOG_DEBUG ("Carrier Sensing required and channel busy (TA=" << hdr.GetAddr2 ()
<< ", TxopHolder=" << m_txopHolder << ", NAV end=" << m_navEnd.As (Time::S)
<< "), do nothing");
return;
}
@@ -1296,6 +1298,21 @@ HeFrameExchangeManager::SendQosNullFramesInTbPpdu (const CtrlTriggerHeader& trig
SendPsduMapWithProtection (WifiPsduMap {{staId, psdu}}, txParams);
}
void
HeFrameExchangeManager::SetTxopHolder (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector)
{
NS_LOG_FUNCTION (this << psdu << txVector);
if (psdu->GetHeader (0).IsTrigger ())
{
m_txopHolder = psdu->GetAddr2 ();
}
else if (!txVector.IsUlMu ()) // the sender of a TB PPDU is not the TXOP holder
{
VhtFrameExchangeManager::SetTxopHolder (psdu, txVector);
}
}
void
HeFrameExchangeManager::ReceiveMpdu (Ptr<WifiMacQueueItem> mpdu, RxSignalInfo rxSignalInfo,
const WifiTxVector& txVector, bool inAmpdu)

View File

@@ -63,6 +63,7 @@ public:
bool StartFrameExchange (Ptr<QosTxop> edca, Time availableTime, bool initialFrame) override;
void SetWifiMac (const Ptr<RegularWifiMac> mac) override;
void CalculateAcknowledgmentTime (WifiAcknowledgment* acknowledgment) const override;
void SetTxopHolder (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector) override;
/**
* Set the Multi-user Scheduler associated with this Frame Exchange Manager.