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

(-)a/src/test/traced/traced-callback-typedef-test-suite.cc (-2 / +2 lines)
 Lines 610-617    Link Here 
610
         empty, empty, empty, empty);
610
         empty, empty, empty, empty);
611
611
612
  CHECK (WifiPhyStateHelper::RxEndErrorTracedCallback,
612
  CHECK (WifiPhyStateHelper::RxEndErrorTracedCallback,
613
         Ptr<const Packet>, double, bool,
613
         Ptr<const Packet>, double,
614
         empty, empty);
614
         empty, empty, empty);
615
615
616
  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
616
  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
617
         Ptr<const Packet>, double, WifiMode, WifiPreamble,
617
         Ptr<const Packet>, double, WifiMode, WifiPreamble,
(-)a/src/wifi/model/ampdu-tag.cc (-2 / +18 lines)
 Lines 48-54    Link Here 
48
}
48
}
49
49
50
AmpduTag::AmpduTag ()
50
AmpduTag::AmpduTag ()
51
  : m_ampdu (0)
51
  : m_ampdu (0),
52
    m_duration (0)
52
{
53
{
53
}
54
}
54
55
 Lines 65-74    Link Here 
65
  m_noOfMpdus = noofmpdus;
66
  m_noOfMpdus = noofmpdus;
66
}
67
}
67
68
69
void
70
AmpduTag::SetRemainingAmpduDurationNs (uint32_t durationNanoSeconds)
71
{
72
  NS_ASSERT (m_duration <= 10000000);
73
  m_duration = durationNanoSeconds;
74
}
75
68
uint32_t
76
uint32_t
69
AmpduTag::GetSerializedSize (void) const
77
AmpduTag::GetSerializedSize (void) const
70
{
78
{
71
  return 2;
79
  return 6;
72
}
80
}
73
81
74
void
82
void
 Lines 76-81    Link Here 
76
{
84
{
77
  i.WriteU8 (m_ampdu);
85
  i.WriteU8 (m_ampdu);
78
  i.WriteU8 (m_noOfMpdus);
86
  i.WriteU8 (m_noOfMpdus);
87
  i.WriteU32 (m_duration);
79
}
88
}
80
89
81
void
90
void
 Lines 83-88    Link Here 
83
{
92
{
84
  m_ampdu = i.ReadU8 ();
93
  m_ampdu = i.ReadU8 ();
85
  m_noOfMpdus = i.ReadU8 ();
94
  m_noOfMpdus = i.ReadU8 ();
95
  m_duration = i.ReadU32 ();
86
}
96
}
87
97
88
bool
98
bool
 Lines 97-102    Link Here 
97
  return m_noOfMpdus;
107
  return m_noOfMpdus;
