wifi: Schedule transmission of MU-BARs instead of enqueuing them
This commit is contained in:
committed by
Stefano Avallone
parent
ea3e894d7f
commit
2e3dbaea4e
@@ -689,21 +689,6 @@ BlockAckManager::ScheduleBar(const CtrlBAckRequestHeader& reqHdr, const WifiMacH
|
||||
m_queue->Enqueue(Create<WifiMpdu>(pkt, hdr));
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::ScheduleMuBar(Ptr<WifiMpdu> muBar)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *muBar);
|
||||
NS_ASSERT(muBar->GetHeader().IsTrigger());
|
||||
|
||||
#ifdef NS3_BUILD_PROFILE_DEBUG
|
||||
CtrlTriggerHeader triggerHdr;
|
||||
muBar->GetPacket()->PeekHeader(triggerHdr);
|
||||
NS_ASSERT(triggerHdr.IsMuBar());
|
||||
#endif
|
||||
|
||||
m_queue->Enqueue(muBar);
|
||||
}
|
||||
|
||||
const std::list<BlockAckManager::AgreementKey>&
|
||||
BlockAckManager::GetSendBarIfDataQueuedList() const
|
||||
{
|
||||
|
||||
@@ -418,14 +418,6 @@ class BlockAckManager : public Object
|
||||
* it is placed at the head of the queue, otherwise at the tail.
|
||||
*/
|
||||
void ScheduleBar(const CtrlBAckRequestHeader& reqHdr, const WifiMacHeader& hdr);
|
||||
/**
|
||||
* \param muBar the MU-BAR Trigger Frame to enqueue
|
||||
*
|
||||
* Enqueue the given MU-BAR Trigger Frame into the queue storing the next MU-BAR
|
||||
* frames to transmit. If the given MU-BAR Trigger Frame is retransmitted,
|
||||
* it is placed at the head of the queue, otherwise at the tail.
|
||||
*/
|
||||
void ScheduleMuBar(Ptr<WifiMpdu> muBar);
|
||||
|
||||
/// agreement key typedef (MAC address and TID)
|
||||
using AgreementKey = std::pair<Mac48Address, uint8_t>;
|
||||
|
||||
@@ -214,26 +214,6 @@ HeFrameExchangeManager::StartFrameExchange(Ptr<QosTxop> edca, Time availableTime
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
HeFrameExchangeManager::SendMpduFromBaManager(Ptr<WifiMpdu> mpdu,
|
||||
Time availableTime,
|
||||
bool initialFrame)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *mpdu << availableTime << initialFrame);
|
||||
|
||||
// First, check if there is a Trigger Frame to be transmitted
|
||||
if (!mpdu->GetHeader().IsTrigger())
|
||||
{
|
||||
// BlockAckReq are handled by the HT FEM
|
||||
return HtFrameExchangeManager::SendMpduFromBaManager(mpdu, availableTime, initialFrame);
|
||||
}
|
||||
|
||||
m_triggerFrame = mpdu;
|
||||
|
||||
SendPsduMap();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
HeFrameExchangeManager::SendPsduMapWithProtection(WifiPsduMap psduMap, WifiTxParameters& txParams)
|
||||
{
|
||||
@@ -624,8 +604,7 @@ HeFrameExchangeManager::SendPsduMap()
|
||||
// set the UL Length field of the MU-BAR Trigger Frame
|
||||
m_trigVector.SetLength(acknowledgment->ulLength);
|
||||
|
||||
NS_ASSERT(m_edca);
|
||||
m_edca->GetBaManager()->ScheduleMuBar(PrepareMuBar(m_trigVector, recipients));
|
||||
m_triggerFrame = PrepareMuBar(m_trigVector, recipients);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -827,7 +806,14 @@ HeFrameExchangeManager::SendPsduMap()
|
||||
|
||||
if (timerType == WifiTxTimer::NOT_RUNNING)
|
||||
{
|
||||
if (!m_txParams.m_txVector.IsUlMu())
|
||||
if (m_triggerFrame)
|
||||
{
|
||||
NS_LOG_DEBUG("Scheduling MU-BAR " << *m_triggerFrame);
|
||||
Simulator::Schedule(txDuration + m_phy->GetSifs(),
|
||||
&HeFrameExchangeManager::SendPsduMap,
|
||||
this);
|
||||
}
|
||||
else if (!m_txParams.m_txVector.IsUlMu())
|
||||
{
|
||||
Simulator::Schedule(txDuration, &HeFrameExchangeManager::TransmissionSucceeded, this);
|
||||
}
|
||||
@@ -1334,7 +1320,6 @@ HeFrameExchangeManager::BlockAcksInTbPpduTimeout(
|
||||
if (m_triggerFrame)
|
||||
{
|
||||
// this is strictly needed for DL_MU_TF_MU_BAR only
|
||||
DequeueMpdu(m_triggerFrame);
|
||||
m_triggerFrame = nullptr;
|
||||
}
|
||||
|
||||
@@ -2441,7 +2426,6 @@ HeFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
if (m_triggerFrame)
|
||||
{
|
||||
// this is strictly needed for DL_MU_TF_MU_BAR only
|
||||
DequeueMpdu(m_triggerFrame);
|
||||
m_triggerFrame = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ class HeFrameExchangeManager : public VhtFrameExchangeManager
|
||||
Time GetTxDuration(uint32_t ppduPayloadSize,
|
||||
Mac48Address receiver,
|
||||
const WifiTxParameters& txParams) const override;
|
||||
bool SendMpduFromBaManager(Ptr<WifiMpdu> mpdu, Time availableTime, bool initialFrame) override;
|
||||
void NormalAckTimeout(Ptr<WifiMpdu> mpdu, const WifiTxVector& txVector) override;
|
||||
void BlockAckTimeout(Ptr<WifiPsdu> psdu, const WifiTxVector& txVector) override;
|
||||
void CtsTimeout(Ptr<WifiMpdu> rts, const WifiTxVector& txVector) override;
|
||||
|
||||
Reference in New Issue
Block a user