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

(-)a/src/wifi/model/mac-low.cc (-15 / +15 lines)
 Lines 732-753    Link Here 
732
   * QapScheduler has taken access to the channel from
732
   * QapScheduler has taken access to the channel from
733
   * one of the Edca of the QAP.
733
   * one of the Edca of the QAP.
734
   */
734
   */
735
  m_currentPacket = packet->Copy ();
735
  Ptr<Packet> newPacket = packet->Copy ();
736
  // remove the priority tag attached, if any
736
  // remove the priority tag attached, if any
737
  SocketPriorityTag priorityTag;
737
  SocketPriorityTag priorityTag;
738
  m_currentPacket->RemovePacketTag (priorityTag);
738
  newPacket->RemovePacketTag (priorityTag);
739
  m_currentHdr = *hdr;
739
  WifiMacHeader newHdr = *hdr;
740
  CancelAllEvents ();
740
  CancelAllEvents ();
741
  m_listener = listener;
741
  m_listener = listener;
742
  m_txParams = params;
742
  m_txParams = params;
743
  m_currentTxVector = GetDataTxVector (m_currentPacket, &m_currentHdr);
744
743
745
  if (!m_currentHdr.IsQosData () && !m_currentHdr.IsBlockAck () && !m_currentHdr.IsBlockAckReq ())
744
  if (newHdr.IsMgt ()
745
     || (!newHdr.IsQosData ()
746
     && !newHdr.IsBlockAck ()
747
     && !newHdr.IsBlockAckReq ()))
746
    {
748
    {
747
      //This is mainly encountered when a higher priority control frame (such as beacons)
749
      //This is mainly encountered when a higher priority control or management frame is
748
      //is sent between A-MPDU transmissions. It avoids to unexpectedly flush the aggregate
750
      //sent between A-MPDU transmissions. It avoids to unexpectedly flush the aggregate
749
      //queue when previous RTS request has failed.
751
      //queue when previous RTS request has failed.
750
      m_ampdu = false;
752
      m_ampdu = false;
753
      m_currentPacket = newPacket;
754
      m_currentHdr = newHdr;
751
    }
755
    }
752
  else if (m_aggregateQueue->GetSize () > 0)
756
  else if (m_aggregateQueue->GetSize () > 0)
753
    {
757
    {
 Lines 768-773    Link Here 
768
  else
772
  else
769
    {
773
    {
770
      //Perform MPDU aggregation if possible
774
      //Perform MPDU aggregation if possible
775
      m_currentPacket = newPacket;
776
      m_currentHdr = newHdr;
771
      m_ampdu = IsAmpdu (m_currentPacket, m_currentHdr);
777
      m_ampdu = IsAmpdu (m_currentPacket, m_currentHdr);
772
      if (m_ampdu)
778
      if (m_ampdu)
773
        {
779
        {
 Lines 784-789    Link Here 
784
            }
790
            }
785
        }
791
        }
786
    }
792
    }
793
  m_currentTxVector = GetDataTxVector (m_currentPacket, &m_currentHdr);
787
    
794
    
788
  if (NeedRts ())
795
  if (NeedRts ())
789
    {
796
    {
 Lines 1517-1523    Link Here 
1517
                ", preamble=" << txVector.GetPreambleType () <<
1524
                ", preamble=" << txVector.GetPreambleType () <<
1518
                ", duration=" << hdr->GetDuration () <<
1525
                ", duration=" << hdr->GetDuration () <<
1519
                ", seq=0x" << std::hex << m_currentHdr.GetSequenceControl () << std::dec);
1526
                ", seq=0x" << std::hex << m_currentHdr.GetSequenceControl () << std::dec);
1520
  if (!m_ampdu || hdr->IsRts () || hdr->IsBlockAck ())
1527
  if (!m_ampdu || hdr->IsRts () || hdr->IsBlockAck () || hdr->IsMgt ())
1521
    {
1528
    {
1522
      m_phy->SendPacket (packet, txVector);
1529
      m_phy->SendPacket (packet, txVector);
1523
    }
1530
    }
 Lines 1628-1637    Link Here 
1628
  /// we should restart a new cts timeout now until the expected
1635
  /// we should restart a new cts timeout now until the expected
1629
  /// end of rx if there was a rx start before now.
1636
  /// end of rx if there was a rx start before now.
1630
  m_stationManager->ReportRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr);
1637
  m_stationManager->ReportRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr);
1631
  if (m_sentMpdus == 0)
1632
    {
1633
      m_currentPacket = 0;
1634
    }
1635
  MacLowTransmissionListener *listener = m_listener;
1638
  MacLowTransmissionListener *listener = m_listener;
1636
  m_listener = 0;
1639
  m_listener = 0;
1637
  m_sentMpdus = 0;
1640
  m_sentMpdus = 0;
 Lines 1891-1897    Link Here 
1891
    }
1894
    }
1892
1895
1893
  ForwardDown (m_currentPacket, &m_currentHdr, m_currentTxVector);
1896
  ForwardDown (m_currentPacket, &m_currentHdr, m_currentTxVector);
1894
  m_currentPacket = 0;
1895
}
1897
}
1896
1898
1897
bool
1899
bool
 Lines 2094-2100    Link Here 
2094
    }
2096
    }
2095
2097
2096
  ForwardDown (m_currentPacket, &m_currentHdr, m_currentTxVector);
2098
  ForwardDown (m_currentPacket, &m_currentHdr, m_currentTxVector);
2097
  m_currentPacket = 0;
2098
}
2099
}
2099
2100
2100
void
2101
void
 Lines 2451-2457    Link Here 
2451
  tag.Set (rxSnr);
2452
  tag.Set (rxSnr);
2452
  packet->AddPacketTag (tag);
2453
  packet->AddPacketTag (tag);
2453
  ForwardDown (packet, &hdr, blockAckReqTxVector);
2454
  ForwardDown (packet, &hdr, blockAckReqTxVector);
2454
  m_currentPacket = 0;
2455
}
2455
}
2456
2456
2457
void
2457
void

Return to bug 2564