98
}
108
}
99
109
110
uint32_t
111
AmpduTag::GetRemainingAmpduDurationNs () const
112
{
113
  return m_duration;
114
}
115
100
void
116
void
101
AmpduTag::Print (std::ostream &os) const
117
AmpduTag::Print (std::ostream &os) const
102
{
118
{
(-)a/src/wifi/model/ampdu-tag.h (-1 / +14 lines)
 Lines 53-58    Link Here 
53
   * Set the number of MPDUs in the A-MPDU.
53
   * Set the number of MPDUs in the A-MPDU.
54
   */
54
   */
55
  void SetNoOfMpdus (uint8_t noofmpdus);
55
  void SetNoOfMpdus (uint8_t noofmpdus);
56
  /**
57
   * \param durationNanoSeconds duration of the A-MPDU in nanoseconds
58
   *
59
   * Set the duration of the A-MPDU in nanoseconds.
60
   */
61
  void SetRemainingAmpduDurationNs (uint32_t durationNanoSeconds);
56
62
57
  virtual void Serialize (TagBuffer i) const;
63
  virtual void Serialize (TagBuffer i) const;
58
  virtual void Deserialize (TagBuffer i);
64
  virtual void Deserialize (TagBuffer i);
 Lines 72-81    Link Here 
72
   * Returns the number of MPDUs in an A-MPDU
78
   * Returns the number of MPDUs in an A-MPDU
73
   */
79
   */
74
  uint8_t GetNoOfMpdus (void) const;
80
  uint8_t GetNoOfMpdus (void) const;
81
  /**
82
   * \return the duration of an A-MPDU in nanoseconds
83
   *
84
   * Returns the duration of an A-MPDU in nanoseconds
85
   */
86
  uint32_t GetRemainingAmpduDurationNs (void) const;
75
87
76
private:
88
private:
77
  uint8_t m_ampdu;     //!< Flag whether it is an A-MPDU
89
  uint8_t m_ampdu;     //!< Flag whether it is an A-MPDU
78
  uint8_t m_noOfMpdus; //!< number of MPDUs in the A-MPDU
90
  uint8_t m_noOfMpdus; //!< Number of MPDUs in the A-MPDU
91
  uint32_t m_duration; //!< Remaining duration of the A-MPDU in nanoseconds
79
};
92
};
80
93
81
} //namespace ns3
94
} //namespace ns3
(-)a/src/wifi/model/mac-low.cc (-58 / +31 lines)
 Lines 368-374    Link Here 
368
    m_listener (0),
368
    m_listener (0),
369
    m_phyMacLowListener (0),
369
    m_phyMacLowListener (0),
370
    m_ctsToSelfSupported (false),
370
    m_ctsToSelfSupported (false),
371
    m_receivedAtLeastOneMpdu (false),
372
    m_nTxMpdus (0)
371
    m_nTxMpdus (0)
