author | Timo Bingmann <timo.bingmann@student.kit.edu> |
Tue, 24 Feb 2009 14:33:17 +0100 | |
changeset 4217 | 9494663cf1c9 |
parent 4216 | 621e2ef9e7b8 |
child 4238 | 4d3a27e39fa6 |
--- a/src/devices/wifi/dcf-manager.cc Tue Feb 24 10:27:08 2009 +0100 +++ b/src/devices/wifi/dcf-manager.cc Tue Feb 24 14:33:17 2009 +0100 @@ -74,10 +74,8 @@ void DcfState::UpdateFailedCw (void) { - uint32_t cw = m_cw; - cw *= 2; - cw = std::min (m_cwMax, cw); - m_cw = cw; + // see 802.11-2007, section 9.9.1.5 + m_cw = std::min ( 2 * (m_cw + 1) - 1, m_cwMax); } void DcfState::UpdateBackoffSlotsNow (uint32_t nSlots, Time backoffUpdateBound)