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

(-)a/examples/wireless/examples-to-run.py (-1 / +2 lines)
 Lines 43-49   cpp_examples = [ Link Here 
43
    ("ht-wifi-network --simulationTime=0.1 --frequency=2.4 --useRts=1 --minExpectedThroughput=4.5 --maxExpectedThroughput=128", "True", "True"),
43
    ("ht-wifi-network --simulationTime=0.1 --frequency=2.4 --useRts=1 --minExpectedThroughput=4.5 --maxExpectedThroughput=128", "True", "True"),
44
    ("vht-wifi-network --simulationTime=0.1 --useRts=0  --minExpectedThroughput=5 --maxExpectedThroughput=607", "True", "True"),
44
    ("vht-wifi-network --simulationTime=0.1 --useRts=0  --minExpectedThroughput=5 --maxExpectedThroughput=607", "True", "True"),
45
    ("vht-wifi-network --simulationTime=0.2 --useRts=1", "True", "True"),
45
    ("vht-wifi-network --simulationTime=0.2 --useRts=1", "True", "True"),
46
    ("he-wifi-network --simulationTime=0.25 --frequency=5 --useRts=0  --minExpectedThroughput=6 --maxExpectedThroughput=844", "True", "True"),
46
    ("he-wifi-network --simulationTime=0.25 --frequency=5 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=844", "True", "True"),
47
    ("he-wifi-network --simulationTime=0.25 --frequency=5 --useRts=0 --useExtendedBlockAck=1 --minExpectedThroughput=6 --maxExpectedThroughput=1033", "True", "True"),
47
    ("he-wifi-network --simulationTime=0.3 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=745", "True", "True"),
48
    ("he-wifi-network --simulationTime=0.3 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=745", "True", "True"),
48
    ("he-wifi-network --simulationTime=0.25 --frequency=2.4 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=238", "True", "True"),
49
    ("he-wifi-network --simulationTime=0.25 --frequency=2.4 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=238", "True", "True"),
49
    ("he-wifi-network --simulationTime=0.3 --frequency=2.4 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=224", "True", "True"),
50
    ("he-wifi-network --simulationTime=0.3 --frequency=2.4 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=224", "True", "True"),
(-)a/src/wifi/model/block-ack-manager.cc (-1 lines)
 Lines 518-524   BlockAckManager::AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uin Link Here 
518
  std::list<PacketQueueI>::const_iterator it = m_retryPackets.begin ();
518
  std::list<PacketQueueI>::const_iterator it = m_retryPackets.begin ();
519
  while (it != m_retryPackets.end ())
519
  while (it != m_retryPackets.end ())
520
    {
520
    {
521
      NS_LOG_FUNCTION (this << (*it)->hdr.GetType ());
522
      if (!(*it)->hdr.IsQosData ())
521
      if (!(*it)->hdr.IsQosData ())
523
        {
522
        {
524
          NS_FATAL_ERROR ("Packet in blockAck manager retry queue is not Qos Data");
523
          NS_FATAL_ERROR ("Packet in blockAck manager retry queue is not Qos Data");
(-)a/src/wifi/model/mac-low.cc (-17 / +29 lines)
 Lines 544-556   MacLow::StartTransmission (Ptr<const Packet> packet, Link Here 
544
      //In that case, we transmit the same A-MPDU as previously.
544
      //In that case, we transmit the same A-MPDU as previously.
545
      uint32_t sentMpdus = m_aggregateQueue[GetTid (packet, *hdr)]->GetNPackets ();
545
      uint32_t sentMpdus = m_aggregateQueue[GetTid (packet, *hdr)]->GetNPackets ();
546
      m_ampdu = true;
546
      m_ampdu = true;
547
      if (sentMpdus > 64)
547
      if (sentMpdus > 1)
548
        {
548
        {
549
          m_txParams.EnableExtendedCompressedBlockAck ();
549
          AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr));
550
        }
550
          std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac);
551
      else if (sentMpdus > 1)
551
          if (edcaIt->second->GetBaBufferSize (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) > 64)
552
        {
552
            {
553
          m_txParams.EnableCompressedBlockAck ();
553
              m_txParams.EnableExtendedCompressedBlockAck ();
554
            }
555
          else
556
            {
557
              m_txParams.EnableCompressedBlockAck ();
558
            }
554
        }
559
        }
555
      else if (m_currentHdr.IsQosData ())
560
      else if (m_currentHdr.IsQosData ())
556
        {
561
        {
 Lines 579-591   MacLow::StartTransmission (Ptr<const Packet> packet, Link Here 
579
        {
584
        {
580
          AmpduTag ampdu;
585
          AmpduTag ampdu;
581
          m_currentPacket->PeekPacketTag (ampdu);
586
          m_currentPacket->PeekPacketTag (ampdu);
582
          if (ampdu.GetRemainingNbOfMpdus () > 63)
587
          if (ampdu.GetRemainingNbOfMpdus () > 0)
583
            {
584
              m_txParams.EnableExtendedCompressedBlockAck ();
585
            }
586
          else if (ampdu.GetRemainingNbOfMpdus () > 0)
587
            {
588
            {
588
              m_txParams.EnableCompressedBlockAck ();
589
              AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr));
590
              std::map<AcIndex, Ptr<QosTxop> >::const_iterator edcaIt = m_edca.find (ac);
591
              if (edcaIt->second->GetBaBufferSize (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) > 64)
592
                {
593
                  m_txParams.EnableExtendedCompressedBlockAck ();
594
                }
595
              else 
596
                {
597
                  m_txParams.EnableCompressedBlockAck ();
598
                }
589
            }
599
            }
590
          else if (m_currentHdr.IsQosData ())
600
          else if (m_currentHdr.IsQosData ())
591
            {
601
            {
 Lines 2319-2324   MacLow::RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_ Link Here 
2319
      (*it).second.second.erase ((*it).second.second.begin (), lastComplete);
2329
      (*it).second.second.erase ((*it).second.second.begin (), lastComplete);
2320
    }
2330
    }
2321
}
2331
}
2332
2322
void
2333
void
2323
MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Address originator, bool immediate,
2334
MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Address originator, bool immediate,
2324
                              Time duration, WifiMode blockAckReqTxMode, double rxSnr)
2335
                              Time duration, WifiMode blockAckReqTxMode, double rxSnr)
 Lines 2370-2376   MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Addre Link Here 
2370
}
2381
}
2371
2382
2372
void
2383
void
2373
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr, uint8_t nMpdus)
2384
MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr)
2374
{
2385
{
2375
  NS_LOG_FUNCTION (this);
2386
  NS_LOG_FUNCTION (this);
2376
  if (!m_phy->IsStateTx () && !m_phy->IsStateRx ())
2387
  if (!m_phy->IsStateTx () && !m_phy->IsStateRx ())
 Lines 2387-2393   MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time durat Link Here 
2387
      blockAck.SetStartingSequence (seqNumber);
2398
      blockAck.SetStartingSequence (seqNumber);
2388
      blockAck.SetTidInfo (tid);
2399
      blockAck.SetTidInfo (tid);
2389
      immediate = (*it).second.first.IsImmediateBlockAck ();
2400
      immediate = (*it).second.first.IsImmediateBlockAck ();
2390
      if (nMpdus > 63)
2401
      if ((*it).second.first.GetBufferSize () > 64)
2391
        {
2402
        {
2392
          blockAck.SetType (EXTENDED_COMPRESSED_BLOCK_ACK);
2403
          blockAck.SetType (EXTENDED_COMPRESSED_BLOCK_ACK);
2393
        }
2404
        }
 Lines 2398-2404   MacLow::SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time durat Link Here 
2398
      NS_LOG_DEBUG ("Got Implicit block Ack Req with seq " << seqNumber);
2409
      NS_LOG_DEBUG ("Got Implicit block Ack Req with seq " << seqNumber);
2399
      (*i).second.FillBlockAckBitmap (&blockAck);
2410
      (*i).second.FillBlockAckBitmap (&blockAck);
2400
2411
2401
      SendBlockAckResponse (&blockAck, originator, immediate, duration, blockAckReqTxVector.GetMode (), rxSnr);
2412
      WifiTxVector blockAckTxVector = GetBlockAckTxVector (originator, blockAckReqTxVector.GetMode ());
2413
2414
      SendBlockAckResponse (&blockAck, originator, immediate, duration, blockAckTxVector.GetMode (), rxSnr);
2402
    }
2415
    }
