src/helper/wifi-helper.cc
changeset 4720 15221757964f
parent 4605 fd44ff061631
child 6049 3dbc035a9ee4
--- a/src/helper/wifi-helper.cc	Thu Aug 13 13:39:23 2009 +0200
+++ b/src/helper/wifi-helper.cc	Fri Aug 14 12:21:39 2009 +0200
@@ -46,6 +46,7 @@
 {}
 
 WifiHelper::WifiHelper ()
+  : m_standard (WIFI_PHY_STANDARD_80211a)
 {}
 
 WifiHelper
@@ -79,6 +80,12 @@
   m_stationManager.Set (n7, v7);
 }
 
+void 
+WifiHelper::SetStandard (enum WifiPhyStandard standard)
+{
+  m_standard = standard;
+}
+
 NetDeviceContainer 
 WifiHelper::Install (const WifiPhyHelper &phyHelper,
                      const WifiMacHelper &macHelper, NodeContainer c) const
@@ -92,6 +99,8 @@
       Ptr<WifiMac> mac = macHelper.Create ();
       Ptr<WifiPhy> phy = phyHelper.Create (node, device);
       mac->SetAddress (Mac48Address::Allocate ());
+      mac->ConfigureStandard (m_standard);
+      phy->ConfigureStandard (m_standard);
       device->SetMac (mac);
       device->SetPhy (phy);
       device->SetRemoteStationManager (manager);