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

(-)a/src/wifi/model/mac-low.cc (-4 / +5 lines)
 Lines 533-539    Link Here 
533
MacLow::ResetPhy (void)
533
MacLow::ResetPhy (void)
534
{
534
{
535
  m_phy->SetReceiveOkCallback (MakeNullCallback<void, Ptr<Packet>, double, WifiTxVector, enum WifiPreamble> ());
535
  m_phy->SetReceiveOkCallback (MakeNullCallback<void, Ptr<Packet>, double, WifiTxVector, enum WifiPreamble> ());
536
  m_phy->SetReceiveErrorCallback (MakeNullCallback<void, Ptr<const Packet>, double, bool> ());
536
  m_phy->SetReceiveErrorCallback (MakeNullCallback<void, Ptr<Packet>, double, bool> ());
537
  RemovePhyMacLowListener (m_phy);
537
  RemovePhyMacLowListener (m_phy);
538
  m_phy = 0;
538
  m_phy = 0;
539
}
539
}
 Lines 837-850    Link Here 
837
}
837
}
838
838
839
void
839
void
840
MacLow::ReceiveError (Ptr<const Packet> packet, double rxSnr, bool isEndOfFrame)
840
MacLow::ReceiveError (Ptr<Packet> packet, double rxSnr, bool isEndOfFrame)
841
{
841
{
842
  NS_LOG_FUNCTION (this << packet << rxSnr << isEndOfFrame);
842
  NS_LOG_FUNCTION (this << packet << rxSnr << isEndOfFrame);
843
  NS_LOG_DEBUG ("rx failed ");
843
  NS_LOG_DEBUG ("rx failed ");
844
  if (isEndOfFrame == true && m_receivedAtLeastOneMpdu == true)
844
  if (isEndOfFrame == true && m_receivedAtLeastOneMpdu == true)
845
    {
845
    {
846
      WifiMacHeader hdr;
846
      WifiMacHeader hdr;
847
      packet->PeekHeader (hdr);
847
      MpduAggregator::DeaggregatedMpdus mpdu = MpduAggregator::Deaggregate (packet);
848
      mpdu.begin ()->first->PeekHeader (hdr);
848
      if (hdr.GetAddr1 () != m_self)
849
      if (hdr.GetAddr1 () != m_self)
849
        {
850
        {
850
          NS_LOG_DEBUG ("hdr addr1 " << hdr.GetAddr1 () << "not for me (" << m_self << "); returning");
851
          NS_LOG_DEBUG ("hdr addr1 " << hdr.GetAddr1 () << "not for me (" << m_self << "); returning");
 Lines 1691-1697    Link Here 
1691
              ampdutag.SetNoOfMpdus (queueSize);
1692
              ampdutag.SetNoOfMpdus (queueSize);
1692
            }
1693
            }
1693
          newPacket->AddPacketTag (ampdutag);
1694
          newPacket->AddPacketTag (ampdutag);
1694
          
1695
1695
          if (delay == Seconds (0))
1696
          if (delay == Seconds (0))
1696
            {
1697
            {
1697
              if (!vhtSingleMpdu)
1698
              if (!vhtSingleMpdu)
(-)a/src/wifi/model/mac-low.h (-1 / +1 lines)
 Lines 732-738    Link Here 
732
   * This method is typically invoked by the lower PHY layer to notify
732
   * This method is typically invoked by the lower PHY layer to notify
733
   * the MAC layer that a packet was unsuccessfully received.
733
   * the MAC layer that a packet was unsuccessfully received.
734
   */
734
   */
735
  void ReceiveError (Ptr<const Packet> packet, double rxSnr, bool isEndOfFrame);
735
  void ReceiveError (Ptr<Packet> packet, double rxSnr, bool isEndOfFrame);
736
  /**
736
  /**
737
   * \param duration switching delay duration.
737
   * \param duration switching delay duration.
738
   *
738
   *
(-)a/src/wifi/model/wifi-phy-state-helper.cc (-1 / +1 lines)
 Lines 442-448    Link Here 
442
}
442
}
443
443
444
void
444
void
445
WifiPhyStateHelper::SwitchFromRxEndError (Ptr<const Packet> packet, double snr, bool isEndOfFrame)
445
WifiPhyStateHelper::SwitchFromRxEndError (Ptr<Packet> packet, double snr, bool isEndOfFrame)
446
{
446
{
447
  m_rxErrorTrace (packet, snr);
447
  m_rxErrorTrace (packet, snr);
448
  NotifyRxEndError ();
448
  NotifyRxEndError ();
(-)a/src/wifi/model/wifi-phy-state-helper.h (-1 / +1 lines)
 Lines 169-175    Link Here 
169
   * \param snr the SNR of the received packet
169
   * \param snr the SNR of the received packet
170
   * \param isEndOfFrame PHY-RXEND indication.
170
   * \param isEndOfFrame PHY-RXEND indication.
171
   */
171
   */
172
  void SwitchFromRxEndError (Ptr<const Packet> packet, double snr, bool isEndOfFrame);
172
  void SwitchFromRxEndError (Ptr<Packet> packet, double snr, bool isEndOfFrame);
173
  /**
173
  /**
174
   * Switch to CCA busy.
174
   * Switch to CCA busy.
175
   *
175
   *
(-)a/src/wifi/model/wifi-phy.h (-1 / +1 lines)
 Lines 194-200    Link Here 
194
   * arg2: snr of packet
194
   * arg2: snr of packet
195
   * arg3: PHY-RXEND flag
195
   * arg3: PHY-RXEND flag
196
   */
196
   */
197
  typedef Callback<void, Ptr<const Packet>, double, bool> RxErrorCallback;
197
  typedef Callback<void, Ptr<Packet>, double, bool> RxErrorCallback;
198
198
199
  static TypeId GetTypeId (void);
199
  static TypeId GetTypeId (void);
200
200

Return to bug 2313