View | Details | Raw Unified | Return to bug 2075
Collapse All | Expand All

(-)a/src/wifi/model/block-ack-manager.cc (+13 lines)
 Lines 395-400    Link Here 
395
  return false;
395
  return false;
396
}
396
}
397
397
398
void
399
BlockAckManager::FlushQueue (uint8_t tid, Mac48Address recipient)
400
{
401
  AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
402
  PacketQueueI queueEnd = it->second.second.end ();
403
404
  for (PacketQueueI queueIt = it->second.second.begin (); queueIt != queueEnd;)
405
  {
406
    NS_LOG_DEBUG("Removed Packet = " << (*queueIt).hdr.GetSequenceNumber () << " " << (uint32_t) tid << " " << recipient);
407
    queueIt = it->second.second.erase (queueIt);
408
  }
409
}
410
398
bool
411
bool
399
BlockAckManager::HasBar (struct Bar &bar)
412
BlockAckManager::HasBar (struct Bar &bar)
400
{
413
{
(-)a/src/wifi/model/block-ack-manager.h (+4 lines)
 Lines 307-312    Link Here 
307
   * Remove a packet after you peek in the queue and get it
307
   * Remove a packet after you peek in the queue and get it
308
   */
308
   */
309
  bool RemovePacket (uint8_t tid, Mac48Address recipient, uint16_t seqnumber);
309
  bool RemovePacket (uint8_t tid, Mac48Address recipient, uint16_t seqnumber);
310
  /**
311
   * Remove all packets
312
   */
313
  void FlushQueue (uint8_t tid, Mac48Address recipient);
310
  /*
314
  /*
311
   * Peek in retransmit queue and get the next packet without removing it from the queue
315
   * Peek in retransmit queue and get the next packet without removing it from the queue
312
   */
316
   */
(-)a/src/wifi/model/edca-txop-n.cc (-1 / +34 lines)
 Lines 645-654    Link Here 
645
        }
645
        }
646
      if (GetAmpduExist())
646
      if (GetAmpduExist())
647
        {
647
        {
648
          FlushBaQueue(m_currentHdr.GetQosTid (), m_currentHdr.GetAddr1 ());
648
          m_low->FlushAggregateQueue ();
649
          m_low->FlushAggregateQueue ();
650
          
651
          NS_LOG_DEBUG ("Transmit Block Ack Request");
652
          CtrlBAckRequestHeader reqHdr;
653
          reqHdr.SetType (COMPRESSED_BLOCK_ACK);
654
          uint8_t tid = m_currentHdr.GetQosTid ();
655
          reqHdr.SetStartingSequence (m_txMiddle->PeekNextSequenceNumberfor (&m_currentHdr));
656
          reqHdr.SetTidInfo (tid);
657
          reqHdr.SetHtImmediateAck(true);
658
          Ptr<Packet> bar = Create<Packet> ();
659
          bar->AddHeader (reqHdr);
660
          Bar request (bar, m_currentHdr.GetAddr1 (), tid, reqHdr.MustSendHtImmediateAck());
661
          m_currentBar = request;
662
          WifiMacHeader hdr;
663
          hdr.SetType (WIFI_MAC_CTL_BACKREQ);
664
          hdr.SetAddr1 (request.recipient);
665
          hdr.SetAddr2 (m_low->GetAddress ());
666
          hdr.SetAddr3 (m_low->GetBssid ());
667
          hdr.SetDsNotTo ();
668
          hdr.SetDsNotFrom ();
669
          hdr.SetNoRetry ();
670
          hdr.SetNoMoreFragments ();
671
          m_currentPacket = request.bar;
672
          m_currentHdr = hdr;
673
        }
674
      else
675
        {
676
          m_currentPacket = 0;
649
        }
677
        }
650
      // to reset the dcf.
678
      // to reset the dcf.
651
      m_currentPacket = 0;
652
      m_dcf->ResetCw ();
679
      m_dcf->ResetCw ();
653
    }
680
    }
654
  else
681
  else
 Lines 1444-1447    Link Here 
1444
    }
1471
    }
1445
}
1472
}
1446
1473
1474
void
1475
EdcaTxopN::FlushBaQueue (uint8_t tid, Mac48Address recipient)
1476
{
1477
   m_baManager->FlushQueue (tid, recipient);
1478
}
1479
1447
} // namespace ns3
1480
} // namespace ns3
(-)a/src/wifi/model/edca-txop-n.h (+4 lines)
 Lines 421-426    Link Here 
421
   * Remove a packet after you peek in the retransmit queue and get it
421
   * Remove a packet after you peek in the retransmit queue and get it
422
   */
422
   */
423
  void RemoveRetransmitPacket (uint8_t tid, Mac48Address recipient, uint16_t seqnumber);
423
  void RemoveRetransmitPacket (uint8_t tid, Mac48Address recipient, uint16_t seqnumber);
424
  /**
425
   * Remove all packets in the BA queue
426
   */
427
  void FlushBaQueue (uint8_t tid, Mac48Address recipient);
424
  /*
428
  /*
425
   * Peek in retransmit queue and get the next packet without removing it from the queue
429
   * Peek in retransmit queue and get the next packet without removing it from the queue
426
   */
430
   */

Return to bug 2075