373
{
372
{
374
  NS_LOG_FUNCTION (this);
373
  NS_LOG_FUNCTION (this);
 Lines 534-540    Link Here 
534
MacLow::ResetPhy (void)
533
MacLow::ResetPhy (void)
535
{
534
{
536
  m_phy->SetReceiveOkCallback (MakeNullCallback<void, Ptr<Packet>, double, WifiTxVector, enum WifiPreamble> ());
535
  m_phy->SetReceiveOkCallback (MakeNullCallback<void, Ptr<Packet>, double, WifiTxVector, enum WifiPreamble> ());
537
  m_phy->SetReceiveErrorCallback (MakeNullCallback<void, Ptr<Packet>, double, bool> ());
536
  m_phy->SetReceiveErrorCallback (MakeNullCallback<void, Ptr<Packet>, double> ());
538
  RemovePhyMacLowListener (m_phy);
537
  RemovePhyMacLowListener (m_phy);
539
  m_phy = 0;
538
  m_phy = 0;
540
}
539
}
 Lines 839-877    Link Here 
839
}
838
}
840
839
841
void
840
void
842
MacLow::ReceiveError (Ptr<Packet> packet, double rxSnr, bool isEndOfFrame)
841
MacLow::ReceiveError (Ptr<Packet> packet, double rxSnr)
843
{
842
{
844
  NS_LOG_FUNCTION (this << packet << rxSnr << isEndOfFrame);
843
  NS_LOG_FUNCTION (this << packet << rxSnr);
845
  NS_LOG_DEBUG ("rx failed ");
844
  NS_LOG_DEBUG ("rx failed ");
846
  if (isEndOfFrame == true && m_receivedAtLeastOneMpdu == true)
847
    {
848
      WifiMacHeader hdr;
849
      AmpduTag ampdu;
850
      if (packet->RemovePacketTag (ampdu))
851
        {
852
          MpduAggregator::DeaggregatedMpdus mpdu = MpduAggregator::Deaggregate (packet);
853
          mpdu.begin ()->first->PeekHeader (hdr);
854
        }
855
      else
856
        {
857
          packet->PeekHeader (hdr);
858
        }
859
      if (hdr.GetAddr1 () != m_self)
860
        {
861
          NS_LOG_DEBUG ("hdr addr1 " << hdr.GetAddr1 () << "not for me (" << m_self << "); returning");
862
          return;
863
        }
864
      NS_ASSERT (m_lastReceivedHdr.IsQosData ());
865
      NS_LOG_DEBUG ("last a-mpdu subframe detected/sendImmediateBlockAck from=" << m_lastReceivedHdr.GetAddr2 ());
866
      m_sendAckEvent = Simulator::Schedule (GetSifs (),
867
                                            &MacLow::SendBlockAckAfterAmpdu, this,
868
                                            m_lastReceivedHdr.GetQosTid (),
869
                                            m_lastReceivedHdr.GetAddr2 (),
870
                                            m_lastReceivedHdr.GetDuration (),
871
                                            m_currentTxVector,
872
                                            rxSnr);
873
      m_receivedAtLeastOneMpdu = false;
874
    }
875
  if (m_txParams.MustWaitFastAck ())
845
  if (m_txParams.MustWaitFastAck ())
876
    {
846
    {
877
      NS_ASSERT (m_fastAckFailedTimeoutEvent.IsExpired ());
847
      NS_ASSERT (m_fastAckFailedTimeoutEvent.IsExpired ());
 Lines 1064-1070    Link Here 
1064
              NS_ASSERT (i != m_bAckCaches.end ());
1034
              NS_ASSERT (i != m_bAckCaches.end ());
1065
              (*i).second.UpdateWithBlockAckReq (blockAckReq.GetStartingSequence ());
1035
              (*i).second.UpdateWithBlockAckReq (blockAckReq.GetStartingSequence ());
1066
1036
1067
              NS_ASSERT (m_sendAckEvent.IsExpired ());
1037
              //NS_ASSERT (m_sendAckEvent.IsExpired ());
1038
              m_sendAckEvent.Cancel ();
1068
              /* See section 11.5.3 in IEEE 802.11 for mean of this timer */
1039
              /* See section 11.5.3 in IEEE 802.11 for mean of this timer */
1069
              ResetBlockAckInactivityTimerIfNeeded (it->second.first);
1040
              ResetBlockAckInactivityTimerIfNeeded (it->second.first);
1070
              if ((*it).second.first.IsImmediateBlockAck ())
1041
              if ((*it).second.first.IsImmediateBlockAck ())
 Lines 1082-1088    Link Here 
1082
                {
1053
                {
1083
                  NS_FATAL_ERROR ("Delayed block ack not supported.");
1054
                  NS_FATAL_ERROR ("Delayed block ack not supported.");
1084
                }
1055
                }
1085
              m_receivedAtLeastOneMpdu = false;
1086
            }
1056
            }
1087
          else
1057
          else
1088
            {
1058
            {
 Lines 1097-1103    Link Here 
1097
  else if (hdr.IsCtl ())
1067
  else if (hdr.IsCtl ())
1098
    {
1068
    {
1099
      NS_LOG_DEBUG ("rx drop " << hdr.GetTypeString ());
1069
      NS_LOG_DEBUG ("rx drop " << hdr.GetTypeString ());
1100
      m_receivedAtLeastOneMpdu = false;
1101
    }
1070
    }
1102
  else if (hdr.GetAddr1 () == m_self)
1071
  else if (hdr.GetAddr1 () == m_self)
1103
    {
1072
    {
 Lines 1125-1131    Link Here 
1125
                                                    hdr.GetDuration (),
1094
                                                    hdr.GetDuration (),
1126
                                                    txVector.GetMode (),
1095
                                                    txVector.GetMode (),
1127
                                                    rxSnr);
1096
                                                    rxSnr);
1128
              m_receivedAtLeastOneMpdu = false;
1129
            }
1097
            }
1130
          else if (hdr.IsQosBlockAck ())
1098
          else if (hdr.IsQosBlockAck ())
1131
            {
1099
            {
 Lines 1176-1182    Link Here 
1176
                                                    hdr.GetDuration (),
1144
                                                    hdr.GetDuration (),
1177
                                                    txVector.GetMode (),
1145
                                                    txVector.GetMode (),
1178
                                                    rxSnr);
1146
                                                    rxSnr);
1179
              m_receivedAtLeastOneMpdu = false;
1180
            }
1147
            }
