From f07225608b365a8a778f9df9c4d1e48c58d07a3a Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Thu, 3 Jul 2025 15:34:18 +0200 Subject: [PATCH] wifi: Update outdated name of a User Info subfield --- src/wifi/model/ctrl-headers.cc | 26 +++++++++---------- src/wifi/model/ctrl-headers.h | 20 +++++++------- .../model/he/he-frame-exchange-manager.cc | 8 +++--- src/wifi/test/wifi-phy-ofdma-test.cc | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/wifi/model/ctrl-headers.cc b/src/wifi/model/ctrl-headers.cc index e36ce48dc..f91f09ec2 100644 --- a/src/wifi/model/ctrl-headers.cc +++ b/src/wifi/model/ctrl-headers.cc @@ -1188,7 +1188,7 @@ CtrlTriggerUserInfoField::CtrlTriggerUserInfoField(TriggerFrameType triggerType, m_ulMcs(0), m_ulDcm(false), m_ps160(false), - m_ulTargetRssi(0), + m_ulTargetRxPower(0), m_triggerType(triggerType), m_basicTriggerDependentUserInfo(0) { @@ -1218,7 +1218,7 @@ CtrlTriggerUserInfoField::operator=(const CtrlTriggerUserInfoField& userInfo) m_ulDcm = userInfo.m_ulDcm; m_ps160 = userInfo.m_ps160; m_bits26To31 = userInfo.m_bits26To31; - m_ulTargetRssi = userInfo.m_ulTargetRssi; + m_ulTargetRxPower = userInfo.m_ulTargetRxPower; m_basicTriggerDependentUserInfo = userInfo.m_basicTriggerDependentUserInfo; m_muBarTriggerDependentUserInfo = userInfo.m_muBarTriggerDependentUserInfo; return *this; @@ -1291,7 +1291,7 @@ CtrlTriggerUserInfoField::Serialize(Buffer::Iterator start) const i.WriteHtolsbU32(userInfo); // Here we need to write 8 bits covering the UL Target RSSI (7 bits) and B39, which is // reserved in the HE variant and the PS160 subfield in the EHT variant. - uint8_t bit32To39 = m_ulTargetRssi; + uint8_t bit32To39 = m_ulTargetRxPower; if (m_variant == TriggerFrameVariant::EHT) { bit32To39 |= (m_ps160 ? 1 << 7 : 0); @@ -1348,7 +1348,7 @@ CtrlTriggerUserInfoField::Deserialize(Buffer::Iterator start) } uint8_t bit32To39 = i.ReadU8(); - m_ulTargetRssi = bit32To39 & 0x7f; // B39 is reserved in HE variant + m_ulTargetRxPower = bit32To39 & 0x7f; // B39 is reserved in HE variant if (m_variant == TriggerFrameVariant::EHT) { m_ps160 = (bit32To39 >> 7) == 1; @@ -1677,31 +1677,31 @@ CtrlTriggerUserInfoField::GetMoreRaRu() const } void -CtrlTriggerUserInfoField::SetUlTargetRssiMaxTxPower() +CtrlTriggerUserInfoField::SetUlTargetRxPowerMaxTxPower() { - m_ulTargetRssi = 127; // see Table 9-25i of 802.11ax amendment D3.0 + m_ulTargetRxPower = 127; // see Table 9-54 of 802.11-2024 } void -CtrlTriggerUserInfoField::SetUlTargetRssi(int8_t dBm) +CtrlTriggerUserInfoField::SetUlTargetRxPower(int8_t dBm) { NS_ABORT_MSG_IF(dBm < -110 || dBm > -20, "Invalid values for signal power"); - m_ulTargetRssi = static_cast(110 + dBm); + m_ulTargetRxPower = static_cast(110 + dBm); } bool -CtrlTriggerUserInfoField::IsUlTargetRssiMaxTxPower() const +CtrlTriggerUserInfoField::IsUlTargetRxPowerMaxTxPower() const { - return (m_ulTargetRssi == 127); + return (m_ulTargetRxPower == 127); } int8_t -CtrlTriggerUserInfoField::GetUlTargetRssi() const +CtrlTriggerUserInfoField::GetUlTargetRxPower() const { - NS_ABORT_MSG_IF(m_ulTargetRssi == 127, "STA must use its max TX power"); + NS_ABORT_MSG_IF(m_ulTargetRxPower == 127, "STA must use its max TX power"); - return static_cast(m_ulTargetRssi) - 110; + return static_cast(m_ulTargetRxPower) - 110; } void diff --git a/src/wifi/model/ctrl-headers.h b/src/wifi/model/ctrl-headers.h index 475e77765..2ec339c66 100644 --- a/src/wifi/model/ctrl-headers.h +++ b/src/wifi/model/ctrl-headers.h @@ -803,32 +803,32 @@ class CtrlTriggerUserInfoField */ bool GetMoreRaRu() const; /** - * Set the UL Target RSSI subfield to indicate to the station to transmit an + * Set the UL Target Receive Power subfield to indicate to the station to transmit an * HE TB PPDU response at its maximum transmit power for the assigned MCS */ - void SetUlTargetRssiMaxTxPower(); + void SetUlTargetRxPowerMaxTxPower(); /** - * Set the UL Target RSSI subfield to indicate the expected receive signal + * Set the UL Target Receive Power subfield to indicate the expected receive signal * power in dBm * * @param dBm the expected receive signal power (a value between -110 and -20) */ - void SetUlTargetRssi(int8_t dBm); + void SetUlTargetRxPower(int8_t dBm); /** - * Return true if the UL Target RSSI subfield indicates to the station to transmit + * Return true if the UL Target Receive Power subfield indicates to the station to transmit * an HE TB PPDU response at its maximum transmit power for the assigned MCS * - * @return true if the UL Target RSSI subfield indicates to the station to transmit + * @return true if the UL Target Receive Power subfield indicates to the station to transmit * an HE TB PPDU response at its maximum transmit power for the assigned MCS */ - bool IsUlTargetRssiMaxTxPower() const; + bool IsUlTargetRxPowerMaxTxPower() const; /** * Get the expected receive signal power for the solicited HE TB PPDU. This - * method can only be called if IsUlTargetRssiMaxTxPower returns false. + * method can only be called if IsUlTargetRxPowerMaxTxPower returns false. * * @return the expected receive signal power in dBm */ - int8_t GetUlTargetRssi() const; + int8_t GetUlTargetRxPower() const; /** * Set the Trigger Dependent User Info subfield for Basic Trigger frames. * @@ -903,7 +903,7 @@ class CtrlTriggerUserInfoField } raRuInformation; //!< Used when AID12 is 0 or 2045 } m_bits26To31; //!< Fields occupying bits 26-31 in the User Info field - uint8_t m_ulTargetRssi; //!< Expected receive signal power + uint8_t m_ulTargetRxPower; //!< Expected receive signal power TriggerFrameType m_triggerType; //!< Trigger frame type uint8_t m_basicTriggerDependentUserInfo; //!< Basic Trigger variant of Trigger Dependent User //!< Info subfield diff --git a/src/wifi/model/he/he-frame-exchange-manager.cc b/src/wifi/model/he/he-frame-exchange-manager.cc index 560333ed4..db63df562 100644 --- a/src/wifi/model/he/he-frame-exchange-manager.cc +++ b/src/wifi/model/he/he-frame-exchange-manager.cc @@ -1512,7 +1512,7 @@ HeFrameExchangeManager::GetHeTbTxVector(CtrlTriggerHeader trigger, Mac48Address NS_ASSERT_MSG(heConfiguration, "This STA has to be an HE station to send an HE TB PPDU"); v.SetBssColor(heConfiguration->m_bssColor); - if (userInfoIt->IsUlTargetRssiMaxTxPower()) + if (userInfoIt->IsUlTargetRxPowerMaxTxPower()) { NS_LOG_LOGIC("AP requested using the max transmit power (" << m_phy->GetTxPowerEnd() << " dBm)"); @@ -1544,7 +1544,7 @@ HeFrameExchangeManager::GetHeTbTxVector(CtrlTriggerHeader trigger, Mac48Address trigger.GetApTxPower() - static_cast( *optRssi); // cast RSSI to be on equal footing with AP Tx power information - auto reqTxPower = dBm_u{static_cast(userInfoIt->GetUlTargetRssi() + pathLossDb)}; + auto reqTxPower = dBm_u{static_cast(userInfoIt->GetUlTargetRxPower() + pathLossDb)}; // Convert the transmit power to a power level uint8_t numPowerLevels = m_phy->GetNTxPower(); @@ -1600,7 +1600,7 @@ HeFrameExchangeManager::SetTargetRssi(CtrlTriggerHeader& trigger) const { // This might happen after static setup where the AP has not received any // frame from the client yet. - userInfo.SetUlTargetRssiMaxTxPower(); + userInfo.SetUlTargetRxPowerMaxTxPower(); continue; } @@ -1609,7 +1609,7 @@ HeFrameExchangeManager::SetTargetRssi(CtrlTriggerHeader& trigger) const rssi = (rssi >= -20) ? -20 : ((rssi <= -110) ? -110 : rssi); // cap so as to keep within [-110; -20] dBm - userInfo.SetUlTargetRssi(rssi); + userInfo.SetUlTargetRxPower(rssi); } } diff --git a/src/wifi/test/wifi-phy-ofdma-test.cc b/src/wifi/test/wifi-phy-ofdma-test.cc index 2c05b68e5..66f2aeaf4 100644 --- a/src/wifi/test/wifi-phy-ofdma-test.cc +++ b/src/wifi/test/wifi-phy-ofdma-test.cc @@ -5867,7 +5867,7 @@ TestUlOfdmaPowerControl::SendMuBar(std::vector staIds) { NS_ABORT_MSG("Unknown STA-ID (" << staId << ")"); } - ui.SetUlTargetRssi(ulTargetRssi); + ui.SetUlTargetRxPower(ulTargetRssi); CtrlBAckRequestHeader bar; bar.SetType(BlockAckReqType::COMPRESSED);