wifi: MediumSyncDelay info advertised by AP MLD is stored by EMLSR Manager
This commit is contained in:
committed by
Stefano Avallone
parent
5e1047dcee
commit
2a2287737c
@@ -112,6 +112,13 @@ EmlsrManager::GetTypeId()
|
||||
}
|
||||
|
||||
EmlsrManager::EmlsrManager()
|
||||
// The STA initializes dot11MSDTimerDuration to aPPDUMaxTime defined in Table 36-70
|
||||
// (Sec. 35.3.16.8.1 of 802.11be D3.1)
|
||||
: m_mediumSyncDuration(MicroSeconds(DEFAULT_MSD_DURATION_USEC)),
|
||||
// The default value of dot11MSDOFDMEDthreshold is –72 dBm and the default value of
|
||||
// dot11MSDTXOPMax is 1, respectively (Sec. 35.3.16.8.1 of 802.11be D3.1)
|
||||
m_msdOfdmEdThreshold(DEFAULT_MSD_OFDM_ED_THRESH),
|
||||
m_msdMaxNTxops(DEFAULT_MSD_MAX_N_TXOPS)
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
}
|
||||
@@ -207,6 +214,45 @@ EmlsrManager::GetTransitionTimeout() const
|
||||
return m_emlsrTransitionTimeout;
|
||||
}
|
||||
|
||||
void
|
||||
EmlsrManager::SetMediumSyncDuration(Time duration)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << duration.As(Time::US));
|
||||
m_mediumSyncDuration = duration;
|
||||
}
|
||||
|
||||
Time
|
||||
EmlsrManager::GetMediumSyncDuration() const
|
||||
{
|
||||
return m_mediumSyncDuration;
|
||||
}
|
||||
|
||||
void
|
||||
EmlsrManager::SetMediumSyncOfdmEdThreshold(int8_t threshold)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << threshold);
|
||||
m_msdOfdmEdThreshold = threshold;
|
||||
}
|
||||
|
||||
int8_t
|
||||
EmlsrManager::GetMediumSyncOfdmEdThreshold() const
|
||||
{
|
||||
return m_msdOfdmEdThreshold;
|
||||
}
|
||||
|
||||
void
|
||||
EmlsrManager::SetMediumSyncMaxNTxops(std::optional<uint8_t> nTxops)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << nTxops.has_value());
|
||||
m_msdMaxNTxops = nTxops;
|
||||
}
|
||||
|
||||
std::optional<uint8_t>
|
||||
EmlsrManager::GetMediumSyncMaxNTxops() const
|
||||
{
|
||||
return m_msdMaxNTxops;
|
||||
}
|
||||
|
||||
void
|
||||
EmlsrManager::SetEmlsrLinks(const std::set<uint8_t>& linkIds)
|
||||
{
|
||||
|
||||
@@ -73,6 +73,47 @@ class EmlsrManager : public Object
|
||||
*/
|
||||
std::optional<Time> GetTransitionTimeout() const;
|
||||
|
||||
/**
|
||||
* Set the duration of the MediumSyncDelay timer.
|
||||
*
|
||||
* \param duration the duration of the MediumSyncDelay timer
|
||||
*/
|
||||
void SetMediumSyncDuration(Time duration);
|
||||
|
||||
/**
|
||||
* \return the duration of the MediumSyncDelay timer
|
||||
*/
|
||||
Time GetMediumSyncDuration() const;
|
||||
|
||||
/**
|
||||
* Set the Medium Synchronization OFDM ED threshold (dBm) to use while the MediumSyncDelay
|
||||
* timer is running.
|
||||
*
|
||||
* \param threshold the threshold in dBm (ranges from -72 to -62 dBm)
|
||||
*/
|
||||
void SetMediumSyncOfdmEdThreshold(int8_t threshold);
|
||||
|
||||
/**
|
||||
* \return the Medium Synchronization OFDM ED threshold (dBm) to use while the MediumSyncDelay
|
||||
* timer is running.
|
||||
*/
|
||||
int8_t GetMediumSyncOfdmEdThreshold() const;
|
||||
|
||||
/**
|
||||
* Set the maximum number of TXOPs a non-AP STA is allowed to attempt to initiate while
|
||||
* the MediumSyncDelay timer is running. No value indicates no limit.
|
||||
*
|
||||
* \param nTxops the maximum number of TXOPs a non-AP STA is allowed to attempt to
|
||||
* initiate while the MediumSyncDelay timer is running
|
||||
*/
|
||||
void SetMediumSyncMaxNTxops(std::optional<uint8_t> nTxops);
|
||||
|
||||
/**
|
||||
* \return the maximum number of TXOPs a non-AP STA is allowed to attempt to initiate while
|
||||
* the MediumSyncDelay timer is running. No value indicates no limit.
|
||||
*/
|
||||
std::optional<uint8_t> GetMediumSyncMaxNTxops() const;
|
||||
|
||||
/**
|
||||
* \return the ID of main PHY (position in the vector of PHYs held by WifiNetDevice)
|
||||
*/
|
||||
@@ -299,6 +340,10 @@ class EmlsrManager : public Object
|
||||
Ptr<StaWifiMac> m_staMac; //!< the MAC of the managed non-AP MLD
|
||||
std::optional<Time> m_emlsrTransitionTimeout; /**< Transition timeout advertised by APs with
|
||||
EMLSR activated */
|
||||
Time m_mediumSyncDuration; //!< duration of the MediumSyncDelay timer
|
||||
int8_t m_msdOfdmEdThreshold; //!< MediumSyncDelay OFDM ED threshold
|
||||
std::optional<uint8_t> m_msdMaxNTxops; //!< MediumSyncDelay max number of TXOPs
|
||||
|
||||
std::set<uint8_t> m_emlsrLinks; //!< ID of the EMLSR links (empty if EMLSR mode is disabled)
|
||||
std::optional<std::set<uint8_t>> m_nextEmlsrLinks; /**< ID of the links that will become the
|
||||
EMLSR links when the pending
|
||||
|
||||
@@ -1785,10 +1785,18 @@ StaWifiMac::UpdateApInfo(const MgtFrameType& frame,
|
||||
// is supported by the peer
|
||||
GetWifiRemoteStationManager(linkId)->AddStationEhtCapabilities(apAddr, *ehtCapabilities);
|
||||
|
||||
if (const auto& mle = frame.template Get<MultiLinkElement>();
|
||||
mle && mle->HasEmlCapabilities() && m_emlsrManager)
|
||||
if (const auto& mle = frame.template Get<MultiLinkElement>(); mle && m_emlsrManager)
|
||||
{
|
||||
m_emlsrManager->SetTransitionTimeout(mle->GetTransitionTimeout());
|
||||
if (mle->HasEmlCapabilities())
|
||||
{
|
||||
m_emlsrManager->SetTransitionTimeout(mle->GetTransitionTimeout());
|
||||
}
|
||||
if (const auto& common = mle->GetCommonInfoBasic(); common.m_mediumSyncDelayInfo)
|
||||
{
|
||||
m_emlsrManager->SetMediumSyncDuration(common.GetMediumSyncDelayTimer());
|
||||
m_emlsrManager->SetMediumSyncOfdmEdThreshold(common.GetMediumSyncOfdmEdThreshold());
|
||||
m_emlsrManager->SetMediumSyncMaxNTxops(common.GetMediumSyncMaxNTxops());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user