1181
        }
1148
        }
1182
      goto rxPacket;
1149
      goto rxPacket;
 Lines 1192-1198    Link Here 
1192
          if (hdr.IsData () || hdr.IsMgt ())
1159
          if (hdr.IsData () || hdr.IsMgt ())
1193
            {
1160
            {
1194
              NS_LOG_DEBUG ("rx group from=" << hdr.GetAddr2 ());
1161
              NS_LOG_DEBUG ("rx group from=" << hdr.GetAddr2 ());
1195
              m_receivedAtLeastOneMpdu = false;
1196
              goto rxPacket;
1162
              goto rxPacket;
1197
            }
1163
            }
1198
          else
1164
          else
 Lines 1677-1682    Link Here 
1677
      AmpduTag ampdutag;
1643
      AmpduTag ampdutag;
1678
      ampdutag.SetAmpdu (true);
1644
      ampdutag.SetAmpdu (true);
1679
      Time delay = Seconds (0);
1645
      Time delay = Seconds (0);
1646
      Time remainingAmpduDuration = m_phy->CalculateTxDuration (packet->GetSize (), txVector, preamble, m_phy->GetFrequency ());
1680
      if (queueSize > 1 || vhtSingleMpdu)
1647
      if (queueSize > 1 || vhtSingleMpdu)
1681
        {
1648
        {
1682
          txVector.SetAggregation (true);
1649
          txVector.SetAggregation (true);
 Lines 1695-1704    Link Here 
1695
            }
1662
            }
1696
1663
1697
          listenerIt->second->GetMpduAggregator ()->AddHeaderAndPad (newPacket, last, vhtSingleMpdu);
1664
          listenerIt->second->GetMpduAggregator ()->AddHeaderAndPad (newPacket, last, vhtSingleMpdu);
1698
1665
          
1699
          ampdutag.SetNoOfMpdus (queueSize);
1700
          newPacket->AddPacketTag (ampdutag);
1701
1702
          if (delay == Seconds (0))
1666
          if (delay == Seconds (0))
1703
            {
1667
            {
1704
              if (!vhtSingleMpdu)
1668
              if (!vhtSingleMpdu)
 Lines 1710-1715    Link Here 
1710
                {
1674
                {
1711
                  mpdutype = NORMAL_MPDU;
1675
                  mpdutype = NORMAL_MPDU;
1712
                }
1676
                }
1677
            }
1678
          
1679
          Time mpduDuration = m_phy->CalculateTxDuration (newPacket->GetSize (), txVector, preamble, m_phy->GetFrequency (), mpdutype, 0);
1680
          remainingAmpduDuration -= mpduDuration;
1681
1682
          ampdutag.SetNoOfMpdus (queueSize);
1683
          ampdutag.SetRemainingAmpduDurationNs (remainingAmpduDuration.GetNanoSeconds());
1684
          newPacket->AddPacketTag (ampdutag);
1685
1686
          if (delay == Seconds (0))
1687
            {
1713
              m_phy->SendPacket (newPacket, txVector, preamble, mpdutype);
1688
              m_phy->SendPacket (newPacket, txVector, preamble, mpdutype);
1714
            }
1689
            }
1715
          else
1690
          else
 Lines 1718-1725    Link Here 
1718
            }
1693
            }
1719
          if (queueSize > 1)
1694
          if (queueSize > 1)
1720
            {
1695
            {
1721
              delay = delay + m_phy->CalculateTxDuration (GetSize (newPacket, &newHdr), txVector, preamble, m_phy->GetFrequency (), mpdutype, 0);
1696
              delay = delay + mpduDuration;
1722
            }
1697
            }
