wifi: Guard intervals in nanoseconds in Ideal

This commit is contained in:
Sébastien Deronne
2017-02-01 21:10:23 +01:00
parent 34d62d9822
commit 80ff2b8fc1

View File

@@ -362,12 +362,12 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
}
uint8_t channelWidth = GetChannelWidth (station);
NS_LOG_DEBUG ("Found maxMode: " << maxMode << " channelWidth: " << (uint16_t) channelWidth);
if (m_currentRate != maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval (), nss))
if (m_currentRate != maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval () ? 400 : 800, nss))
{
NS_LOG_DEBUG ("New datarate: " << maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval (), nss));
m_currentRate = maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval (), nss);
NS_LOG_DEBUG ("New datarate: " << maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval () ? 400 : 800, nss));
m_currentRate = maxMode.GetDataRate (channelWidth, GetPhy ()->GetShortGuardInterval () ? 400 : 800, nss);
}
return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetPreambleForTransmission (maxMode, GetAddress (station)), false, GetNumberOfAntennas (), nss, 0, channelWidth, GetAggregation (station), false);
return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetPreambleForTransmission (maxMode, GetAddress (station)), 800, GetNumberOfAntennas (), nss, 0, channelWidth, GetAggregation (station), false);
}
WifiTxVector
@@ -399,7 +399,7 @@ IdealWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
maxMode = mode;
}
}
return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetPreambleForTransmission (maxMode, GetAddress (station)), false, GetNumberOfAntennas (), nss, 0, GetChannelWidthForMode (maxMode), GetAggregation (station), false);
return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetPreambleForTransmission (maxMode, GetAddress (station)), 800, GetNumberOfAntennas (), nss, 0, GetChannelWidthForMode (maxMode), GetAggregation (station), false);
}
bool