wifi: Allow to add an additional buffer time to protect beyond end of the immediate frame exchange

in case of non-zero TXOP limit when a single frame exchange is protected
This commit is contained in:
Sébastien Deronne
2024-09-03 08:02:58 +02:00
parent 46cda10f70
commit e744136b0b
5 changed files with 18 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ The required Doxygen version for documentation generation is now version 1.13.
- (dsr) !2403 - Reformatted documentation and added a new concept figure.
- (flow-monitor) !2387 - Reformatted documentation and added a new concept figure.
- (wifi) Added the `ProtectSingleExchange` attribute to the `QosFrameExchangeManager` to choose whether the NAV protection should cover the entire TXOP or only the current frame exchange when the TXOP limit is non-zero. In that case, the Duration/ID field in frames establishing the protection is set to the time remaining until the end of the current frame exchange.
- (wifi) Added the `ProtectSingleExchange` attribute to the `QosFrameExchangeManager` to choose whether the NAV protection should cover the entire TXOP or only the current frame exchange when the TXOP limit is non-zero. In that case, the Duration/ID field in frames establishing the protection is set to the time remaining until the end of the current frame exchange. It is also possible to select whether the NAV duration should be extended by an additional time to protect beyond end of the immediate frame exchange via the `SingleExchangeProtectionSurplus` attribute of the `QosFrameExchangeManager`.
### Bugs fixed

View File

@@ -355,7 +355,7 @@ HeFrameExchangeManager::GetMuRtsDurationId(uint32_t muRtsSize,
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
return duration;
@@ -1745,7 +1745,7 @@ HeFrameExchangeManager::SendMultiStaBlockAck(const WifiTxParameters& txParams, T
auto duration = Max(m_edca->GetRemainingTxop(m_linkId) - txDuration, Seconds(0));
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
psdu->SetDuration(duration);
}

View File

@@ -1052,7 +1052,7 @@ HtFrameExchangeManager::GetPsduDurationId(Time txDuration, const WifiTxParameter
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
return duration;

View File

@@ -51,7 +51,14 @@ QosFrameExchangeManager::GetTypeId()
"when the latter is non-zero",
BooleanValue(false),
MakeBooleanAccessor(&QosFrameExchangeManager::m_protectSingleExchange),
MakeBooleanChecker());
MakeBooleanChecker())
.AddAttribute(
"SingleExchangeProtectionSurplus",
"Additional time to protect beyond end of the immediate frame exchange in case of "
"non-zero TXOP limit when a single frame exchange is protected",
TimeValue(Time(0)),
MakeTimeAccessor(&QosFrameExchangeManager::m_singleExchangeProtectionSurplus),
MakeTimeChecker());
return tid;
}
@@ -506,7 +513,7 @@ QosFrameExchangeManager::GetFrameDurationId(const WifiMacHeader& header,
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
return duration;
@@ -544,7 +551,7 @@ QosFrameExchangeManager::GetRtsDurationId(const WifiTxVector& rtsTxVector,
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
return duration;
@@ -582,7 +589,7 @@ QosFrameExchangeManager::GetCtsToSelfDurationId(const WifiTxVector& ctsTxVector,
if (m_protectSingleExchange)
{
duration = std::min(duration, singleDurationId);
duration = std::min(duration, singleDurationId + m_singleExchangeProtectionSurplus);
}
return duration;

View File

@@ -194,6 +194,9 @@ class QosFrameExchangeManager : public FrameExchangeManager
bool m_protectSingleExchange; /**< true if the Duration/ID field in frames establishing
protection only covers the immediate frame exchange instead of
rest of the TXOP limit when the latter is non-zero */
Time m_singleExchangeProtectionSurplus; /**< additional time to protect beyond end of the
immediate frame exchange in case of non-zero TXOP
limit when a single frame exchange is protected */
private:
/**