diff --git a/src/devices/wifi/supported-rates.cc b/src/devices/wifi/supported-rates.cc index c3a2b6193..16b2e59ad 100644 --- a/src/devices/wifi/supported-rates.cc +++ b/src/devices/wifi/supported-rates.cc @@ -20,6 +20,9 @@ #include "supported-rates.h" #include "ns3/assert.h" +#include "ns3/log.h" + +NS_LOG_COMPONENT_DEFINE ("SupportedRates"); #define ELEMENT_ID (1) @@ -33,8 +36,13 @@ void SupportedRates::AddSupportedRate (uint32_t bs) { NS_ASSERT (m_nRates < 8); + if (IsSupportedRate (bs)) + { + return; + } m_rates[m_nRates] = bs/500000; m_nRates++; + NS_LOG_DEBUG ("add rate="<