wifi: Install one MsduAggregator and MpduAggregator per station
Hence, have them stored by the unique MacLow object
This commit is contained in:
@@ -107,7 +107,9 @@ private:
|
||||
|
||||
|
||||
MacLow::MacLow ()
|
||||
: m_normalAckTimeoutEvent (),
|
||||
: m_msduAggregator (0),
|
||||
m_mpduAggregator (0),
|
||||
m_normalAckTimeoutEvent (),
|
||||
m_blockAckTimeoutEvent (),
|
||||
m_ctsTimeoutEvent (),
|
||||
m_sendCtsEvent (),
|
||||
@@ -182,6 +184,8 @@ MacLow::DoDispose (void)
|
||||
m_sendDataEvent.Cancel ();
|
||||
m_waitIfsEvent.Cancel ();
|
||||
m_endTxNoAckEvent.Cancel ();
|
||||
m_msduAggregator = 0;
|
||||
m_mpduAggregator = 0;
|
||||
m_phy = 0;
|
||||
m_stationManager = 0;
|
||||
if (m_phyMacLowListener != 0)
|
||||
@@ -284,6 +288,32 @@ MacLow::SetWifiRemoteStationManager (const Ptr<WifiRemoteStationManager> manager
|
||||
m_stationManager = manager;
|
||||
}
|
||||
|
||||
Ptr<MsduAggregator>
|
||||
MacLow::GetMsduAggregator (void) const
|
||||
{
|
||||
return m_msduAggregator;
|
||||
}
|
||||
|
||||
Ptr<MpduAggregator>
|
||||
MacLow::GetMpduAggregator (void) const
|
||||
{
|
||||
return m_mpduAggregator;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetMsduAggregator (const Ptr<MsduAggregator> aggr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << aggr);
|
||||
m_msduAggregator = aggr;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetMpduAggregator (const Ptr<MpduAggregator> aggr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << aggr);
|
||||
m_mpduAggregator = aggr;
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::SetAddress (Mac48Address ad)
|
||||
{
|
||||
@@ -568,14 +598,13 @@ MacLow::StartTransmission (Ptr<const Packet> packet,
|
||||
m_txParams.EnableAck ();
|
||||
}
|
||||
AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr));
|
||||
std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac);
|
||||
Ptr<Packet> aggregatedPacket = Create<Packet> ();
|
||||
for (uint32_t i = 0; i < sentMpdus; i++)
|
||||
{
|
||||
Ptr<Packet> newPacket = (m_txPackets[GetTid (packet, *hdr)].at (i).packet)->Copy ();
|
||||
newPacket->AddHeader (m_txPackets[GetTid (packet, *hdr)].at (i).hdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
edcaIt->second->GetMpduAggregator ()->Aggregate (newPacket, aggregatedPacket, GetMaxAmpduSize (ac));
|
||||
m_mpduAggregator->Aggregate (newPacket, aggregatedPacket, GetMaxAmpduSize (ac));
|
||||
}
|
||||
m_currentPacket = aggregatedPacket;
|
||||
m_currentHdr = (m_txPackets[GetTid (packet, *hdr)].at (0).hdr);
|
||||
@@ -1600,10 +1629,6 @@ MacLow::ForwardDown (Ptr<const Packet> packet, const WifiMacHeader* hdr, WifiTxV
|
||||
bool last = false;
|
||||
MpduType mpdutype = NORMAL_MPDU;
|
||||
|
||||
uint8_t tid = GetTid (packet, *hdr);
|
||||
AcIndex ac = QosUtilsMapTidToAc (tid);
|
||||
std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac);
|
||||
|
||||
if (queueSize == 1)
|
||||
{
|
||||
singleMpdu = true;
|
||||
@@ -1631,7 +1656,7 @@ MacLow::ForwardDown (Ptr<const Packet> packet, const WifiMacHeader* hdr, WifiTxV
|
||||
mpdutype = LAST_MPDU_IN_AGGREGATE;
|
||||
}
|
||||
|
||||
edcaIt->second->GetMpduAggregator ()->AddHeaderAndPad (newPacket, last, singleMpdu);
|
||||
m_mpduAggregator->AddHeaderAndPad (newPacket, last, singleMpdu);
|
||||
|
||||
if (delay.IsZero ())
|
||||
{
|
||||
@@ -2788,7 +2813,6 @@ MacLow::StopMpduAggregation (Ptr<const Packet> peekedPacket, WifiMacHeader peeke
|
||||
Time aPPDUMaxTime = MicroSeconds (5484);
|
||||
uint8_t tid = GetTid (peekedPacket, peekedHdr);
|
||||
AcIndex ac = QosUtilsMapTidToAc (tid);
|
||||
std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac);
|
||||
|
||||
if (m_stationManager->GetGreenfieldSupported ())
|
||||
{
|
||||
@@ -2802,7 +2826,7 @@ MacLow::StopMpduAggregation (Ptr<const Packet> peekedPacket, WifiMacHeader peeke
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!edcaIt->second->GetMpduAggregator ()->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, aggregatedPacket, blockAckSize, GetMaxAmpduSize (ac)))
|
||||
if (!m_mpduAggregator->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, aggregatedPacket, blockAckSize, GetMaxAmpduSize (ac)))
|
||||
{
|
||||
NS_LOG_DEBUG ("no more packets can be aggregated because the maximum A-MPDU size has been reached");
|
||||
return true;
|
||||
@@ -2843,7 +2867,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
NS_ASSERT (edcaIt != m_edca.end ());
|
||||
queue = edcaIt->second->GetWifiMacQueue ();
|
||||
|
||||
if (!hdr.GetAddr1 ().IsBroadcast () && edcaIt->second->GetMpduAggregator () != 0)
|
||||
if (!hdr.GetAddr1 ().IsBroadcast () && m_mpduAggregator != 0)
|
||||
{
|
||||
//Have to make sure that the block ACK agreement is established before sending an AMPDU
|
||||
if (edcaIt->second->GetBaAgreementEstablished (hdr.GetAddr1 (), tid))
|
||||
@@ -2871,7 +2895,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
newPacket->AddHeader (peekedHdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
|
||||
aggregated = edcaIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
aggregated = m_mpduAggregator->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
|
||||
if (aggregated)
|
||||
{
|
||||
@@ -2904,7 +2928,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
currentSequenceNumber = edcaIt->second->PeekNextSequenceNumberFor (&peekedHdr);
|
||||
|
||||
/* here is performed MSDU aggregation (two-level aggregation) */
|
||||
if (peekedPacket != 0 && edcaIt->second->GetMsduAggregator () != 0)
|
||||
if (peekedPacket != 0 && m_msduAggregator != 0)
|
||||
{
|
||||
tempPacket = PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
|
||||
if (tempPacket != 0) //MSDU aggregation
|
||||
@@ -2945,7 +2969,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
|
||||
newPacket->AddHeader (peekedHdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
aggregated = edcaIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
aggregated = m_mpduAggregator->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
if (aggregated)
|
||||
{
|
||||
m_aggregateQueue[tid]->Enqueue (Create<WifiMacQueueItem> (aggPacket, peekedHdr));
|
||||
@@ -3001,7 +3025,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
tstamp = item->GetTimeStamp ();
|
||||
currentSequenceNumber = edcaIt->second->PeekNextSequenceNumberFor (&peekedHdr);
|
||||
|
||||
if (edcaIt->second->GetMsduAggregator () != 0)
|
||||
if (m_msduAggregator != 0)
|
||||
{
|
||||
tempPacket = PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
|
||||
if (tempPacket != 0) //MSDU aggregation
|
||||
@@ -3027,7 +3051,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
tstamp = item->GetTimeStamp ();
|
||||
currentSequenceNumber = edcaIt->second->PeekNextSequenceNumberFor (&peekedHdr);
|
||||
|
||||
if (edcaIt->second->GetMsduAggregator () != 0 && IsInWindow (currentSequenceNumber, startingSequenceNumber, maxMpdus))
|
||||
if (m_msduAggregator != 0 && IsInWindow (currentSequenceNumber, startingSequenceNumber, maxMpdus))
|
||||
{
|
||||
tempPacket = PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
|
||||
if (tempPacket != 0) //MSDU aggregation
|
||||
@@ -3053,7 +3077,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
m_aggregateQueue[tid]->Enqueue (Create<WifiMacQueueItem> (aggPacket, peekedHdr));
|
||||
newPacket->AddHeader (peekedHdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
edcaIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
m_mpduAggregator->Aggregate (newPacket, currentAggregatedPacket, GetMaxAmpduSize (ac));
|
||||
currentAggregatedPacket->AddHeader (blockAckReq);
|
||||
}
|
||||
|
||||
@@ -3095,7 +3119,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
peekedHdr.SetQosAckPolicy (WifiMacHeader::NORMAL_ACK);
|
||||
|
||||
currentAggregatedPacket = Create<Packet> ();
|
||||
edcaIt->second->GetMpduAggregator ()->AggregateSingleMpdu (packet, currentAggregatedPacket);
|
||||
m_mpduAggregator->AggregateSingleMpdu (packet, currentAggregatedPacket);
|
||||
m_aggregateQueue[tid]->Enqueue (Create<WifiMacQueueItem> (packet, peekedHdr));
|
||||
if (m_txParams.MustSendRts ())
|
||||
{
|
||||
@@ -3166,7 +3190,7 @@ MacLow::PerformMsduAggregation (Ptr<const Packet> packet, WifiMacHeader *hdr, Ti
|
||||
*hdr = peekedItem->GetHeader ();
|
||||
}
|
||||
|
||||
edcaIt->second->GetMsduAggregator ()->Aggregate (packet, currentAmsduPacket,
|
||||
m_msduAggregator->Aggregate (packet, currentAmsduPacket,
|
||||
edcaIt->second->MapSrcAddressForAggregation (*hdr),
|
||||
edcaIt->second->MapDestAddressForAggregation (*hdr),
|
||||
GetMaxAmsduSize (ac));
|
||||
@@ -3178,7 +3202,7 @@ MacLow::PerformMsduAggregation (Ptr<const Packet> packet, WifiMacHeader *hdr, Ti
|
||||
*tstamp = peekedItem->GetTimeStamp ();
|
||||
tempPacket = currentAmsduPacket;
|
||||
|
||||
msduAggregation = edcaIt->second->GetMsduAggregator ()->Aggregate (peekedItem->GetPacket (), tempPacket,
|
||||
msduAggregation = m_msduAggregator->Aggregate (peekedItem->GetPacket (), tempPacket,
|
||||
edcaIt->second->MapSrcAddressForAggregation (*hdr),
|
||||
edcaIt->second->MapDestAddressForAggregation (*hdr),
|
||||
GetMaxAmsduSize (ac));
|
||||
|
||||
@@ -52,6 +52,8 @@ class MgtAddBaResponseHeader;
|
||||
class WifiRemoteStationManager;
|
||||
class CtrlBAckRequestHeader;
|
||||
class CtrlBAckResponseHeader;
|
||||
class MsduAggregator;
|
||||
class MpduAggregator;
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
@@ -461,6 +463,31 @@ public:
|
||||
*/
|
||||
uint32_t GetMaxAmpduSize (AcIndex ac) const;
|
||||
|
||||
/**
|
||||
* Returns the aggregator used to construct A-MSDU subframes.
|
||||
*
|
||||
* \return the aggregator used to construct A-MSDU subframes.
|
||||
*/
|
||||
Ptr<MsduAggregator> GetMsduAggregator (void) const;
|
||||
/**
|
||||
* Returns the aggregator used to construct A-MPDU subframes.
|
||||
*
|
||||
* \return the aggregator used to construct A-MPDU subframes.
|
||||
*/
|
||||
Ptr<MpduAggregator> GetMpduAggregator (void) const;
|
||||
|
||||
/**
|
||||
* Set the aggregator used to construct A-MSDU subframes.
|
||||
*
|
||||
* \param aggr pointer to the MSDU aggregator.
|
||||
*/
|
||||
void SetMsduAggregator (const Ptr<MsduAggregator> aggr);
|
||||
/**
|
||||
* Set the aggregator used to construct A-MPDU subframes.
|
||||
*
|
||||
* \param aggr pointer to the MPDU aggregator.
|
||||
*/
|
||||
void SetMpduAggregator (const Ptr<MpduAggregator> aggr);
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -924,6 +951,9 @@ private:
|
||||
typedef std::vector<Ptr<ChannelAccessManager> > ChannelAccessManagers;
|
||||
ChannelAccessManagers m_channelAccessManagers; //!< List of ChannelAccessManager
|
||||
|
||||
Ptr<MsduAggregator> m_msduAggregator; //!< A-MSDU aggregator
|
||||
Ptr<MpduAggregator> m_mpduAggregator; //!< A-MPDU aggregator
|
||||
|
||||
EventId m_normalAckTimeoutEvent; //!< Normal ACK timeout event
|
||||
EventId m_blockAckTimeoutEvent; //!< Block ACK timeout event
|
||||
EventId m_ctsTimeoutEvent; //!< CTS timeout event
|
||||
|
||||
@@ -88,9 +88,7 @@ QosTxop::GetTypeId (void)
|
||||
}
|
||||
|
||||
QosTxop::QosTxop ()
|
||||
: m_msduAggregator (0),
|
||||
m_mpduAggregator (0),
|
||||
m_typeOfStation (STA),
|
||||
: m_typeOfStation (STA),
|
||||
m_blockAckType (COMPRESSED_BLOCK_ACK),
|
||||
m_startTxop (Seconds (0)),
|
||||
m_isAccessRequestedForRts (false),
|
||||
@@ -119,8 +117,6 @@ QosTxop::DoDispose (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_baManager = 0;
|
||||
m_qosBlockedDestinations = 0;
|
||||
m_msduAggregator = 0;
|
||||
m_mpduAggregator = 0;
|
||||
Txop::DoDispose ();
|
||||
}
|
||||
|
||||
@@ -298,16 +294,17 @@ QosTxop::NotifyAccessGranted (void)
|
||||
m_currentIsFragmented = false;
|
||||
WifiMacHeader peekedHdr;
|
||||
Ptr<const WifiMacQueueItem> item;
|
||||
Ptr<MsduAggregator> msduAggregator = GetLow ()->GetMsduAggregator ();
|
||||
if (m_currentHdr.IsQosData ()
|
||||
&& (item = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (),
|
||||
m_currentHdr.GetAddr1 ()))
|
||||
&& !m_currentHdr.GetAddr1 ().IsBroadcast ()
|
||||
&& m_msduAggregator != 0 && !m_currentHdr.IsRetry ())
|
||||
&& msduAggregator != 0 && !m_currentHdr.IsRetry ())
|
||||
{
|
||||
peekedHdr = item->GetHeader ();
|
||||
/* here is performed aggregation */
|
||||
Ptr<Packet> currentAggregatedPacket = Create<Packet> ();
|
||||
m_msduAggregator->Aggregate (m_currentPacket, currentAggregatedPacket,
|
||||
msduAggregator->Aggregate (m_currentPacket, currentAggregatedPacket,
|
||||
MapSrcAddressForAggregation (peekedHdr),
|
||||
MapDestAddressForAggregation (peekedHdr),
|
||||
GetLow ()->GetMaxAmsduSize (QosUtilsMapTidToAc (m_currentHdr.GetQosTid ())));
|
||||
@@ -318,7 +315,7 @@ QosTxop::NotifyAccessGranted (void)
|
||||
while (peekedItem != 0)
|
||||
{
|
||||
peekedHdr = peekedItem->GetHeader ();
|
||||
aggregated = m_msduAggregator->Aggregate (peekedItem->GetPacket (), currentAggregatedPacket,
|
||||
aggregated = msduAggregator->Aggregate (peekedItem->GetPacket (), currentAggregatedPacket,
|
||||
MapSrcAddressForAggregation (peekedHdr),
|
||||
MapDestAddressForAggregation (peekedHdr),
|
||||
GetLow ()->GetMaxAmsduSize (QosUtilsMapTidToAc (m_currentHdr.GetQosTid ())));
|
||||
@@ -829,18 +826,6 @@ QosTxop::MissedBlockAck (uint8_t nMpdus)
|
||||
RestartAccessIfNeeded ();
|
||||
}
|
||||
|
||||
Ptr<MsduAggregator>
|
||||
QosTxop::GetMsduAggregator (void) const
|
||||
{
|
||||
return m_msduAggregator;
|
||||
}
|
||||
|
||||
Ptr<MpduAggregator>
|
||||
QosTxop::GetMpduAggregator (void) const
|
||||
{
|
||||
return m_mpduAggregator;
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::RestartAccessIfNeeded (void)
|
||||
{
|
||||
@@ -1336,20 +1321,6 @@ QosTxop::MapDestAddressForAggregation (const WifiMacHeader &hdr)
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::SetMsduAggregator (const Ptr<MsduAggregator> aggr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << aggr);
|
||||
m_msduAggregator = aggr;
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::SetMpduAggregator (const Ptr<MpduAggregator> aggr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << aggr);
|
||||
m_mpduAggregator = aggr;
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::PushFront (Ptr<const Packet> packet, const WifiMacHeader &hdr)
|
||||
{
|
||||
@@ -1424,7 +1395,7 @@ QosTxop::VerifyBlockAck (void)
|
||||
m_baManager->SwitchToBlockAckIfNeeded (recipient, tid, sequence);
|
||||
}
|
||||
if ((m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
|
||||
&& (GetMpduAggregator () == 0 || GetLow ()->GetMaxAmpduSize (QosUtilsMapTidToAc (tid)) == 0))
|
||||
&& (GetLow ()->GetMpduAggregator () == 0 || GetLow ()->GetMaxAmpduSize (QosUtilsMapTidToAc (tid)) == 0))
|
||||
{
|
||||
m_currentHdr.SetQosAckPolicy (WifiMacHeader::BLOCK_ACK);
|
||||
}
|
||||
@@ -1481,7 +1452,7 @@ QosTxop::SetupBlockAckIfNeeded (void)
|
||||
Mac48Address recipient = m_currentHdr.GetAddr1 ();
|
||||
uint32_t packets = m_queue->GetNPacketsByTidAndAddress (tid, recipient);
|
||||
if ((GetBlockAckThreshold () > 0 && packets >= GetBlockAckThreshold ())
|
||||
|| (m_mpduAggregator != 0 && GetLow ()->GetMaxAmpduSize (QosUtilsMapTidToAc (tid)) > 0 && packets > 1)
|
||||
|| (GetLow ()->GetMpduAggregator () != 0 && GetLow ()->GetMaxAmpduSize (QosUtilsMapTidToAc (tid)) > 0 && packets > 1)
|
||||
|| m_stationManager->GetVhtSupported ()
|
||||
|| m_stationManager->GetHeSupported ())
|
||||
{
|
||||
|
||||
@@ -34,8 +34,6 @@ class HeAggregationTest;
|
||||
namespace ns3 {
|
||||
|
||||
class QosBlockedDestinations;
|
||||
class MsduAggregator;
|
||||
class MpduAggregator;
|
||||
class MgtAddBaResponseHeader;
|
||||
class MgtDelBaHeader;
|
||||
class AggregationCapableTransmissionListener;
|
||||
@@ -132,19 +130,6 @@ public:
|
||||
*/
|
||||
TypeOfStation GetTypeOfStation (void) const;
|
||||
|
||||
/**
|
||||
* Returns the aggregator used to construct A-MSDU subframes.
|
||||
*
|
||||
* \return the aggregator used to construct A-MSDU subframes.
|
||||
*/
|
||||
Ptr<MsduAggregator> GetMsduAggregator (void) const;
|
||||
/**
|
||||
* Returns the aggregator used to construct A-MPDU subframes.
|
||||
*
|
||||
* \return the aggregator used to construct A-MPDU subframes.
|
||||
*/
|
||||
Ptr<MpduAggregator> GetMpduAggregator (void) const;
|
||||
|
||||
/**
|
||||
* \param address recipient address of the peer station
|
||||
* \param tid traffic ID.
|
||||
@@ -281,19 +266,6 @@ public:
|
||||
*/
|
||||
void SetAccessCategory (AcIndex ac);
|
||||
|
||||
/**
|
||||
* Set the aggregator used to construct A-MSDU subframes.
|
||||
*
|
||||
* \param aggr pointer to the MSDU aggregator.
|
||||
*/
|
||||
void SetMsduAggregator (const Ptr<MsduAggregator> aggr);
|
||||
/**
|
||||
* Set the aggregator used to construct A-MPDU subframes.
|
||||
*
|
||||
* \param aggr pointer to the MPDU aggregator.
|
||||
*/
|
||||
void SetMpduAggregator (const Ptr<MpduAggregator> aggr);
|
||||
|
||||
/**
|
||||
* \param packet packet to send.
|
||||
* \param hdr header of packet to send.
|
||||
@@ -589,8 +561,6 @@ private:
|
||||
void DoInitialize (void);
|
||||
|
||||
AcIndex m_ac; //!< the access category
|
||||
Ptr<MsduAggregator> m_msduAggregator; //!< A-MSDU aggregator
|
||||
Ptr<MpduAggregator> m_mpduAggregator; //!< A-MPDU aggregator
|
||||
TypeOfStation m_typeOfStation; //!< the type of station
|
||||
Ptr<QosBlockedDestinations> m_qosBlockedDestinations; //!< QOS blocked destinations
|
||||
Ptr<BlockAckManager> m_baManager; //!< the Block ACK manager
|
||||
|
||||
@@ -1318,18 +1318,15 @@ void
|
||||
RegularWifiMac::EnableAggregation (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
|
||||
if (m_low->GetMsduAggregator () == 0)
|
||||
{
|
||||
if (i->second->GetMsduAggregator () == 0)
|
||||
{
|
||||
Ptr<MsduAggregator> msduAggregator = CreateObject<MsduAggregator> ();
|
||||
i->second->SetMsduAggregator (msduAggregator);
|
||||
}
|
||||
if (i->second->GetMpduAggregator () == 0)
|
||||
{
|
||||
Ptr<MpduAggregator> mpduAggregator = CreateObject<MpduAggregator> ();
|
||||
i->second->SetMpduAggregator (mpduAggregator);
|
||||
}
|
||||
Ptr<MsduAggregator> msduAggregator = CreateObject<MsduAggregator> ();
|
||||
m_low->SetMsduAggregator (msduAggregator);
|
||||
}
|
||||
if (m_low->GetMpduAggregator () == 0)
|
||||
{
|
||||
Ptr<MpduAggregator> mpduAggregator = CreateObject<MpduAggregator> ();
|
||||
m_low->SetMpduAggregator (mpduAggregator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1337,11 +1334,8 @@ void
|
||||
RegularWifiMac::DisableAggregation (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
|
||||
{
|
||||
i->second->SetMsduAggregator (0);
|
||||
i->second->SetMpduAggregator (0);
|
||||
}
|
||||
m_low->SetMsduAggregator (0);
|
||||
m_low->SetMpduAggregator (0);
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user