diff --git a/src/wifi/model/regular-wifi-mac.cc b/src/wifi/model/regular-wifi-mac.cc index 610d5eedb..8aca1697a 100644 --- a/src/wifi/model/regular-wifi-mac.cc +++ b/src/wifi/model/regular-wifi-mac.cc @@ -114,23 +114,24 @@ RegularWifiMac::DoDispose () } void -RegularWifiMac::SetupFrameExchangeManager (void) +RegularWifiMac::SetupFrameExchangeManager (WifiStandard standard) { NS_LOG_FUNCTION (this); + NS_ABORT_MSG_IF (standard == WIFI_STANDARD_UNSPECIFIED, "Wifi standard not set"); - if (GetHeSupported ()) + if (standard >= WIFI_STANDARD_80211ax_2_4GHZ) { m_feManager = CreateObject (); } - else if (GetVhtSupported ()) + else if (standard >= WIFI_STANDARD_80211ac) { m_feManager = CreateObject (); } - else if (GetHtSupported ()) + else if (standard >= WIFI_STANDARD_80211n_2_4GHZ) { m_feManager = CreateObject (); } - else if (GetQosSupported ()) + else if (m_qosSupported) { m_feManager = CreateObject (); } @@ -1177,7 +1178,7 @@ RegularWifiMac::ConfigureStandard (WifiStandard standard) NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()"); } - SetupFrameExchangeManager (); + SetupFrameExchangeManager (standard); ConfigureContentionWindow (cwmin, cwmax); } diff --git a/src/wifi/model/regular-wifi-mac.h b/src/wifi/model/regular-wifi-mac.h index 7dc0da30e..7258581c0 100644 --- a/src/wifi/model/regular-wifi-mac.h +++ b/src/wifi/model/regular-wifi-mac.h @@ -318,8 +318,10 @@ protected: /** * Create a Frame Exchange Manager depending on the supported version * of the standard. + * + * \param standard the supported version of the standard */ - void SetupFrameExchangeManager (void); + void SetupFrameExchangeManager (WifiStandard standard); /** * Enable or disable ERP support for the device.