Fix issue when a normal data packet is sent between A-MPDUs
This commit is contained in:
@@ -1249,7 +1249,7 @@ EdcaTxopN::VerifyBlockAck (void)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -2650,6 +2650,12 @@ MacLow::SetMpduAggregator (Ptr<MpduAggregator> aggregator)
|
||||
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 @@ MacLow::StopMpduAggregation (Ptr<const Packet> peekedPacket, WifiMacHeader peeke
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -529,6 +529,11 @@ public:
|
||||
* \param aggregator MpduAggregator associated with this MacLow
|
||||
*/
|
||||
void SetMpduAggregator (Ptr<MpduAggregator> aggregator);
|
||||
/**
|
||||
*
|
||||
* \return the attached MpduAggregator
|
||||
*/
|
||||
Ptr<MpduAggregator> GetMpduAggregator (void);
|
||||
/**
|
||||
* Set MAC address of this MacLow.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user