diff --git a/src/wifi/model/eht/eht-ppdu.cc b/src/wifi/model/eht/eht-ppdu.cc index 6dc48bfa7..675e8a3de 100644 --- a/src/wifi/model/eht/eht-ppdu.cc +++ b/src/wifi/model/eht/eht-ppdu.cc @@ -56,7 +56,7 @@ EhtPpdu::EhtPpdu(const WifiConstPsduMap& psdus, WifiPpduType EhtPpdu::GetType() const { - if (m_muUserInfos.empty()) + if (m_psdus.count(SU_STA_ID) > 0) { return WIFI_PPDU_TYPE_SU; } @@ -75,13 +75,13 @@ EhtPpdu::GetType() const bool EhtPpdu::IsDlMu() const { - return (m_preamble == WIFI_PREAMBLE_EHT_MU) && !m_muUserInfos.empty(); + return (m_preamble == WIFI_PREAMBLE_EHT_MU) && (m_psdus.count(SU_STA_ID) == 0); } bool EhtPpdu::IsUlMu() const { - return (m_preamble == WIFI_PREAMBLE_EHT_TB) && !m_muUserInfos.empty(); + return (m_preamble == WIFI_PREAMBLE_EHT_TB) && (m_psdus.count(SU_STA_ID) == 0); } void @@ -99,13 +99,7 @@ EhtPpdu::SetTxVectorFromPhyHeaders(WifiTxVector& txVector, txVector.SetEhtPpduType(m_ehtPpduType); // FIXME: PPDU type should be read from U-SIG if (txVector.IsDlMu()) { - auto copyTxVector = txVector; - for (const auto& muUserInfo : m_muUserInfos) - { - txVector.SetHeMuUserInfo(muUserInfo.first, muUserInfo.second); - } - SetHeMuUserInfos(copyTxVector, heSig); - NS_ASSERT(txVector.GetHeMuUserInfoMap() == copyTxVector.GetHeMuUserInfoMap()); + SetHeMuUserInfos(txVector, heSig); } if (ns3::IsDlMu(m_preamble)) { diff --git a/src/wifi/model/he/he-ppdu.cc b/src/wifi/model/he/he-ppdu.cc index de38d2cc3..5bfd47bd2 100644 --- a/src/wifi/model/he/he-ppdu.cc +++ b/src/wifi/model/he/he-ppdu.cc @@ -68,14 +68,6 @@ HePpdu::HePpdu(const WifiConstPsduMap& psdus, m_psdus.begin()->second = nullptr; m_psdus.clear(); m_psdus = psdus; - if (txVector.IsMu()) - { - for (const auto& heMuUserInfo : txVector.GetHeMuUserInfoMap()) - { - auto [it, ret] = m_muUserInfos.emplace(heMuUserInfo); - NS_ABORT_MSG_IF(!ret, "STA-ID " << heMuUserInfo.first << " already present"); - } - } SetPhyHeaders(txVector, ppduDuration); } @@ -223,13 +215,7 @@ HePpdu::SetTxVectorFromPhyHeaders(WifiTxVector& txVector, } if (IsDlMu()) { - auto copyTxVector = txVector; - for (const auto& muUserInfo : m_muUserInfos) - { - txVector.SetHeMuUserInfo(muUserInfo.first, muUserInfo.second); - } - SetHeMuUserInfos(copyTxVector, heSig); - NS_ASSERT(txVector.GetHeMuUserInfoMap() == copyTxVector.GetHeMuUserInfoMap()); + SetHeMuUserInfos(txVector, heSig); } if (txVector.IsDlMu()) { diff --git a/src/wifi/model/he/he-ppdu.h b/src/wifi/model/he/he-ppdu.h index 361e4d09d..4b053c4ea 100644 --- a/src/wifi/model/he/he-ppdu.h +++ b/src/wifi/model/he/he-ppdu.h @@ -383,9 +383,6 @@ class HePpdu : public OfdmPpdu #endif mutable TxPsdFlag m_txPsdFlag; //!< the transmit power spectral density flag - WifiTxVector::HeMuUserInfoMap m_muUserInfos; //!< HE MU specific per-user information (to be - //!< removed once HE-SIG-B headers are implemented) - private: std::string PrintPayload() const override; WifiTxVector DoGetTxVector() const override;