From b809739d8c9752d033d19b09d3f6e39e28fcc7f6 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 19 Nov 2007 14:22:45 +0100 Subject: [PATCH] avoid decrementing by too many backoff slots --- src/devices/wifi/dcf-manager.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/devices/wifi/dcf-manager.cc b/src/devices/wifi/dcf-manager.cc index 6bc67e96d..760fed8ed 100644 --- a/src/devices/wifi/dcf-manager.cc +++ b/src/devices/wifi/dcf-manager.cc @@ -57,8 +57,7 @@ DcfState::UpdateFailedCw (void) void DcfState::UpdateBackoffSlotsNow (uint32_t nSlots, Time backoffUpdateBound) { - uint32_t n = std::min (nSlots, m_backoffSlots); - m_backoffSlots -= n; + m_backoffSlots -= nSlots; m_backoffStart = backoffUpdateBound; MY_DEBUG ("update slots="<