Fixed Minstrel rate potential seg fault due to calling UpdateStats before being initialized

This commit is contained in:
Duy Nguyen
2009-09-21 23:44:59 -07:00
parent b803da1d39
commit d9f4c30720

View File

@@ -369,7 +369,6 @@ MinstrelWifiRemoteStation::GetManager (void) const
WifiMode
MinstrelWifiRemoteStation::DoGetDataMode (uint32_t size)
{
UpdateStats ();
if (!m_initialized)
{
CheckInit ();
@@ -377,6 +376,7 @@ MinstrelWifiRemoteStation::DoGetDataMode (uint32_t size)
/// start the rate at half way
m_txrate = GetNSupportedModes () / 2;
}
UpdateStats ();
return GetSupportedMode (m_txrate);
}
@@ -435,7 +435,7 @@ MinstrelWifiRemoteStation::FindRate ()
{
/// now go through the table and find an index rate
idx = GetNextSample ();
idx = GetNextSample();
/**