2403
  else
2416
  else
2404
    {
2417
    {
 Lines 2530-2537   MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr, Link Here 
2530
                                                    firsthdr.GetQosTid (),
2543
                                                    firsthdr.GetQosTid (),
2531
                                                    firsthdr.GetAddr2 (),
2544
                                                    firsthdr.GetAddr2 (),
2532
                                                    firsthdr.GetDuration (),
2545
                                                    firsthdr.GetDuration (),
2533
                                                    txVector, rxSnr,
2546
                                                    txVector, rxSnr);
2534
                                                    ampdu.GetRemainingNbOfMpdus () + 1);
2535
            }
2547
            }
2536
2548
2537
          if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ())
2549
          if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ())
(-)a/src/wifi/model/mac-low.h (-2 / +1 lines)
 Lines 801-810   private: Link Here 
801
   * \param duration the remaining NAV duration
801
   * \param duration the remaining NAV duration
802
   * \param blockAckReqTxVector the transmit vector
802
   * \param blockAckReqTxVector the transmit vector
803
   * \param rxSnr the receive SNR
803
   * \param rxSnr the receive SNR
804
   * \param nMpdus the number of received MPDUs
805
   */
804
   */
806
  void SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration,
805
  void SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration,
807
                               WifiTxVector blockAckReqTxVector, double rxSnr, uint8_t nMpdus);
806
                               WifiTxVector blockAckReqTxVector, double rxSnr);
