wifi: Add a method to get the max supported BA buffer size based on supported standard

This commit is contained in:
Stefano Avallone
2023-08-14 15:27:06 +02:00
parent 75ba5cdc94
commit e6e0d9f947
2 changed files with 24 additions and 0 deletions

View File

@@ -1831,6 +1831,21 @@ WifiMac::GetEhtSupported(const Mac48Address& address) const
return false;
}
uint16_t
WifiMac::GetMaxBaBufferSize(std::optional<Mac48Address> address) const
{
if (address ? GetEhtSupported(*address) : GetEhtSupported())
{
return 1024;
}
if (address ? GetHeSupported(*address) : GetHeSupported())
{
return 256;
}
NS_ASSERT(address ? GetHtSupported(*address) : GetHtSupported());
return 64;
}
void
WifiMac::SetVoBlockAckThreshold(uint8_t threshold)
{

View File

@@ -685,6 +685,15 @@ class WifiMac : public Object
*/
BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
/**
* Get the maximum Block Ack buffer size (in number of MPDUs) supported by the given device,
* if any, or by this device, otherwise, based on the supported standard.
*
* \param address the (MLD or link) address of the given device
* \return the maximum supported Block Ack buffer size (in number of MPDUs)
*/
uint16_t GetMaxBaBufferSize(std::optional<Mac48Address> address = std::nullopt) const;
/**
* Get the TID-to-Link Mapping negotiated with the given MLD (if any) for the given direction.
* An empty mapping indicates the default mapping.