View | Details | Raw Unified | Return to bug 1722
Collapse All | Expand All

(-)a/src/wifi/model/ap-wifi-mac.cc (-1 / +3 lines)
 Lines 648-654    Link Here 
648
  m_beaconEvent.Cancel ();
648
  m_beaconEvent.Cancel ();
649
  if (m_enableBeaconGeneration)
649
  if (m_enableBeaconGeneration)
650
    {
650
    {
651
      m_beaconEvent = Simulator::ScheduleNow (&ApWifiMac::SendOneBeacon, this);
651
      m_beaconOffset = CreateObject<UniformRandomVariable> ();
652
      Time offset = MicroSeconds (m_beaconOffset->GetValue (1, m_beaconInterval.GetMicroSeconds ()));
653
      m_beaconEvent = Simulator::Schedule (offset, &ApWifiMac::SendOneBeacon, this);
652
    }
654
    }
653
  RegularWifiMac::DoInitialize ();
655
  RegularWifiMac::DoInitialize ();
654
}
656
}
(-)a/src/wifi/model/ap-wifi-mac.h (+2 lines)
 Lines 26-31    Link Here 
26
#include "ht-capabilities.h"
26
#include "ht-capabilities.h"
27
#include "amsdu-subframe-header.h"
27
#include "amsdu-subframe-header.h"
28
#include "supported-rates.h"
28
#include "supported-rates.h"
29
#include "ns3/random-variable-stream.h"
29
30
30
namespace ns3 {
31
namespace ns3 {
31
32
 Lines 128-133    Link Here 
128
  Time m_beaconInterval;
129
  Time m_beaconInterval;
129
  bool m_enableBeaconGeneration;
130
  bool m_enableBeaconGeneration;
130
  EventId m_beaconEvent;
131
  EventId m_beaconEvent;
132
  Ptr<UniformRandomVariable> m_beaconOffset;
131
};
133
};
132
134
133
} // namespace ns3
135
} // namespace ns3

Return to bug 1722