fixed ActiveProbing for StaWifiMac (bug 1060)
authorNicola Baldo <nicola@baldo.biz>
Sun, 03 Apr 2011 19:55:26 +0200
changeset 6993 9f51576c4d7b
parent 6992 5b28d168b9e6
child 6994 4ab8b23631fd
fixed ActiveProbing for StaWifiMac (bug 1060)
src/wifi/model/sta-wifi-mac.cc
--- a/src/wifi/model/sta-wifi-mac.cc	Sun Apr 03 17:39:30 2011 +0100
+++ b/src/wifi/model/sta-wifi-mac.cc	Sun Apr 03 19:55:26 2011 +0200
@@ -81,7 +81,7 @@
                    UintegerValue (10),
                    MakeUintegerAccessor (&StaWifiMac::m_maxMissedBeacons),
                    MakeUintegerChecker<uint32_t> ())
-    .AddAttribute ("ActiveProbing", "If true, we send probe requests. If false, we don't.",
+    .AddAttribute ("ActiveProbing", "If true, we send probe requests. If false, we don't. NOTE: if more than one STA in your simulation is using active probing, you should enable it at a different simulation time for each STA, otherwise all the STAs will start sending probes at the same time resulting in collisions. See bug 1060 for more info.",
                    BooleanValue (false),
                    MakeBooleanAccessor (&StaWifiMac::SetActiveProbing),
                    MakeBooleanChecker ())
@@ -145,7 +145,7 @@
   NS_LOG_FUNCTION (this << enable);
   if (enable)
     {
-      TryToEnsureAssociated ();
+      Simulator::ScheduleNow (&StaWifiMac::TryToEnsureAssociated, this);
     }
   else
     {