--- a/src/wifi/model/edca-txop-n.cc Tue Sep 01 21:59:50 2015 +0200
+++ b/src/wifi/model/edca-txop-n.cc Tue Sep 01 22:02:05 2015 +0200
@@ -1249,7 +1249,7 @@
{
m_baManager->SwitchToBlockAckIfNeeded (recipient, tid, sequence);
}
- if (m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
+ if ((m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED)) && (m_low->GetMpduAggregator () == 0))
{
m_currentHdr.SetQosAckPolicy (WifiMacHeader::BLOCK_ACK);
}
--- a/src/wifi/model/mac-low.cc Tue Sep 01 21:59:50 2015 +0200
+++ b/src/wifi/model/mac-low.cc Tue Sep 01 22:02:05 2015 +0200
@@ -2650,6 +2650,12 @@
m_mpduAggregator = aggregator;
}
+Ptr<MpduAggregator>
+MacLow::GetMpduAggregator (void)
+{
+ return m_mpduAggregator;
+}
+
void
MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr, WifiTxVector txVector, WifiPreamble preamble)
{
@@ -2746,17 +2752,20 @@
if (peekedPacket == 0)
{
+ NS_LOG_DEBUG ("no more packets in queue");
return true;
}
//An HT STA shall not transmit a PPDU that has a duration that is greater than aPPDUMaxTime (10 milliseconds)
if (m_phy->CalculateTxDuration (aggregatedPacket->GetSize () + peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, dataTxVector, preamble, m_phy->GetFrequency (), 0, 0) > MilliSeconds (10))
{
+ NS_LOG_DEBUG ("no more packets can be aggregated to satisfy PPDU <= aPPDUMaxTime");
return true;
}
if (!m_mpduAggregator->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, aggregatedPacket, size))
{
+ NS_LOG_DEBUG ("no more packets can be aggregated because the maximum A-MPDU size has been reached");
return true;
}
--- a/src/wifi/model/mac-low.h Tue Sep 01 21:59:50 2015 +0200
+++ b/src/wifi/model/mac-low.h Tue Sep 01 22:02:05 2015 +0200
@@ -530,6 +530,11 @@
*/
void SetMpduAggregator (Ptr<MpduAggregator> aggregator);
/**
+ *
+ * \return the attached MpduAggregator
+ */
+ Ptr<MpduAggregator> GetMpduAggregator (void);
+ /**
* Set MAC address of this MacLow.
*
* \param ad Mac48Address of this MacLow