808
  /**
807
  /**
809
   * This method creates block ack frame with header equals to <i>blockAck</i> and start its transmission.
808
   * This method creates block ack frame with header equals to <i>blockAck</i> and start its transmission.
810
   *
809
   *
(-)a/src/wifi/model/qos-txop.cc (-4 / +11 lines)
 Lines 454-460   QosTxop::MissedCts (void) Link Here 
454
            {
454
            {
455
              NS_LOG_DEBUG ("Transmit Block Ack Request");
455
              NS_LOG_DEBUG ("Transmit Block Ack Request");
456
              CtrlBAckRequestHeader reqHdr;
456
              CtrlBAckRequestHeader reqHdr;
457
              reqHdr.SetType (COMPRESSED_BLOCK_ACK);
457
              reqHdr.SetType (GetBaBufferSize (m_currentHdr.GetAddr1 (), tid) > 64 ? EXTENDED_COMPRESSED_BLOCK_ACK : COMPRESSED_BLOCK_ACK);
458
              reqHdr.SetStartingSequence (m_txMiddle->PeekNextSequenceNumberFor (&m_currentHdr));
458
              reqHdr.SetStartingSequence (m_txMiddle->PeekNextSequenceNumberFor (&m_currentHdr));
459
              reqHdr.SetTidInfo (tid);
459
              reqHdr.SetTidInfo (tid);
460
              reqHdr.SetHtImmediateAck (true);
460
              reqHdr.SetHtImmediateAck (true);
 Lines 584-590   QosTxop::MissedAck (void) Link Here 
584
              //send Block ACK Request in order to shift WinStart at the receiver
584
              //send Block ACK Request in order to shift WinStart at the receiver
585
              NS_LOG_DEBUG ("Transmit Block Ack Request");
585
              NS_LOG_DEBUG ("Transmit Block Ack Request");
586
              CtrlBAckRequestHeader reqHdr;
586
              CtrlBAckRequestHeader reqHdr;
587
              reqHdr.SetType (COMPRESSED_BLOCK_ACK);
587
              reqHdr.SetType (GetBaBufferSize (m_currentHdr.GetAddr1 (), tid) > 64 ? EXTENDED_COMPRESSED_BLOCK_ACK : COMPRESSED_BLOCK_ACK);
588
              reqHdr.SetStartingSequence (m_txMiddle->PeekNextSequenceNumberFor (&m_currentHdr));
588
              reqHdr.SetStartingSequence (m_txMiddle->PeekNextSequenceNumberFor (&m_currentHdr));
589
              reqHdr.SetTidInfo (tid);
589
              reqHdr.SetTidInfo (tid);
590
              reqHdr.SetHtImmediateAck (true);
590
              reqHdr.SetHtImmediateAck (true);
 Lines 648-654   QosTxop::MissedBlockAck (uint8_t nMpdus) Link Here 
648
          //standard says when losing a BlockAck originator may send a BAR page 139
648
          //standard says when losing a BlockAck originator may send a BAR page 139
649
          NS_LOG_DEBUG ("Transmit Block Ack Request");
649
          NS_LOG_DEBUG ("Transmit Block Ack Request");
650
          CtrlBAckRequestHeader reqHdr;
650
          CtrlBAckRequestHeader reqHdr;
651
          reqHdr.SetType (COMPRESSED_BLOCK_ACK);
651
          reqHdr.SetType (GetBaBufferSize (m_currentHdr.GetAddr1 (), tid) > 64 ? EXTENDED_COMPRESSED_BLOCK_ACK : COMPRESSED_BLOCK_ACK);
652
          if (m_currentHdr.IsQosData ())
652
          if (m_currentHdr.IsQosData ())
653
            {
653
            {
654
              reqHdr.SetStartingSequence (m_currentHdr.GetSequenceNumber ());
654
              reqHdr.SetStartingSequence (m_currentHdr.GetSequenceNumber ());
 Lines 1393-1399   QosTxop::SendBlockAckRequest (const Bar &bar) Link Here 
1393
        }
1393
        }
1394
      else if (m_blockAckType == COMPRESSED_BLOCK_ACK)
1394
      else if (m_blockAckType == COMPRESSED_BLOCK_ACK)
1395
        {
1395
        {
1396
          m_currentParams.EnableCompressedBlockAck ();
1396
          if (GetBaBufferSize (m_currentHdr.GetAddr1 (), GetTid (m_currentPacket, m_currentHdr)) > 64)
1397
            {
1398
              m_currentParams.EnableExtendedCompressedBlockAck ();
1399
            }
1400
          else
1401
            {
1402
              m_currentParams.EnableCompressedBlockAck ();
1403
            }
1397
        }
1404
        }
1398
      else if (m_blockAckType == MULTI_TID_BLOCK_ACK)
1405
      else if (m_blockAckType == MULTI_TID_BLOCK_ACK)
1399
        {
1406
        {
(-)a/src/wifi/model/wifi-mac.cc (+1 lines)
 Lines 415-420   WifiMac::Configure80211ax_5Ghz (void) Link Here 
415
{
415
{
416
  NS_LOG_FUNCTION (this);
416
  NS_LOG_FUNCTION (this);
417
  Configure80211ac ();
417
  Configure80211ac ();
418
  SetCompressedBlockAckTimeout (GetSifs () + GetSlot () + MicroSeconds (85) + GetDefaultMaxPropagationDelay () * 2);
418
}
419
}
419
420
420
void
421
void

Return to bug 3010