Index: src/wifi/model/sta-wifi-mac.cc |
=================================================================== |
--- a/src/wifi/model/sta-wifi-mac.cc |
+++ b/src/wifi/model/sta-wifi-mac.cc |
@@ -492,11 +492,11 @@ |
Time delay = MicroSeconds (beacon.GetBeaconIntervalUs () * m_maxMissedBeacons); |
RestartBeaconWatchdog (delay); |
SetBssid (hdr->GetAddr3 ()); |
- SupportedRates rates = beacon.GetSupportedRates (); |
+ rates = beacon.GetSupportedRates (); |
for (uint8_t i = 0; i < m_phy->GetNModes (); i++) |
{ |
WifiMode mode = m_phy->GetMode (i); |
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode); |
} |
@@ -506,7 +506,7 @@ |
{ |
ErpInformation erpInformation = beacon.GetErpInformation (); |
isShortPreambleEnabled &= !erpInformation.GetBarkerPreambleMode (); |
- if (erpInformation.GetUseProtection () == true) |
+ if (erpInformation.GetUseProtection () > 0) |
{ |
m_stationManager->SetUseNonErpProtection (true); |
} |
@@ -636,10 +636,10 @@ |
for (uint8_t i = 0; i < m_phy->GetNModes (); i++) |
{ |
WifiMode mode = m_phy->GetMode (i); |
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode); |
- if (rates.IsBasicRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (rates.IsBasicRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
m_stationManager->AddBasicMode (mode); |
} |
@@ -653,7 +653,7 @@ |
for (uint8_t i = 0; i < m_phy->GetNModes (); i++) |
{ |
WifiMode mode = m_phy->GetMode (i); |
- if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
isErpAllowed = true; |
break; |
@@ -719,7 +719,7 @@ |
for (uint8_t i = 0; i < m_phy->GetNModes (); i++) |
{ |
WifiMode mode = m_phy->GetMode (i); |
- if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
isErpAllowed = true; |
break; |
@@ -814,10 +814,10 @@ |
for (uint8_t i = 0; i < m_phy->GetNModes (); i++) |
{ |
WifiMode mode = m_phy->GetMode (i); |
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode); |
- if (rates.IsBasicRate (mode.GetDataRate (m_phy->GetChannelWidth ()))) |
+ if (rates.IsBasicRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ())))) |
{ |
m_stationManager->AddBasicMode (mode); |
} |
@@ -898,7 +898,7 @@ |
WifiMode mode = m_phy->GetMode (i); |
uint64_t modeDataRate = mode.GetDataRate (m_phy->GetChannelWidth ()); |
NS_LOG_DEBUG ("Adding supported rate of " << modeDataRate); |
- rates.AddSupportedRate (modeDataRate); |
+ rates.AddSupportedRate (static_cast<uint32_t>(modeDataRate)); |
} |
return rates; |
} |