wifi: Add convenient methods to check if a remote STA supports a given standard

This commit is contained in:
Stefano Avallone
2022-12-07 12:26:43 +01:00
parent 1f7ad5720e
commit 2bcadb6034
2 changed files with 73 additions and 0 deletions

View File

@@ -1287,6 +1287,58 @@ WifiMac::GetEhtSupported() const
return bool(GetDevice()->GetEhtConfiguration());
}
bool
WifiMac::GetHtSupported(const Mac48Address& address) const
{
for (const auto& link : m_links)
{
if (link->stationManager->GetHtSupported(address))
{
return true;
}
}
return false;
}
bool
WifiMac::GetVhtSupported(const Mac48Address& address) const
{
for (const auto& link : m_links)
{
if (link->stationManager->GetVhtSupported(address))
{
return true;
}
}
return false;
}
bool
WifiMac::GetHeSupported(const Mac48Address& address) const
{
for (const auto& link : m_links)
{
if (link->stationManager->GetHeSupported(address))
{
return true;
}
}
return false;
}
bool
WifiMac::GetEhtSupported(const Mac48Address& address) const
{
for (const auto& link : m_links)
{
if (link->stationManager->GetEhtSupported(address))
{
return true;
}
}
return false;
}
void
WifiMac::SetVoBlockAckThreshold(uint8_t threshold)
{

View File

@@ -493,6 +493,27 @@ class WifiMac : public Object
*/
bool GetEhtSupported() const;
/**
* \param address the (link or MLD) address of a remote station
* \return true if the remote station with the given address supports HT
*/
bool GetHtSupported(const Mac48Address& address) const;
/**
* \param address the (link or MLD) address of a remote station
* \return true if the remote station with the given address supports VHT
*/
bool GetVhtSupported(const Mac48Address& address) const;
/**
* \param address the (link or MLD) address of a remote station
* \return true if the remote station with the given address supports HE
*/
bool GetHeSupported(const Mac48Address& address) const;
/**
* \param address the (link or MLD) address of a remote station
* \return true if the remote station with the given address supports EHT
*/
bool GetEhtSupported(const Mac48Address& address) const;
/**
* Return the maximum A-MPDU size of the given Access Category.
*