Skip to content

Commit

Permalink
wifi: Ideal RAA should not build SNR threshold for invalid combination
Browse files Browse the repository at this point in the history
  • Loading branch information
sderonne committed Nov 24, 2024
1 parent 36e8af6 commit 493bad6
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions src/wifi/model/rate-control/ideal-wifi-manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,21 @@ IdealWifiManager::BuildSnrThresholds()
txVector.SetGuardInterval(guardInterval);
// derive NSS from the MCS index
nss = (mode.GetMcsValue() / 8) + 1;
NS_LOG_DEBUG("Adding mode = " << mode.GetUniqueName() << " channel width " << j
<< " nss " << +nss << " GI " << guardInterval);
txVector.SetNss(nss);
txVector.SetMode(mode);
AddSnrThreshold(txVector, GetPhy()->CalculateSnr(txVector, m_ber));
if (txVector.IsValid(GetPhy()->GetPhyBand()))
{
NS_LOG_DEBUG("Adding mode = " << mode.GetUniqueName() << " channel width "
<< j << " nss " << +nss << " GI "
<< guardInterval);
AddSnrThreshold(txVector, GetPhy()->CalculateSnr(txVector, m_ber));
}
else
{
NS_LOG_DEBUG("Skipping mode = " << mode.GetUniqueName() << " channel width "
<< j << " nss " << +nss << " GI "
<< guardInterval);
}
}
else
{
Expand All @@ -156,12 +166,21 @@ IdealWifiManager::BuildSnrThresholds()
{
if (mode.IsAllowed(j, k))
{
NS_LOG_DEBUG("Adding mode = " << mode.GetUniqueName()
<< " channel width " << j << " nss " << +k
<< " GI " << guardInterval);
txVector.SetNss(k);
txVector.SetMode(mode);
AddSnrThreshold(txVector, GetPhy()->CalculateSnr(txVector, m_ber));
if (txVector.IsValid(GetPhy()->GetPhyBand()))
{
NS_LOG_DEBUG("Adding mode = " << mode.GetUniqueName()
<< " channel width " << j << " nss "
<< +k << " GI " << guardInterval);
AddSnrThreshold(txVector, GetPhy()->CalculateSnr(txVector, m_ber));
}
else
{
NS_LOG_DEBUG("Skipping mode = " << mode.GetUniqueName()
<< " channel width " << j << " nss "
<< +k << " GI " << guardInterval);
}
}
else
{
Expand Down

0 comments on commit 493bad6

Please sign in to comment.