diff --git a/src/wifi/model/ctrl-headers.cc b/src/wifi/model/ctrl-headers.cc index e9ff6931e..8e9596ce0 100644 --- a/src/wifi/model/ctrl-headers.cc +++ b/src/wifi/model/ctrl-headers.cc @@ -2340,17 +2340,35 @@ CtrlTriggerHeader::SetUlBandwidth(MHz_u bw) m_ulBandwidth = 2; break; case 160: + case 320: m_ulBandwidth = 3; break; default: NS_FATAL_ERROR("Bandwidth value not allowed."); break; } + if (bw > MHz_u{160}) + { + NS_ASSERT(m_specialUserInfoField); + } + if (m_specialUserInfoField) + { + NS_ASSERT(m_variant == TriggerFrameVariant::EHT); + m_specialUserInfoField->SetUlBwExt(bw); + } } MHz_u CtrlTriggerHeader::GetUlBandwidth() const { + if (m_specialUserInfoField) + { + NS_ASSERT(m_variant == TriggerFrameVariant::EHT); + if (m_specialUserInfoField->GetUlBwExt() > 1) + { + return MHz_u{320}; + } + } return (1 << m_ulBandwidth) * MHz_u{20}; } diff --git a/src/wifi/model/ctrl-headers.h b/src/wifi/model/ctrl-headers.h index 9a4628342..475e77765 100644 --- a/src/wifi/model/ctrl-headers.h +++ b/src/wifi/model/ctrl-headers.h @@ -1218,15 +1218,15 @@ class CtrlTriggerHeader : public Header */ bool GetCsRequired() const; /** - * Set the bandwidth of the solicited HE TB PPDU. + * Set the bandwidth of the solicited HE/EHT TB PPDU. * - * @param bw bandwidth (allowed values: 20, 40, 80, 160) + * @param bw bandwidth (allowed values: 20, 40, 80, 160, 320) */ void SetUlBandwidth(MHz_u bw); /** - * Get the bandwidth of the solicited HE TB PPDU. + * Get the bandwidth of the solicited HE/EHT TB PPDU. * - * @return the bandwidth (20, 40, 80 or 160) + * @return the bandwidth (20, 40, 80, 160 or 320) */ MHz_u GetUlBandwidth() const; /** @@ -1241,15 +1241,15 @@ class CtrlTriggerHeader : public Header */ void SetGiAndLtfType(Time guardInterval, uint8_t ltfType); /** - * Get the guard interval duration of the solicited HE TB PPDU. + * Get the guard interval duration of the solicited HE/EHT TB PPDU. * - * @return the guard interval duration of the solicited HE TB PPDU + * @return the guard interval duration of the solicited HE/EHT TB PPDU */ Time GetGuardInterval() const; /** - * Get the LTF type of the solicited HE TB PPDU. + * Get the LTF type of the solicited HE/EHT TB PPDU. * - * @return the LTF type of the solicited HE TB PPDU + * @return the LTF type of the solicited HE/EHT TB PPDU */ uint8_t GetLtfType() const; /**