diff --git a/examples/wireless/mixed-wired-wireless.cc b/examples/wireless/mixed-wired-wireless.cc index ab07c87ca..eb4cdab9a 100644 --- a/examples/wireless/mixed-wired-wireless.cc +++ b/examples/wireless/mixed-wired-wireless.cc @@ -301,8 +301,7 @@ main (int argc, char *argv[]) NetDeviceContainer staDevices = wifiInfra.Install (wifiPhy, macInfra, stas); // setup ap. macInfra.SetType ("ns3::ApWifiMac", - "Ssid", SsidValue (ssid), - "BeaconInterval", TimeValue (Seconds (2.5))); + "Ssid", SsidValue (ssid)); NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i)); // Collect all of these new devices NetDeviceContainer infraDevices (apDevices, staDevices); diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index 8a4c89df3..64fc0d243 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -199,7 +199,11 @@ ApWifiMac::SetBeaconInterval (Time interval) NS_LOG_FUNCTION (this << interval); if ((interval.GetMicroSeconds () % 1024) != 0) { - NS_LOG_WARN ("beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012"); + NS_FATAL_ERROR ("beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012"); + } + if (interval.GetMicroSeconds () > (1024 * 65535)) + { + NS_FATAL_ERROR ("beacon interval should be smaller then or equal to 65535 * 1024us (802.11 time unit)"); } m_low->SetBeaconInterval (interval); }