wifi: Fix data printed in SupportedRates IE
This commit is contained in:
@@ -403,18 +403,6 @@ ApWifiMac::GetSupportedRates (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
SupportedRates rates;
|
||||
//If it is an HT-AP or VHT-AP or HE-AP, then add the BSSMembershipSelectorSet
|
||||
//The standard says that the BSSMembershipSelectorSet
|
||||
//must have its MSB set to 1 (must be treated as a Basic Rate)
|
||||
//Also the standard mentioned that at least 1 element should be included in the SupportedRates the rest can be in the ExtendedSupportedRates
|
||||
if (GetHtSupported () || GetVhtSupported () || GetHeSupported ())
|
||||
{
|
||||
for (uint8_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
|
||||
{
|
||||
rates.AddBssMembershipSelectorRate (m_phy->GetBssMembershipSelector (i));
|
||||
}
|
||||
}
|
||||
//
|
||||
//Send the set of supported rates and make sure that we indicate
|
||||
//the Basic Rate set in this set of supported rates.
|
||||
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
|
||||
@@ -440,7 +428,17 @@ ApWifiMac::GetSupportedRates (void) const
|
||||
NS_LOG_DEBUG ("Setting basic rate " << mode.GetUniqueName ());
|
||||
rates.SetBasicRate (modeDataRate);
|
||||
}
|
||||
|
||||
//If it is an HT-AP or VHT-AP or HE-AP, then add the BSSMembershipSelectorSet
|
||||
//The standard says that the BSSMembershipSelectorSet
|
||||
//must have its MSB set to 1 (must be treated as a Basic Rate)
|
||||
//Also the standard mentioned that at least 1 element should be included in the SupportedRates the rest can be in the ExtendedSupportedRates
|
||||
if (GetHtSupported () || GetVhtSupported () || GetHeSupported ())
|
||||
{
|
||||
for (uint8_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
|
||||
{
|
||||
rates.AddBssMembershipSelectorRate (m_phy->GetBssMembershipSelector (i));
|
||||
}
|
||||
}
|
||||
return rates;
|
||||
}
|
||||
|
||||
|
||||
@@ -1087,13 +1087,6 @@ SupportedRates
|
||||
StaWifiMac::GetSupportedRates (void) const
|
||||
{
|
||||
SupportedRates rates;
|
||||
if (GetHtSupported () || GetVhtSupported () || GetHeSupported ())
|
||||
{
|
||||
for (uint8_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
|
||||
{
|
||||
rates.AddBssMembershipSelectorRate (m_phy->GetBssMembershipSelector (i));
|
||||
}
|
||||
}
|
||||
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
|
||||
{
|
||||
WifiMode mode = m_phy->GetMode (i);
|
||||
@@ -1101,6 +1094,13 @@ StaWifiMac::GetSupportedRates (void) const
|
||||
NS_LOG_DEBUG ("Adding supported rate of " << modeDataRate);
|
||||
rates.AddSupportedRate (modeDataRate);
|
||||
}
|
||||
if (GetHtSupported () || GetVhtSupported () || GetHeSupported ())
|
||||
{
|
||||
for (uint8_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
|
||||
{
|
||||
rates.AddBssMembershipSelectorRate (m_phy->GetBssMembershipSelector (i));
|
||||
}
|
||||
}
|
||||
return rates;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ SupportedRates::AddBssMembershipSelectorRate (uint64_t bs)
|
||||
{
|
||||
NS_ASSERT_MSG (false, "Value " << bs << " not a BSS Membership Selector");
|
||||
}
|
||||
uint8_t rate = (static_cast<uint8_t> (bs / 500000) | 0x80);
|
||||
uint8_t rate = static_cast<uint8_t> (bs / 500000);
|
||||
for (uint8_t i = 0; i < m_nRates; i++)
|
||||
{
|
||||
if (rate == m_rates[i])
|
||||
|
||||
Reference in New Issue
Block a user