Bug 2034 - [lr-wpan] CSMA-CA BackoffPeriod is too short
authorTommaso Pecorella <tommaso.pecorella@unifi.it>
Sat, 02 May 2015 22:00:28 +0200
changeset 11345 9ae402a910f3
parent 11344 c0f16f16643d
child 11346 a8900f6fe42d
Bug 2034 - [lr-wpan] CSMA-CA BackoffPeriod is too short
RELEASE_NOTES
src/lr-wpan/model/lr-wpan-csmaca.cc
--- a/RELEASE_NOTES	Sat May 02 21:51:06 2015 +0200
+++ b/RELEASE_NOTES	Sat May 02 22:00:28 2015 +0200
@@ -35,6 +35,7 @@
 - Bug 1974 - CalculateTxTime should return a Time, not a double
 - Bug 1982 - AODV and mesh use random variables before seed can be set
 - Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
+- Bug 2034 - (lr-wpan) CSMA-CA BackoffPeriod is too short 
 - Bug 2070 - Wrong report of Packets and Bytes stored in CoDeL
 - Bug 2073 - NDisc cache entries update timer might be stuck in a loop
 - Bug 2076 - TCP MinRTO Attribute is not actually used
--- a/src/lr-wpan/model/lr-wpan-csmaca.cc	Sat May 02 21:51:06 2015 +0200
+++ b/src/lr-wpan/model/lr-wpan-csmaca.cc	Sat May 02 22:00:28 2015 +0200
@@ -240,7 +240,7 @@
 
 
   symbolRate = (uint64_t) m_mac->GetPhy ()->GetDataOrSymbolRate (isData); //symbols per second
-  backoffPeriod = (uint64_t)m_random->GetValue (0, upperBound); //num backoff periods
+  backoffPeriod = (uint64_t)m_random->GetValue (0, upperBound+1); // num backoff periods
   randomBackoff = MicroSeconds (backoffPeriod * GetUnitBackoffPeriod () * 1000 * 1000 / symbolRate);
 
   if (IsUnSlottedCsmaCa ())