Bug 853: Use consistent standards/rates for examples and tests that use Wi-Fi
authorDean Armstrong <deanarm@gmail.com>
Wed, 23 Jun 2010 09:01:30 +0100
changeset 6373 5467d6ae6ebe
parent 6372 0fafd9716f44
child 6374 787aef59db0b
Bug 853: Use consistent standards/rates for examples and tests that use Wi-Fi The change to consider mandatory rates for control responses if a suitable basic rate could not be found broke the tests involving the wireless/wifi-simple-adhoc-grid example, and the routing-olsr-regression testsuite. In these cases it is actually the tests that need updating; in the wifi-simple-adhoc-grid test and the bug780-test part of the routing-olsr-regression testsuite, 802.11b rates were being used with the Wi-Fi PHY standard left at the default of 802.11a. The fix here is to set the standard to 802.11b in the test. In the tx-regression-test part of routing-olsr-regression, the problem was that the reference traces needed to be updated given the control response rate fix. In this case I have also modified the test to set the standard to 802.11a for clarity.
examples/wireless/wifi-simple-adhoc-grid.cc
src/routing/olsr/test/bug780-0-0.pcap
src/routing/olsr/test/bug780-1-0.pcap
src/routing/olsr/test/bug780-test.cc
src/routing/olsr/test/tc-regression-test.cc
--- a/examples/wireless/wifi-simple-adhoc-grid.cc	Wed Jun 23 08:47:29 2010 +0100
+++ b/examples/wireless/wifi-simple-adhoc-grid.cc	Wed Jun 23 09:01:30 2010 +0100
@@ -169,6 +169,7 @@
 
   // Add a non-QoS upper mac, and disable rate control
   NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
+  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
   wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                                 "DataMode",StringValue(phyMode),
                                    "ControlMode",StringValue(phyMode));
Binary file src/routing/olsr/test/bug780-0-0.pcap has changed
Binary file src/routing/olsr/test/bug780-1-0.pcap has changed
--- a/src/routing/olsr/test/bug780-test.cc	Wed Jun 23 08:47:29 2010 +0100
+++ b/src/routing/olsr/test/bug780-test.cc	Wed Jun 23 09:01:30 2010 +0100
@@ -115,6 +115,7 @@
 
   // Add a non-QoS upper mac, and disable rate control
   NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
+  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
   wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
       "DataMode",StringValue(phyMode),
       "ControlMode",StringValue(phyMode));
--- a/src/routing/olsr/test/tc-regression-test.cc	Wed Jun 23 08:47:29 2010 +0100
+++ b/src/routing/olsr/test/tc-regression-test.cc	Wed Jun 23 09:01:30 2010 +0100
@@ -101,6 +101,7 @@
   YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
   wifiPhy.SetChannel (wifiChannel.Create ());
   WifiHelper wifi = WifiHelper::Default ();
+  wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
   wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200"));
   NetDeviceContainer nd = wifi.Install (wifiPhy, wifiMac, c);