wifi: RU allocation subfield value is different if it contributes to zero User fields
to the User Specific field in the same HE-SIG-B content channel as this RU Allocation subfield
This commit is contained in:
@@ -411,7 +411,7 @@ HeRu::GetRuSpecs(uint8_t ruAllocation)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
HeRu::GetEqualizedRuAllocation(RuType ruType, bool isOdd)
|
||||
HeRu::GetEqualizedRuAllocation(RuType ruType, bool isOdd, bool hasUsers)
|
||||
{
|
||||
switch (ruType)
|
||||
{
|
||||
@@ -422,11 +422,11 @@ HeRu::GetEqualizedRuAllocation(RuType ruType, bool isOdd)
|
||||
case HeRu::RU_106_TONE:
|
||||
return isOdd ? 128 : 96;
|
||||
case HeRu::RU_242_TONE:
|
||||
return 192;
|
||||
return hasUsers ? 192 : 113;
|
||||
case HeRu::RU_484_TONE:
|
||||
return 200;
|
||||
return hasUsers ? 200 : 114;
|
||||
default:
|
||||
return 208;
|
||||
return hasUsers ? 208 : 115;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -295,8 +295,10 @@ class HeRu
|
||||
/// Get the RU_ALLOCATION value for equal size RUs
|
||||
/// @param ruType equal size RU type (generated by GetEqualSizedRusForStations)
|
||||
/// @param isOdd if number of stations is an odd number
|
||||
/// @param hasUsers whether it contributes to User field(s) in the content channel this RU
|
||||
/// Allocation belongs to
|
||||
/// @return RU_ALLOCATION value
|
||||
static uint8_t GetEqualizedRuAllocation(RuType ruType, bool isOdd);
|
||||
static uint8_t GetEqualizedRuAllocation(RuType ruType, bool isOdd, bool hasUsers);
|
||||
|
||||
/// Empty 242-tone RU identifier
|
||||
static constexpr uint8_t EMPTY_242_TONE_RU = 113;
|
||||
|
||||
@@ -828,7 +828,7 @@ WifiTxVector::DeriveRuAllocation(uint8_t p20Index) const
|
||||
const auto index = (ruBw < MHz_u{20}) ? ((ruIndex - 1) / rusPerSubchannel.size())
|
||||
: ((ruIndex - 1) * numSubchannelsForRu);
|
||||
NS_ABORT_IF(index >= Count20MHzSubchannels(m_channelWidth));
|
||||
auto ruAlloc = HeRu::GetEqualizedRuAllocation(ruType, false);
|
||||
auto ruAlloc = HeRu::GetEqualizedRuAllocation(ruType, false, true);
|
||||
if (ruAllocations.at(index) != HeRu::EMPTY_242_TONE_RU)
|
||||
{
|
||||
if (ruType == ruTypes.at(index))
|
||||
@@ -837,11 +837,11 @@ WifiTxVector::DeriveRuAllocation(uint8_t p20Index) const
|
||||
}
|
||||
if (ruType == HeRu::RU_26_TONE)
|
||||
{
|
||||
ruAlloc = HeRu::GetEqualizedRuAllocation(ruTypes.at(index), true);
|
||||
ruAlloc = HeRu::GetEqualizedRuAllocation(ruTypes.at(index), true, true);
|
||||
}
|
||||
else if (ruTypes.at(index) == HeRu::RU_26_TONE)
|
||||
{
|
||||
ruAlloc = HeRu::GetEqualizedRuAllocation(ruType, true);
|
||||
ruAlloc = HeRu::GetEqualizedRuAllocation(ruType, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user