diff -r 9677003feabc src/wifi/model/edca-txop-n.cc --- a/src/wifi/model/edca-txop-n.cc Sat Apr 30 16:51:45 2016 +0200 +++ b/src/wifi/model/edca-txop-n.cc Sat Apr 30 18:11:38 2016 +0200 @@ -625,6 +625,49 @@ void EdcaTxopN::NotifyInternalCollision (void) { NS_LOG_FUNCTION (this); + bool resetDcf = false; + bool needRts = m_stationManager->NeedRts (m_currentHdr.GetAddr1 (), + &m_currentHdr, + m_currentPacket, + m_low->GetDataTxVector (m_currentPacket, &m_currentHdr)); + if (needRts) + { + if (!NeedRtsRetransmission ()) + { + resetDcf = true; + m_stationManager->ReportFinalRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); + } + else + { + m_stationManager->ReportRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); + } + } + else + { + if (!NeedDataRetransmission ()) + { + resetDcf = true; + m_stationManager->ReportFinalDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); + } + else + { + m_stationManager->ReportDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); + } + } + if (resetDcf) + { + if (!m_txFailedCallback.IsNull ()) + { + m_txFailedCallback (m_currentHdr); + } + //to reset the dcf. + m_currentPacket = 0; + m_dcf->ResetCw (); + } + else + { + m_dcf->UpdateFailedCw (); + } NotifyCollision (); } diff -r 9677003feabc src/wifi/model/mac-low.h --- a/src/wifi/model/mac-low.h Sat Apr 30 16:51:45 2016 +0200 +++ b/src/wifi/model/mac-low.h Sat Apr 30 18:11:38 2016 +0200 @@ -823,7 +823,6 @@ */ void FlushAggregateQueue (void); -protected: /** * Return a TXVECTOR for the DATA frame given the destination. * The function consults WifiRemoteStationManager, which controls the rate