wifi: Indicate 320 MHz support in EHT capabilities

This commit is contained in:
Sébastien Deronne
2024-09-21 09:46:25 +02:00
parent bcb7146846
commit 30331ec671
3 changed files with 29 additions and 7 deletions

View File

@@ -177,11 +177,14 @@ struct EhtMcsAndNssSet
* Deserialize the Supported EHT-MCS And NSS Set subfield
*
* @param start iterator pointing to where the Supported EHT-MCS And NSS Set subfield should be
* read from \param is2_4Ghz indicating whether PHY is operating in 2.4 GHz based on previously
* serialized IEs \param heSupportedChannelWidthSet supported channel width set based on
* previously deserialized HE capabilities IE \param support320MhzIn6Ghz flag whether 320 MHz is
* supported in 6 GHz band based on EHT PHY capabilities subfield \return the number of bytes
* read
* read from
* @param is2_4Ghz indicating whether PHY is operating in 2.4 GHz based on previously serialized
* IEs
* @param heSupportedChannelWidthSet supported channel width set based on previously
* deserialized HE capabilities IE
* @param support320MhzIn6Ghz flag whether 320 MHz is supported in 6 GHz band based on EHT PHY
* capabilities subfield
* @return the number of bytes read
*/
uint16_t Deserialize(Buffer::Iterator start,
bool is2_4Ghz,

View File

@@ -2520,8 +2520,21 @@ WifiMac::GetEhtCapabilities(uint8_t linkId) const
phy->IsMcsSupported(WIFI_MOD_CLASS_EHT, maxMcs) ? maxTxNss : 0);
}
}
// 320 MHz not supported yet
if (width >= MHz_u{320})
{
capabilities.m_phyCapabilities.support320MhzIn6Ghz = true;
for (auto maxMcs : {9, 11, 13})
{
capabilities.SetSupportedRxEhtMcsAndNss(
EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_320_MHZ,
maxMcs,
phy->IsMcsSupported(WIFI_MOD_CLASS_EHT, maxMcs) ? maxRxNss : 0);
capabilities.SetSupportedTxEhtMcsAndNss(
EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_320_MHZ,
maxMcs,
phy->IsMcsSupported(WIFI_MOD_CLASS_EHT, maxMcs) ? maxTxNss : 0);
}
}
return capabilities;
}

View File

@@ -1768,6 +1768,12 @@ WifiRemoteStationManager::AddStationEhtCapabilities(Mac48Address from,
// Used by all stations to record EHT capabilities of remote stations
NS_LOG_FUNCTION(this << from << ehtCapabilities);
auto state = LookupState(from);
if (ehtCapabilities.m_phyCapabilities.support320MhzIn6Ghz &&
(m_wifiPhy->GetPhyBand() == WIFI_PHY_BAND_6GHZ))
{
state->m_channelWidth = 320;
}
// For other cases, the supported channel width is set by the HT/VHT capabilities
for (const auto& mcs : m_wifiPhy->GetMcsList(WIFI_MOD_CLASS_EHT))
{
for (uint8_t mapType = 0; mapType < EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_MAX; ++mapType)