Index: src/wifi/model/supported-rates.cc |
=================================================================== |
--- a/src/wifi/model/supported-rates.cc |
+++ b/src/wifi/model/supported-rates.cc |
@@ -56,7 +56,7 @@ |
} |
void |
-SupportedRates::AddSupportedRate (uint32_t bs) |
+SupportedRates::AddSupportedRate (uint64_t bs) |
{ |
NS_LOG_FUNCTION (this << bs); |
NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate"); |
@@ -88,7 +88,7 @@ |
{ |
return; |
} |
- m_rates[m_nRates] = bs / 500000; |
+ m_rates[m_nRates] = static_cast<uint8_t>(bs / 500000); |
m_nRates++; |
NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << static_cast<uint16_t> (m_nRates)); |
} |
@@ -99,7 +99,7 @@ |
{ |
NS_LOG_FUNCTION (this << bs); |
NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate"); |
- uint8_t rate = bs / 500000; |
+ uint8_t rate = static_cast<uint8_t>(bs / 500000); |
for (uint8_t i = 0; i < m_nRates; i++) |
{ |
if ((rate | 0x80) == m_rates[i]) |
@@ -133,7 +133,7 @@ |
return; |
} |
} |
- m_rates[m_nRates] = rate; |
+ m_rates[m_nRates] = static_cast<uint8_t>(rate); |
NS_LOG_DEBUG ("add BSS membership selector rate " << bs << " as rate " << m_nRates); |
m_nRates++; |
} |
@@ -142,7 +142,7 @@ |
SupportedRates::IsBasicRate (uint32_t bs) const |
{ |
NS_LOG_FUNCTION (this << bs); |
- uint8_t rate = (bs / 500000) | 0x80; |
+ uint8_t rate = static_cast<uint8_t>(bs / 500000) | 0x80; |
for (uint8_t i = 0; i < m_nRates; i++) |
{ |
if (rate == m_rates[i]) |
@@ -154,10 +154,10 @@ |
} |
bool |
-SupportedRates::IsSupportedRate (uint32_t bs) const |
+SupportedRates::IsSupportedRate (uint64_t bs) const |
{ |
NS_LOG_FUNCTION (this << bs); |
- uint8_t rate = bs / 500000; |
+ uint8_t rate = static_cast<uint8_t>(bs / 500000); |
for (uint8_t i = 0; i < m_nRates; i++) |
{ |
if (rate == m_rates[i] |
@@ -170,7 +170,7 @@ |
} |
bool |
-SupportedRates::IsBssMembershipSelectorRate (uint32_t bs) const |
+SupportedRates::IsBssMembershipSelectorRate (uint64_t bs) const |
{ |
NS_LOG_FUNCTION (this << bs); |
if ((bs & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY |