wifi: Cleanup SupportedRates
This commit is contained in:
@@ -61,37 +61,13 @@ SupportedRates::AddSupportedRate (uint32_t bs)
|
||||
NS_LOG_FUNCTION (this << bs);
|
||||
NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate");
|
||||
NS_ASSERT (m_nRates < MAX_SUPPORTED_RATES);
|
||||
if (bs == BSS_MEMBERSHIP_SELECTOR_HT_PHY)
|
||||
if (IsSupportedRate (bs))
|
||||
{
|
||||
// Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012
|
||||
m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_HT_PHY | 0x80);
|
||||
m_nRates++;
|
||||
NS_LOG_DEBUG ("add HT_PHY membership selector");
|
||||
}
|
||||
else if (bs == BSS_MEMBERSHIP_SELECTOR_VHT_PHY)
|
||||
{
|
||||
// Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012
|
||||
m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_VHT_PHY | 0x80);
|
||||
m_nRates++;
|
||||
NS_LOG_DEBUG ("add VHT_PHY membership selector");
|
||||
}
|
||||
else if (bs == BSS_MEMBERSHIP_SELECTOR_HE_PHY)
|
||||
{
|
||||
// Encoding defined in Sec. 8.4.2.3, IEEE 802.11-2012
|
||||
m_rates[m_nRates] = (BSS_MEMBERSHIP_SELECTOR_HE_PHY | 0x80);
|
||||
m_nRates++;
|
||||
NS_LOG_DEBUG ("add HE_PHY membership selector");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsSupportedRate (bs))
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_rates[m_nRates] = bs / 500000;
|
||||
m_nRates++;
|
||||
NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << +m_nRates);
|
||||
return;
|
||||
}
|
||||
m_rates[m_nRates] = bs / 500000;
|
||||
m_nRates++;
|
||||
NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << +m_nRates);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user