wifi: RU allocation is coded on 9 bits for EHT

This commit is contained in:
Sébastien Deronne
2024-11-03 11:31:54 +01:00
parent bdc7d0d469
commit 55a1b421cf
2 changed files with 6 additions and 6 deletions

View File

@@ -379,7 +379,7 @@ HeRu::RuSpecCompare::operator()(const HeRu::RuSpec& lhs, const HeRu::RuSpec& rhs
}
std::vector<HeRu::RuSpec>
HeRu::GetRuSpecs(uint8_t ruAllocation)
HeRu::GetRuSpecs(uint16_t ruAllocation)
{
std::optional<std::size_t> idx;
if (((ruAllocation >= 0) && (ruAllocation <= 15)) || (ruAllocation == 112))
@@ -405,12 +405,12 @@ HeRu::GetRuSpecs(uint8_t ruAllocation)
}
else
{
NS_FATAL_ERROR("Reserved RU allocation " << +ruAllocation);
NS_FATAL_ERROR("Reserved RU allocation " << ruAllocation);
}
return idx.has_value() ? m_heRuAllocations.at(idx.value()) : std::vector<HeRu::RuSpec>{};
}
uint8_t
uint16_t
HeRu::GetEqualizedRuAllocation(RuType ruType, bool isOdd, bool hasUsers)
{
switch (ruType)

View File

@@ -288,9 +288,9 @@ class HeRu
static const RuAllocationMap m_heRuAllocations;
/// Get the RU specs based on RU_ALLOCATION
/// @param ruAllocation 8 bit RU_ALLOCATION value
/// @param ruAllocation 9 bit RU_ALLOCATION value
/// @return RU spec associated with the RU_ALLOCATION
static std::vector<RuSpec> GetRuSpecs(uint8_t ruAllocation);
static std::vector<RuSpec> GetRuSpecs(uint16_t ruAllocation);
/// Get the RU_ALLOCATION value for equal size RUs
/// @param ruType equal size RU type (generated by GetEqualSizedRusForStations)
@@ -298,7 +298,7 @@ class HeRu
/// @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, bool hasUsers);
static uint16_t GetEqualizedRuAllocation(RuType ruType, bool isOdd, bool hasUsers);
/// Empty 242-tone RU identifier
static constexpr uint8_t EMPTY_242_TONE_RU = 113;