wifi: QosTxop does not need to store a pointer to FEM

This commit is contained in:
Stefano Avallone
2022-02-03 15:38:05 +01:00
parent b6df4a182f
commit 4e1524855e
4 changed files with 3 additions and 33 deletions

View File

@@ -413,13 +413,6 @@ OcbWifiMac::ConfigureStandard (enum WifiStandard standard)
m_feManager->SetMacRxMiddle (m_rxMiddle);
m_feManager->SetAddress (GetAddress ());
m_channelAccessManager->SetupFrameExchangeManager (m_feManager);
if (GetQosSupported ())
{
for (auto& ac : {AC_BE, AC_BK, AC_VI, AC_VO})
{
GetQosTxop (ac)->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (m_feManager));
}
}
}

View File

@@ -125,7 +125,6 @@ QosTxop::DoDispose (void)
}
m_baManager = 0;
m_qosBlockedDestinations = 0;
m_qosFem = 0;
Txop::DoDispose ();
}
@@ -139,13 +138,6 @@ QosTxop::GetQosQueueSize (uint8_t tid, Mac48Address receiver) const
return queueSize;
}
void
QosTxop::SetQosFrameExchangeManager (const Ptr<QosFrameExchangeManager> qosFem)
{
NS_LOG_FUNCTION (this << qosFem);
m_qosFem = qosFem;
}
void
QosTxop::SetDroppedMpduCallback (DroppedMpdu callback)
{
@@ -444,7 +436,6 @@ QosTxop::GetNextMpdu (Ptr<const WifiMacQueueItem> peekedItem, WifiTxParameters&
Time availableTime, bool initialFrame)
{
NS_ASSERT (peekedItem != 0);
NS_ASSERT (m_qosFem != 0);
NS_LOG_FUNCTION (this << *peekedItem << &txParams << availableTime << initialFrame);
Mac48Address recipient = peekedItem->GetHeader ().GetAddr1 ();
@@ -455,7 +446,8 @@ QosTxop::GetNextMpdu (Ptr<const WifiMacQueueItem> peekedItem, WifiTxParameters&
Time actualAvailableTime = (initialFrame && txParams.GetSize (recipient) == 0
? Time::Min () : availableTime);
if (!m_qosFem->TryAddMpdu (peekedItem, txParams, actualAvailableTime))
auto qosFem = StaticCast<QosFrameExchangeManager> (m_mac->GetFrameExchangeManager ());
if (!qosFem->TryAddMpdu (peekedItem, txParams, actualAvailableTime))
{
return nullptr;
}
@@ -482,7 +474,7 @@ QosTxop::GetNextMpdu (Ptr<const WifiMacQueueItem> peekedItem, WifiTxParameters&
&& !peekedItem->GetHeader ().IsRetry () && !peekedItem->IsFragment ()
&& !peekedItem->IsInFlight ())
{
Ptr<HtFrameExchangeManager> htFem = StaticCast<HtFrameExchangeManager> (m_qosFem);
auto htFem = StaticCast<HtFrameExchangeManager> (qosFem);
mpdu = htFem->GetMsduAggregator ()->GetNextAmsdu (peekedItem, txParams, availableTime);
}

View File

@@ -92,13 +92,6 @@ public:
void NotifyChannelReleased (void) override;
void SetDroppedMpduCallback (DroppedMpdu callback) override;
/**
* Set the Frame Exchange Manager associated with this QoS STA.
*
* \param qosFem the associated QoS Frame Exchange Manager.
*/
void SetQosFrameExchangeManager (const Ptr<QosFrameExchangeManager> qosFem);
/**
* Get the access category of this object.
*
@@ -460,7 +453,6 @@ private:
bool IsQosOldPacket (Ptr<const WifiMacQueueItem> mpdu);
AcIndex m_ac; //!< the access category
Ptr<QosFrameExchangeManager> m_qosFem; //!< the QoS Frame Exchange Manager
Ptr<QosBlockedDestinations> m_qosBlockedDestinations; //!< the QoS blocked destinations
Ptr<BlockAckManager> m_baManager; //!< the block ack manager
uint8_t m_blockAckThreshold; /**< the block ack threshold (use BA mechanism if number of packets in queue reaches

View File

@@ -736,13 +736,6 @@ WifiMac::SetupFrameExchangeManager (WifiStandard standard)
m_feManager->SetAckedMpduCallback (MakeCallback (&MpduTracedCallback::operator(),
&m_ackedMpduCallback));
m_channelAccessManager->SetupFrameExchangeManager (m_feManager);
if (GetQosSupported ())
{
for (const auto& pair : m_edca)
{
pair.second->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (m_feManager));
}
}
}
Ptr<FrameExchangeManager>