1698
1723
          preamble = WIFI_PREAMBLE_NONE;
1699
          preamble = WIFI_PREAMBLE_NONE;
1724
        }
1700
        }
1725
    }
1701
    }
 Lines 2813-2819    Link Here 
2813
  if (aggregatedPacket->RemovePacketTag (ampdu))
2789
  if (aggregatedPacket->RemovePacketTag (ampdu))
2814
    {
2790
    {
2815
      ampduSubframe = true;
2791
      ampduSubframe = true;
2816
      m_currentTxVector = txVector;
2817
      MpduAggregator::DeaggregatedMpdus packets = MpduAggregator::Deaggregate (aggregatedPacket);
2792
      MpduAggregator::DeaggregatedMpdus packets = MpduAggregator::Deaggregate (aggregatedPacket);
2818
      MpduAggregator::DeaggregatedMpdusCI n = packets.begin ();
2793
      MpduAggregator::DeaggregatedMpdusCI n = packets.begin ();
2819
2794
 Lines 2829-2841    Link Here 
2829
          NS_LOG_DEBUG ("Receive VHT single MPDU");
2804
          NS_LOG_DEBUG ("Receive VHT single MPDU");
2830
          ampduSubframe = false;
2805
          ampduSubframe = false;
2831
        }
2806
        }
2807
      else if (preamble != WIFI_PREAMBLE_NONE || !m_sendAckEvent.IsRunning ())
2808
        {
2809
          m_sendAckEvent = Simulator::Schedule (NanoSeconds (ampdu.GetRemainingAmpduDurationNs ()) + GetSifs (),
2810
                                                &MacLow::SendBlockAckAfterAmpdu, this,
2811
                                                firsthdr.GetQosTid (),
2812
                                                firsthdr.GetAddr2 (),
2813
                                                firsthdr.GetDuration (),
2814
                                                txVector,
2815
                                                rxSnr);
2816
        }
2832
2817
2833
      if (firsthdr.GetAddr1 () == m_self)
2818
      if (firsthdr.GetAddr1 () == m_self)
2834
        {
2819
        {
2835
          if (!vhtSingleMpdu)
2836
            {
2837
              m_receivedAtLeastOneMpdu = true;
2838
            }
2839
          if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ())
2820
          if (firsthdr.IsAck () || firsthdr.IsBlockAck () || firsthdr.IsBlockAckReq ())
2840
            {
2821
            {
2841
              ReceiveOk ((*n).first, rxSnr, txVector, preamble, ampduSubframe);
2822
              ReceiveOk ((*n).first, rxSnr, txVector, preamble, ampduSubframe);
 Lines 2869-2892    Link Here 
2869
              AgreementsI it = m_bAckAgreements.find (std::make_pair (firsthdr.GetAddr2 (), tid));
2850
              AgreementsI it = m_bAckAgreements.find (std::make_pair (firsthdr.GetAddr2 (), tid));
2870
              if (it != m_bAckAgreements.end ())
2851
              if (it != m_bAckAgreements.end ())
2871
                {
2852
                {
2872
                  NS_ASSERT (m_sendAckEvent.IsExpired ());
2873
                  /* See section 11.5.3 in IEEE 802.11 for mean of this timer */
2853
                  /* See section 11.5.3 in IEEE 802.11 for mean of this timer */
2874
                  ResetBlockAckInactivityTimerIfNeeded (it->second.first);
2854
                  ResetBlockAckInactivityTimerIfNeeded (it->second.first);
2875
                  NS_LOG_DEBUG ("rx A-MPDU/sendImmediateBlockAck from=" << firsthdr.GetAddr2 ());
2855
                  NS_LOG_DEBUG ("rx A-MPDU/sendImmediateBlockAck from=" << firsthdr.GetAddr2 ());
2876
                  m_sendAckEvent = Simulator::Schedule (GetSifs (),
2856
                  NS_ASSERT (m_sendAckEvent.IsRunning ());
2877
                                                        &MacLow::SendBlockAckAfterAmpdu, this,
2878
                                                        firsthdr.GetQosTid (),
2879
                                                        firsthdr.GetAddr2 (),
2880
                                                        firsthdr.GetDuration (),
2881
                                                        txVector,
2882
                                                        rxSnr);
2883
                }
2857
                }
2884
              else
2858
              else
2885
                {
2859
                {
2886
                  NS_LOG_DEBUG ("There's not a valid agreement for this block ack request.");
2860
                  NS_LOG_DEBUG ("There's not a valid agreement for this block ack request.");
2887
                }
2861
                }
2888
            }
2862
            }
2889
          m_receivedAtLeastOneMpdu = false;
2890
        }
