wifi: Support for trigger frames soliciting EHT TB PPDUs over 320 MHz

This commit is contained in:
Sébastien Deronne
2024-11-12 08:17:49 +01:00
parent 73b86c1f17
commit 2b74e04406
2 changed files with 26 additions and 8 deletions

View File

@@ -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};
}

View File

@@ -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;
/**