diff --git a/src/wifi/model/supported-rates.cc b/src/wifi/model/supported-rates.cc index 61d1efa17..5d00e43cb 100644 --- a/src/wifi/model/supported-rates.cc +++ b/src/wifi/model/supported-rates.cc @@ -61,37 +61,13 @@ SupportedRates::AddSupportedRate (uint32_t bs) NS_LOG_FUNCTION (this << bs); NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate"); NS_ASSERT (m_nRates < MAX_SUPPORTED_RATES); - if (bs == BSS_MEMBERSHIP_SELECTOR_HT_PHY) + if (IsSupportedRate (bs)) { - // Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012 - m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_HT_PHY | 0x80); - m_nRates++; - NS_LOG_DEBUG ("add HT_PHY membership selector"); - } - else if (bs == BSS_MEMBERSHIP_SELECTOR_VHT_PHY) - { - // Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012 - m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_VHT_PHY | 0x80); - m_nRates++; - NS_LOG_DEBUG ("add VHT_PHY membership selector"); - } - else if (bs == BSS_MEMBERSHIP_SELECTOR_HE_PHY) - { - // Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012 - m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_HE_PHY | 0x80); - m_nRates++; - NS_LOG_DEBUG ("add HE_PHY membership selector"); - } - else - { - if (IsSupportedRate (bs)) - { - return; - } - m_rates[m_nRates] = bs / 500000; - m_nRates++; - NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << +m_nRates); + return; } + m_rates[m_nRates] = bs / 500000; + m_nRates++; + NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << +m_nRates); } void