2863
        }
2891
    }
2864
    }
2892
  else
2865
  else
(-)a/src/wifi/model/mac-low.h (-2 / +1 lines)
 Lines 736-742    Link Here 
736
   * This method is typically invoked by the lower PHY layer to notify
736
   * This method is typically invoked by the lower PHY layer to notify
737
   * the MAC layer that a packet was unsuccessfully received.
737
   * the MAC layer that a packet was unsuccessfully received.
738
   */
738
   */
739
  void ReceiveError (Ptr<Packet> packet, double rxSnr, bool isEndOfFrame);
739
  void ReceiveError (Ptr<Packet> packet, double rxSnr);
740
  /**
740
  /**
741
   * \param duration switching delay duration.
741
   * \param duration switching delay duration.
742
   *
742
   *
 Lines 1378-1384    Link Here 
1378
  uint8_t m_sentMpdus;                //!< Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet
1378
  uint8_t m_sentMpdus;                //!< Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet
1379
  Ptr<WifiMacQueue> m_aggregateQueue; //!< Queue used for MPDU aggregation
1379
  Ptr<WifiMacQueue> m_aggregateQueue; //!< Queue used for MPDU aggregation
1380
  WifiTxVector m_currentTxVector;     //!< TXVECTOR used for the current packet transmission
1380
  WifiTxVector m_currentTxVector;     //!< TXVECTOR used for the current packet transmission
1381
  bool m_receivedAtLeastOneMpdu;      //!< Flag whether an MPDU has already been successfully received while receiving an A-MPDU
1382
  std::vector<Item> m_txPackets;      //!< Contain temporary items to be sent with the next A-MPDU transmission, once RTS/CTS exchange has succeeded. It is not used in other cases.
1381
  std::vector<Item> m_txPackets;      //!< Contain temporary items to be sent with the next A-MPDU transmission, once RTS/CTS exchange has succeeded. It is not used in other cases.
1383
  uint32_t m_nTxMpdus;                //!<Holds the number of transmitted MPDUs in the last A-MPDU transmission
1382
  uint32_t m_nTxMpdus;                //!<Holds the number of transmitted MPDUs in the last A-MPDU transmission
1384
};
1383
};
(-)a/src/wifi/model/wifi-phy-state-helper.cc (-2 / +2 lines)
 Lines 442-455    Link Here 
442
}
442
}
443
443
444
void
444
void
445
WifiPhyStateHelper::SwitchFromRxEndError (Ptr<Packet> packet, double snr, bool isEndOfFrame)
445
WifiPhyStateHelper::SwitchFromRxEndError (Ptr<Packet> packet, double snr)
446
{
446
{
447
  m_rxErrorTrace (packet, snr);
447
  m_rxErrorTrace (packet, snr);
448
  NotifyRxEndError ();
448
  NotifyRxEndError ();
449
  DoSwitchFromRx ();
449
  DoSwitchFromRx ();
450
  if (!m_rxErrorCallback.IsNull ())
450
  if (!m_rxErrorCallback.IsNull ())
451
    {
451
    {
452
      m_rxErrorCallback (packet, snr, isEndOfFrame);
452
      m_rxErrorCallback (packet, snr);
453
    }
453
    }
454
}
454
}
455
455
(-)a/src/wifi/model/wifi-phy-state-helper.h (-4 / +2 lines)
 Lines 167-175    Link Here 
167
   *
167
   *
168
   * \param packet the packet that we failed to received
168
   * \param packet the packet that we failed to received
169
   * \param snr the SNR of the received packet
169
   * \param snr the SNR of the received packet
170
   * \param isEndOfFrame PHY-RXEND indication.
171
   */
