--- a/src/devices/wifi/ideal-mac-stations.cc Tue Oct 09 16:11:37 2007 +0200
+++ b/src/devices/wifi/ideal-mac-stations.cc Tue Oct 09 16:15:38 2007 +0200
@@ -105,18 +105,19 @@
// highest snr threshold possible which is smaller than m_lastSnr
// to ensure correct packet delivery.
double maxThreshold = 0.0;
- WifiMode mode = m_stations->GetDefaultMode ();
+ WifiMode maxMode = m_stations->GetDefaultMode ();
for (uint32_t i = 0; i < GetNSupportedModes (); i++)
{
- double threshold = m_stations->GetSnrThreshold (GetSupportedMode (i));
+ WifiMode mode = GetSupportedMode (i);
+ double threshold = m_stations->GetSnrThreshold (mode);
if (threshold > maxThreshold &&
threshold < m_lastSnr)
{
maxThreshold = threshold;
- mode = GetSupportedMode (i);
+ maxMode = mode;
}
}
- return mode;
+ return maxMode;
}
WifiMode
IdealMacStation::GetRtsMode (void)
@@ -125,18 +126,19 @@
// snr threshold possible which is smaller than m_lastSnr to
// ensure correct packet delivery.
double maxThreshold = 0.0;
- WifiMode mode = m_stations->GetDefaultMode ();
- for (uint32_t i = 0; i < GetNBasicModes (); i++)
+ WifiMode maxMode = m_stations->GetDefaultMode ();
+ for (uint32_t i = 0; i < m_stations->GetNBasicModes (); i++)
{
- double threshold = m_stations->GetSnrThreshold (GetBasicMode (i));
+ WifiMode mode = m_stations->GetBasicMode (i);
+ double threshold = m_stations->GetSnrThreshold (mode);
if (threshold > maxThreshold &&
threshold < m_lastSnr)
{
maxThreshold = threshold;
- mode = GetBasicMode (i);
+ maxMode = mode;
}
}
- return mode;
+ return maxMode;
}
IdealMacStations *
IdealMacStation::GetStations (void) const
--- a/src/devices/wifi/mac-stations.h Tue Oct 09 16:11:37 2007 +0200
+++ b/src/devices/wifi/mac-stations.h Tue Oct 09 16:15:38 2007 +0200
@@ -111,9 +111,7 @@
virtual MacStations *GetStations (void) const = 0;
protected:
uint32_t GetNSupportedModes (void) const;
- uint32_t GetNBasicModes (void) const;
WifiMode GetSupportedMode (uint32_t i) const;
- WifiMode GetBasicMode (uint32_t i) const;
private:
bool IsIn (WifiMode mode) const;
WifiMode GetControlAnswerMode (WifiMode reqMode);