diff -r 2f8e35b43d11 -r 17a71cd49da3 src/wifi/model/wifi-mac.cc --- a/src/wifi/model/wifi-mac.cc Tue Aug 13 10:37:49 2013 -0700 +++ b/src/wifi/model/wifi-mac.cc Tue Aug 13 22:05:25 2013 -0700 @@ -44,6 +44,12 @@ // 802.11-a specific return MicroSeconds (16); } +Time +WifiMac::GetDefaultRifs (void) +{ + //802.11n specific + return MicroSeconds (2); +} Time WifiMac::GetDefaultEifsNoDifs (void) { @@ -78,8 +84,9 @@ Time WifiMac::GetDefaultCompressedBlockAckDelay (void) { - // This value must be rivisited - return MicroSeconds (68); + // This value must be rivisited was 68. + //CompressedBlockAckSize 32* 8*time it takes to transfer at the lowest rate (6Mb/s)+ aPhy-StartDelay(33) + return MicroSeconds (76); } Time WifiMac::GetDefaultBasicBlockAckTimeout (void) @@ -171,6 +178,12 @@ MakeTimeAccessor (&WifiMac::SetPifs, &WifiMac::GetPifs), MakeTimeChecker ()) +.AddAttribute ("Rifs", "The value of the RIFS constant.", + TimeValue (GetDefaultRifs ()), + MakeTimeAccessor (&WifiMac::SetRifs, + &WifiMac::GetRifs), + MakeTimeChecker ()) + .AddAttribute ("MaxPropagationDelay", "The maximum propagation delay. Unused for now.", TimeValue (GetDefaultMaxPropagationDelay ()), MakeTimeAccessor (&WifiMac::m_maxPropagationDelay), @@ -286,6 +299,12 @@ case WIFI_PHY_STANDARD_80211p_SCH: Configure80211p_SCH (); break; + case WIFI_PHY_STANDARD_80211n_2_4GHZ: + Configure80211n_2_4Ghz (); + break; + case WIFI_PHY_STANDARD_80211n_5GHZ: + Configure80211n_5Ghz (); + break; default: NS_ASSERT (false); break; @@ -360,6 +379,22 @@ { Configure80211_10Mhz (); } +void +WifiMac::Configure80211n_2_4Ghz (void) +{ + Configure80211g (); + SetRifs(MicroSeconds (2)); + SetCtsTimeout (MicroSeconds (10 + 52 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (10 + 52 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); +} +void +WifiMac::Configure80211n_5Ghz (void) +{ + Configure80211a (); + SetRifs(MicroSeconds (2)); + SetCtsTimeout (MicroSeconds (10 + 52 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (10 + 52 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); +} void WifiMac::ConfigureDcf (Ptr dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac)