diff -r 283c83f1f7be examples/mpi/third-distributed.cc --- a/examples/mpi/third-distributed.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/mpi/third-distributed.cc Mon May 17 16:35:46 2010 +0200 @@ -141,7 +141,7 @@ mac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); NetDeviceContainer apDevices; apDevices = wifi.Install (phy, mac, wifiApNode); diff -r 283c83f1f7be examples/tap/tap-wifi-dumbbell.cc --- a/examples/tap/tap-wifi-dumbbell.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/tap/tap-wifi-dumbbell.cc Mon May 17 16:35:46 2010 +0200 @@ -142,7 +142,7 @@ wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); NetDeviceContainer devicesLeft = wifi.Install (wifiPhy, wifiMac, nodesLeft.Get (0)); diff -r 283c83f1f7be examples/tutorial/third.cc --- a/examples/tutorial/third.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/tutorial/third.cc Mon May 17 16:35:46 2010 +0200 @@ -101,7 +101,7 @@ mac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); NetDeviceContainer apDevices; apDevices = wifi.Install (phy, mac, wifiApNode); diff -r 283c83f1f7be examples/wireless/mixed-wireless.cc --- a/examples/wireless/mixed-wireless.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/mixed-wireless.cc Mon May 17 16:35:46 2010 +0200 @@ -285,7 +285,7 @@ // setup ap. macInfra.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i)); // Collect all of these new devices NetDeviceContainer infraDevices (apDevices, staDevices); diff -r 283c83f1f7be examples/wireless/simple-wifi-frame-aggregation.cc --- a/examples/wireless/simple-wifi-frame-aggregation.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/simple-wifi-frame-aggregation.cc Mon May 17 16:35:46 2010 +0200 @@ -80,7 +80,7 @@ mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); mac.SetMsduAggregatorForAc (AC_BE, "ns3::MsduStandardAggregator", "MaxAmsduSize", UintegerValue (7935)); diff -r 283c83f1f7be examples/wireless/wifi-ap.cc --- a/examples/wireless/wifi-ap.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/wifi-ap.cc Mon May 17 16:35:46 2010 +0200 @@ -157,7 +157,7 @@ // setup ap. wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); wifi.Install (wifiPhy, wifiMac, ap); // mobility. diff -r 283c83f1f7be examples/wireless/wifi-blockack.cc --- a/examples/wireless/wifi-blockack.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/wifi-blockack.cc Mon May 17 16:35:46 2010 +0200 @@ -78,7 +78,7 @@ NetDeviceContainer staDevice = wifi.Install (phy, mac, sta); mac.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); mac.SetBlockAckThresholdForAc (AC_BE, 0); NetDeviceContainer apDevice = wifi.Install (phy, mac, ap); diff -r 283c83f1f7be examples/wireless/wifi-simple-infra.cc --- a/examples/wireless/wifi-simple-infra.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/wifi-simple-infra.cc Mon May 17 16:35:46 2010 +0200 @@ -162,7 +162,7 @@ // setup ap. wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); NetDeviceContainer apDevice = wifi.Install (wifiPhy, wifiMac, c.Get(1)); devices.Add (apDevice); diff -r 283c83f1f7be examples/wireless/wifi-wired-bridging.cc --- a/examples/wireless/wifi-wired-bridging.cc Sun May 16 15:24:53 2010 -0700 +++ b/examples/wireless/wifi-wired-bridging.cc Mon May 17 16:35:46 2010 +0200 @@ -127,7 +127,7 @@ wifiMac.SetType ("ns3::NqapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true), - "BeaconInterval", TimeValue (Seconds (2.5))); + "BeaconInterval", TimeValue (MicroSeconds (102400))); apDev = wifi.Install (wifiPhy, wifiMac, backboneNodes.Get (i)); NetDeviceContainer bridgeDev; diff -r 283c83f1f7be src/devices/wifi/nqap-wifi-mac.cc --- a/src/devices/wifi/nqap-wifi-mac.cc Sun May 16 15:24:53 2010 -0700 +++ b/src/devices/wifi/nqap-wifi-mac.cc Mon May 17 16:35:46 2010 +0200 @@ -50,7 +50,7 @@ .SetParent () .AddConstructor () .AddAttribute ("BeaconInterval", "Delay between two beacons", - TimeValue (Seconds (0.1)), + TimeValue (MicroSeconds (102400)), MakeTimeAccessor (&NqapWifiMac::GetBeaconInterval, &NqapWifiMac::SetBeaconInterval), MakeTimeChecker ()) @@ -280,6 +280,10 @@ NqapWifiMac::SetBeaconInterval (Time interval) { NS_LOG_FUNCTION (this << interval); + if ((interval.GetMicroSeconds () % 1024) != 0) + { + NS_LOG_WARN ("beacon interval should be multiple of 1024us, see IEEE Std. 802.11-2007, section 11.1.1.1"); + } m_beaconInterval = interval; } void diff -r 283c83f1f7be src/devices/wifi/qap-wifi-mac.cc --- a/src/devices/wifi/qap-wifi-mac.cc Sun May 16 15:24:53 2010 -0700 +++ b/src/devices/wifi/qap-wifi-mac.cc Mon May 17 16:35:46 2010 +0200 @@ -52,7 +52,7 @@ .SetParent () .AddConstructor () .AddAttribute ("BeaconInterval", "Delay between two beacons", - TimeValue (Seconds (0.1)), + TimeValue (MicroSeconds (102400)), MakeTimeAccessor (&QapWifiMac::GetBeaconInterval, &QapWifiMac::SetBeaconInterval), MakeTimeChecker ()) @@ -352,6 +352,10 @@ QapWifiMac::SetBeaconInterval (Time interval) { NS_LOG_FUNCTION (this << interval); + if ((interval.GetMicroSeconds () % 1024) != 0) + { + NS_LOG_WARN ("beacon interval should be multiple of 1024us, see IEEE Std. 802.11-2007, section 11.1.1.1"); + } m_beaconInterval = interval; }