Better visibility in if conditions

This commit is contained in:
Sébastien Deronne
2015-09-05 15:53:37 +02:00
parent 007da847b8
commit be042d8968
11 changed files with 22 additions and 22 deletions

View File

@@ -233,7 +233,7 @@ AarfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
NS_LOG_FUNCTION (this << st << size);
AarfWifiRemoteStation *station = (AarfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -249,7 +249,7 @@ AarfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// RTS only by picking a single rate within the BasicRateSet.
AarfWifiRemoteStation *station = (AarfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -305,7 +305,7 @@ AarfcdWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
NS_LOG_FUNCTION (this << st << size);
AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -321,7 +321,7 @@ AarfcdWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// RTS only by picking a single rate within the BasicRateSet.
AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -336,7 +336,7 @@ AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
}
}
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -350,7 +350,7 @@ AmrrWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
NS_LOG_FUNCTION (this << st);
AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -323,7 +323,7 @@ AparfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
NS_LOG_FUNCTION (this << st << size);
AparfWifiRemoteStation *station = (AparfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -340,7 +340,7 @@ AparfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// RTS only by picking a single rate within the BasicRateSet.
AparfWifiRemoteStation *station = (AparfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -209,7 +209,7 @@ ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
NS_LOG_FUNCTION (this << st << size);
ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -225,7 +225,7 @@ ArfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// RTS only by picking a single rate within the BasicRateSet.
ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -184,7 +184,7 @@ CaraWifiManager::DoGetDataTxVector (WifiRemoteStation *st,
NS_LOG_FUNCTION (this << st << size);
CaraWifiRemoteStation *station = (CaraWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -200,7 +200,7 @@ CaraWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// \todo we could/should implement the Arf algorithm for
/// RTS only by picking a single rate within the BasicRateSet.
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -170,7 +170,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
}
}
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -199,7 +199,7 @@ IdealWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
}
}
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -475,7 +475,7 @@ MinstrelWifiManager::DoGetDataTxVector (WifiRemoteStation *st,
{
MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -497,7 +497,7 @@ MinstrelWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *) st;
NS_LOG_DEBUG ("DoGetRtsMode m_txrate=" << station->m_txrate);
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -279,7 +279,7 @@ OnoeWifiManager::DoGetDataTxVector (WifiRemoteStation *st,
}
}
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -292,7 +292,7 @@ OnoeWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
{
OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -295,7 +295,7 @@ ParfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
NS_LOG_FUNCTION (this << st << size);
ParfWifiRemoteStation *station = (ParfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -312,7 +312,7 @@ ParfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
/// RTS only by picking a single rate within the BasicRateSet.
ParfWifiRemoteStation *station = (ParfWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;

View File

@@ -287,7 +287,7 @@ RraaWifiManager::DoGetDataTxVector (WifiRemoteStation *st,
{
RraaWifiRemoteStation *station = (RraaWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;
@@ -304,7 +304,7 @@ RraaWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
{
RraaWifiRemoteStation *station = (RraaWifiRemoteStation *) st;
uint32_t channelWidth = GetChannelWidth (station);
if (channelWidth >= 40)
if (channelWidth > 20 && channelWidth != 22)
{
//avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
channelWidth = 20;