wifi: Add the FrameRetryLimit attribute to WifiMac

Similar attributes in WifiRemoteStationManager will be eventually
deprecated.
This commit is contained in:
Stefano Avallone
2024-07-19 19:50:52 +02:00
parent 7384bdc550
commit 1a92d2cbcf
2 changed files with 35 additions and 1 deletions

View File

@@ -146,6 +146,14 @@ WifiMac::GetTypeId()
UintegerValue(1024),
MakeUintegerAccessor(&WifiMac::GetMpduBufferSize, &WifiMac::SetMpduBufferSize),
MakeUintegerChecker<uint16_t>(1, 1024))
.AddAttribute(
"FrameRetryLimit",
"The maximum number of transmission attempts of a frame that are made before a "
"failure condition is indicated. This corresponds to the dot11ShortRetryLimit "
"parameter in the standard.",
UintegerValue(7),
MakeUintegerAccessor(&WifiMac::GetFrameRetryLimit, &WifiMac::SetFrameRetryLimit),
MakeUintegerChecker<uint32_t>(1, 65535))
.AddAttribute("VO_MaxAmsduSize",
"Maximum length in bytes of an A-MSDU for AC_VO access class "
"(capped to 7935 for HT PPDUs and 11398 for VHT/HE/EHT PPDUs). "
@@ -2037,6 +2045,19 @@ WifiMac::GetMpduBufferSize() const
return m_mpduBufferSize;
}
void
WifiMac::SetFrameRetryLimit(uint32_t limit)
{
NS_LOG_FUNCTION(this << limit);
m_frameRetryLimit = limit;
}
uint32_t
WifiMac::GetFrameRetryLimit() const
{
return m_frameRetryLimit;
}
void
WifiMac::SetVoBlockAckThreshold(uint8_t threshold)
{

View File

@@ -751,6 +751,18 @@ class WifiMac : public Object
*/
uint16_t GetMpduBufferSize() const;
/**
* Set the frame retry limit.
*
* @param limit the frame retry limit
*/
void SetFrameRetryLimit(uint32_t limit);
/**
* @return the frame retry limit
*/
uint32_t GetFrameRetryLimit() 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.
@@ -1200,7 +1212,8 @@ class WifiMac : public Object
uint32_t m_beMaxAmpduSize; ///< maximum A-MPDU size for AC_BE (in bytes)
uint32_t m_bkMaxAmpduSize; ///< maximum A-MPDU size for AC_BK (in bytes)
uint16_t m_mpduBufferSize; //!< BlockAck buffer size (in number of MPDUs)
uint16_t m_mpduBufferSize; //!< BlockAck buffer size (in number of MPDUs)
uint32_t m_frameRetryLimit; //!< the frame retry limit
UniformRandomBitGenerator m_shuffleLinkIdsGen; //!< random number generator to shuffle link IDs