wifi: Fix some more uint32_t to uint8_t in wifi rate managers (based on Robert Ammon's patch)

This commit is contained in:
Sébastien Deronne
2018-02-17 11:25:58 +01:00
parent c8df174f11
commit 45442cf410
5 changed files with 12 additions and 12 deletions

View File

@@ -86,12 +86,12 @@ AparfWifiManager::GetTypeId (void)
"Step size for decrement the power.",
UintegerValue (1),
MakeUintegerAccessor (&AparfWifiManager::m_powerDec),
MakeUintegerChecker<uint32_t> ())
MakeUintegerChecker<uint8_t> ())
.AddAttribute ("PowerIncrementStep",
"Step size for increment the power.",
UintegerValue (1),
MakeUintegerAccessor (&AparfWifiManager::m_powerInc),
MakeUintegerChecker<uint32_t> ())
MakeUintegerChecker<uint8_t> ())
.AddAttribute ("RateDecrementStep",
"Step size for decrement the rate.",
UintegerValue (1),

View File

@@ -97,8 +97,8 @@ private:
uint32_t m_succesMax2; //!< The minimum number of successful transmissions in \"Low\" state to try a new power or rate.
uint32_t m_failMax; //!< The minimum number of failed transmissions to try a new power or rate.
uint32_t m_powerMax; //!< The maximum number of power changes.
uint32_t m_powerInc; //!< Step size for increment the power.
uint32_t m_powerDec; //!< Step size for decrement the power.
uint8_t m_powerInc; //!< Step size for increment the power.
uint8_t m_powerDec; //!< Step size for decrement the power.
uint32_t m_rateInc; //!< Step size for increment the rate.
uint32_t m_rateDec; //!< Step size for decrement the rate.
@@ -107,12 +107,12 @@ private:
* Differently form rate, power levels do not depend on the remote station.
* The levels depend only on the physical layer of the device.
*/
uint32_t m_minPower;
uint8_t m_minPower;
/**
* Maximal power level.
*/
uint32_t m_maxPower;
uint8_t m_maxPower;
/**
* The trace source fired when the transmission power changes.

View File

@@ -1070,7 +1070,7 @@ MinstrelWifiManager::PrintTable (MinstrelWifiRemoteStation *station)
station->m_statsFile << ' ';
}
float tmpTh = rate.throughput / 100000.0;
float tmpTh = rate.throughput / 100000.0f;
station->m_statsFile << " " <<
std::setw (17) << GetSupported (station, i) << " " <<
std::setw (2) << i << " " <<

View File

@@ -89,12 +89,12 @@ private:
* In contrast to rate, power levels do not depend on the remote station.
* The levels depend only on the physical layer of the device.
*/
uint32_t m_minPower;
uint8_t m_minPower;
/**
* Maximal power level.
*/
uint32_t m_maxPower;
uint8_t m_maxPower;
/**
* The trace source fired when the transmission power changes.

View File

@@ -218,9 +218,9 @@ private:
* Differently form rate, power levels do not depend on the remote station.
* The levels depend only on the physical layer of the device.
*/
uint32_t m_minPowerLevel; //!< Minimal power level.
uint32_t m_maxPowerLevel; //!< Maximal power level.
uint32_t m_nPowerLevels; //!< Number of power levels.
uint8_t m_minPowerLevel; //!< Minimal power level.
uint8_t m_maxPowerLevel; //!< Maximal power level.
uint8_t m_nPowerLevels; //!< Number of power levels.
/**
* The trace source fired when the transmission power change