170
   */
172
  void SwitchFromRxEndError (Ptr<Packet> packet, double snr, bool isEndOfFrame);
171
  void SwitchFromRxEndError (Ptr<Packet> packet, double snr);
173
  /**
172
  /**
174
   * Switch to CCA busy.
173
   * Switch to CCA busy.
175
   *
174
   *
 Lines 217-226    Link Here 
217
   *
216
   *
218
   * \param [in] packet       The received packet.
217
   * \param [in] packet       The received packet.
219
   * \param [in] snr          The SNR of the received packet.
218
   * \param [in] snr          The SNR of the received packet.
220
   * \param [in] isEndOfFrame PHY-RXEND indication..
221
   */
219
   */
222
  typedef void (* RxEndErrorTracedCallback)
220
  typedef void (* RxEndErrorTracedCallback)
223
    (Ptr<const Packet> packet, double snr, bool isEndOfFrame);
221
    (Ptr<const Packet> packet, double snr);
224
222
225
  /**
223
  /**
226
   * TracedCallback signature for transmit event.
224
   * TracedCallback signature for transmit event.
(-)a/src/wifi/model/wifi-phy.h (-2 / +1 lines)
 Lines 192-200    Link Here 
192
  /**
192
  /**
193
   * arg1: packet received unsuccessfully
193
   * arg1: packet received unsuccessfully
194
   * arg2: snr of packet
194
   * arg2: snr of packet
195
   * arg3: PHY-RXEND flag
196
   */
195
   */
197
  typedef Callback<void, Ptr<Packet>, double, bool> RxErrorCallback;
196
  typedef Callback<void, Ptr<Packet>, double> RxErrorCallback;
198
197
199
  static TypeId GetTypeId (void);
198
  static TypeId GetTypeId (void);
200
199
(-)a/src/wifi/model/yans-wifi-phy.cc (-4 / +2 lines)
 Lines 1239-1252    Link Here 
1239
        {
1239
        {
1240
          /* failure. */
1240
          /* failure. */
1241
          NotifyRxDrop (packet);
1241
          NotifyRxDrop (packet);
1242
          bool isEndOfFrame = ((mpdutype == NORMAL_MPDU && preamble != WIFI_PREAMBLE_NONE) || (mpdutype == LAST_MPDU_IN_AGGREGATE && preamble == WIFI_PREAMBLE_NONE));
1242
          m_state->SwitchFromRxEndError (packet, snrPer.snr);
1243
          m_state->SwitchFromRxEndError (packet, snrPer.snr, isEndOfFrame);
1244
        }
1243
        }
1245
    }
1244
    }
1246
  else
1245
  else
1247
    {
1246
    {
1248
      bool isEndOfFrame = ((mpdutype == NORMAL_MPDU && preamble != WIFI_PREAMBLE_NONE) || (mpdutype == LAST_MPDU_IN_AGGREGATE && preamble == WIFI_PREAMBLE_NONE));
1247
      m_state->SwitchFromRxEndError (packet, snrPer.snr);
1249
      m_state->SwitchFromRxEndError (packet, snrPer.snr, isEndOfFrame);
1250
    }
1248
    }
1251
1249
1252
  if (preamble == WIFI_PREAMBLE_NONE && mpdutype == LAST_MPDU_IN_AGGREGATE)
1250
  if (preamble == WIFI_PREAMBLE_NONE && mpdutype == LAST_MPDU_IN_AGGREGATE)

Return to bug 2307