wifi: Extend RU allocation in MU-RTS for CTS frames transmitted over 320 MHz
This commit is contained in:
@@ -1547,17 +1547,22 @@ CtrlTriggerUserInfoField::SetMuRtsRuAllocation(uint8_t value)
|
||||
NS_ABORT_MSG_IF(m_triggerType != TriggerFrameType::MU_RTS_TRIGGER,
|
||||
"SetMuRtsRuAllocation() can only be used for MU-RTS");
|
||||
NS_ABORT_MSG_IF(
|
||||
value < 61 || value > 68,
|
||||
value < 61 || value > 69,
|
||||
"Value "
|
||||
<< +value
|
||||
<< " is not admitted for B7-B1 of the RU Allocation subfield of MU-RTS Trigger Frames");
|
||||
|
||||
m_ruAllocation = (value << 1);
|
||||
if (value == 68)
|
||||
if (value >= 68)
|
||||
{
|
||||
// set B0 for 160 MHz and 80+80 MHz indication
|
||||
// set B0 for 160 MHz, 80+80 MHz and 320 MHz indication
|
||||
m_ruAllocation++;
|
||||
}
|
||||
if (value == 69)
|
||||
{
|
||||
// set 160 for 320 MHz indication
|
||||
m_ps160 = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
@@ -1567,7 +1572,7 @@ CtrlTriggerUserInfoField::GetMuRtsRuAllocation() const
|
||||
"GetMuRtsRuAllocation() can only be used for MU-RTS");
|
||||
uint8_t value = (m_ruAllocation >> 1);
|
||||
NS_ABORT_MSG_IF(
|
||||
value < 61 || value > 68,
|
||||
value < 61 || value > 69,
|
||||
"Value "
|
||||
<< +value
|
||||
<< " is not admitted for B7-B1 of the RU Allocation subfield of MU-RTS Trigger Frames");
|
||||
|
||||
@@ -1241,10 +1241,14 @@ HeFrameExchangeManager::GetCtsTxVectorAfterMuRts(const CtrlTriggerHeader& trigge
|
||||
{
|
||||
bw = MHz_u{80};
|
||||
}
|
||||
else if (ru == 68)
|
||||
{
|
||||
bw = MHz_u{160};
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_ASSERT(ru == 68);
|
||||
bw = MHz_u{160};
|
||||
NS_ASSERT(ru == 69);
|
||||
bw = MHz_u{320};
|
||||
}
|
||||
|
||||
auto txVector = GetWifiRemoteStationManager()->GetCtsTxVector(m_bssid, GetCtsModeAfterMuRts());
|
||||
|
||||
@@ -85,11 +85,11 @@ WifiProtectionManager::AddUserInfoToMuRts(CtrlTriggerHeader& muRts,
|
||||
auto phy = m_mac->GetWifiPhy(m_linkId);
|
||||
std::size_t primaryIdx = phy->GetOperatingChannel().GetPrimaryChannelIndex(ctsTxWidth);
|
||||
std::size_t idx80MHz = MHz_u{80} / ctsTxWidth;
|
||||
if ((phy->GetChannelWidth() == MHz_u{160}) && (ctsTxWidth <= MHz_u{40}) &&
|
||||
if ((phy->GetChannelWidth() > MHz_u{80}) && (ctsTxWidth <= MHz_u{40}) &&
|
||||
(primaryIdx >= idx80MHz))
|
||||
{
|
||||
// the primary80 is in the higher part of the 160 MHz channel
|
||||
primaryIdx -= idx80MHz;
|
||||
// get the index of the primary within the primary80
|
||||
primaryIdx %= idx80MHz;
|
||||
}
|
||||
switch (static_cast<uint16_t>(ctsTxWidth))
|
||||
{
|
||||
@@ -105,6 +105,9 @@ WifiProtectionManager::AddUserInfoToMuRts(CtrlTriggerHeader& muRts,
|
||||
case 160:
|
||||
ui.SetMuRtsRuAllocation(68);
|
||||
break;
|
||||
case 320:
|
||||
ui.SetMuRtsRuAllocation(69);
|
||||
break;
|
||||
default:
|
||||
NS_ABORT_MSG("Unhandled TX width: " << ctsTxWidth << " MHz");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user