From ff13bd5872f0bf14f887df033471d922310de653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 8 Feb 2016 22:53:58 +0100 Subject: [PATCH] wifi: DCF manager should not reset CW when CWmin or CWmax is unchanged --- src/wifi/model/dcf-manager.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/dcf-manager.cc b/src/wifi/model/dcf-manager.cc index f77b625ae..b475027e8 100644 --- a/src/wifi/model/dcf-manager.cc +++ b/src/wifi/model/dcf-manager.cc @@ -61,15 +61,23 @@ DcfState::SetAifsn (uint32_t aifsn) void DcfState::SetCwMin (uint32_t minCw) { + bool changed = (m_cwMin == minCw); m_cwMin = minCw; - ResetCw (); + if (changed == true) + { + ResetCw (); + } } void DcfState::SetCwMax (uint32_t maxCw) { + bool changed = (m_cwMax == maxCw); m_cwMax = maxCw; - ResetCw (); + if (changed == true) + { + ResetCw (); + } } uint32_t