diff -r 9b43310e9840 src/devices/wifi/dca-txop.cc --- a/src/devices/wifi/dca-txop.cc Thu Oct 01 17:30:39 2009 +0400 +++ b/src/devices/wifi/dca-txop.cc Tue Oct 06 19:30:31 2009 +0400 @@ -118,6 +118,8 @@ m_queue = CreateObject (); m_rng = new RealRandomStream (); m_txMiddle = new MacTxMiddle (); + m_dcf->ResetCw (); + m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); } DcaTxop::~DcaTxop () @@ -190,6 +192,8 @@ { NS_LOG_FUNCTION (this << minCw); m_dcf->SetCwMin (minCw); + m_dcf->ResetCw (); + m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); } void DcaTxop::SetMaxCw (uint32_t maxCw)