merge
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Fri, 17 Apr 2009 12:44:34 +0100
changeset 4349 a30d9fc6f1ea
parent 4348 0572c4011b3d (current diff)
parent 4347 0b349dad4332 (diff)
child 4352 6095f91e6a64
child 4354 ded7c46b986b
merge
--- a/src/devices/wifi/cara-wifi-manager.cc	Fri Apr 17 12:44:11 2009 +0100
+++ b/src/devices/wifi/cara-wifi-manager.cc	Fri Apr 17 12:44:34 2009 +0100
@@ -66,11 +66,13 @@
 void 
 CaraWifiRemoteStation::DoReportDataFailed (void)
 {
+  NS_LOG_FUNCTION (this);
   m_timer++;
   m_failed++;
   m_success = 0;
   if (NeedNormalFallback ()) 
     {
+      NS_LOG_DEBUG ("self="<<this<<" dec rate");
       if (m_rate != GetMinRate ())
         {
           m_rate--;
@@ -97,11 +99,11 @@
   if ((m_success == m_manager->m_successThreshold ||
        m_timer >= m_manager->m_timerTimeout))
     {
-      NS_LOG_DEBUG ("self="<<this<<" inc rate");
       if (m_rate < GetMaxRate ())
         {
           m_rate++;
         }
+      NS_LOG_DEBUG ("self="<<this<<" inc rate=" << m_rate);
       m_timer = 0;
       m_success = 0;
     }
@@ -165,7 +167,7 @@
    .AddAttribute ("SuccessThreshold",
                   "The minimum number of sucessfull transmissions to try a new rate.",
                   UintegerValue (10),
-                  MakeUintegerAccessor (&CaraWifiManager::m_failureThreshold),
+                  MakeUintegerAccessor (&CaraWifiManager::m_successThreshold),
                   MakeUintegerChecker<uint32_t> ())
    .AddAttribute ("Timeout",
                   "The 'timer' in the CARA algorithm",