src/wifi/model/regular-wifi-mac.cc
changeset 10139 17a71cd49da3
parent 9802 5dea58a3b261
child 10203 362fbb8ac702
--- a/src/wifi/model/regular-wifi-mac.cc	Tue Aug 13 10:37:49 2013 -0700
+++ b/src/wifi/model/regular-wifi-mac.cc	Tue Aug 13 22:05:25 2013 -0700
@@ -120,6 +120,7 @@
 {
   NS_LOG_FUNCTION (this << stationManager);
   m_stationManager = stationManager;
+  m_stationManager->SetHtSupported (GetHtSupported());
   m_low->SetWifiRemoteStationManager (stationManager);
 
   m_dca->SetWifiRemoteStationManager (stationManager);
@@ -244,6 +245,30 @@
 {
   return m_qosSupported;
 }
+void
+RegularWifiMac::SetHtSupported (bool enable)
+{
+  NS_LOG_FUNCTION (this);
+  m_htSupported = enable;
+}
+
+bool
+RegularWifiMac::GetHtSupported () const
+{
+  return m_htSupported;
+}
+void
+RegularWifiMac::SetCtsToSelfSupported(bool enable)
+{
+  NS_LOG_FUNCTION (this);
+  m_low->SetCtsToSelfSupported (enable);
+}
+
+bool
+RegularWifiMac::GetCtsToSelfSupported () const
+{
+   return  m_low->GetCtsToSelfSupported ();
+}
 
 void
 RegularWifiMac::SetSlot (Time slotTime)
@@ -285,6 +310,18 @@
 {
   return m_dcfManager->GetEifsNoDifs ();
 }
+void
+RegularWifiMac::SetRifs (Time rifs)
+{
+  NS_LOG_FUNCTION (this << rifs);
+  m_low->SetRifs (rifs);
+}
+
+Time
+RegularWifiMac::GetRifs (void) const
+{
+  return m_low->GetRifs();
+}
 
 void
 RegularWifiMac::SetPifs (Time pifs)
@@ -609,6 +646,18 @@
                    MakeBooleanAccessor (&RegularWifiMac::SetQosSupported,
                                         &RegularWifiMac::GetQosSupported),
                    MakeBooleanChecker ())
+    .AddAttribute ("HtSupported",
+                   "This Boolean attribute is set to enable 802.11n support at this STA",
+                   BooleanValue (false),
+                   MakeBooleanAccessor (&RegularWifiMac::SetHtSupported,
+                                        &RegularWifiMac::GetHtSupported),
+                   MakeBooleanChecker ())
+   .AddAttribute ("CtsToSelfSupported",
+                   "Use CTS to Self when using a rate that is not in the basic set rate",
+                   BooleanValue (false),
+                   MakeBooleanAccessor (&RegularWifiMac::SetCtsToSelfSupported,
+                                        &RegularWifiMac::GetCtsToSelfSupported),
+                    MakeBooleanChecker ())
     .AddAttribute ("DcaTxop", "The DcaTxop object",
                    PointerValue (),
                    MakePointerAccessor (&RegularWifiMac::GetDcaTxop),
@@ -663,6 +712,8 @@
     case WIFI_PHY_STANDARD_80211g:
     case WIFI_PHY_STANDARD_80211_10MHZ:
     case WIFI_PHY_STANDARD_80211_5MHZ:
+    case WIFI_PHY_STANDARD_80211n_5GHZ:
+    case WIFI_PHY_STANDARD_80211n_2_4GHZ:
       cwmin = 15;
       cwmax = 1023;
       break;