wifi: ApWifiMac stores EML Capabilities of non-AP MLDs in remote station manager
This commit is contained in:
committed by
Stefano Avallone
parent
bdb597b55f
commit
66d2179a38
@@ -1976,7 +1976,18 @@ ApWifiMac::ParseReportedStaInfo(const AssocReqRefVariant& assoc, Mac48Address fr
|
||||
return;
|
||||
}
|
||||
|
||||
auto emlCapabilities = std::make_shared<CommonInfoBasicMle::EmlCapabilities>();
|
||||
if (mle->HasEmlCapabilities())
|
||||
{
|
||||
emlCapabilities->emlsrSupport = mle->IsEmlsrSupported() ? 1 : 0;
|
||||
emlCapabilities->emlsrPaddingDelay =
|
||||
CommonInfoBasicMle::EncodeEmlsrPaddingDelay(mle->GetEmlsrPaddingDelay());
|
||||
emlCapabilities->emlsrTransitionDelay =
|
||||
CommonInfoBasicMle::EncodeEmlsrTransitionDelay(mle->GetEmlsrTransitionDelay());
|
||||
}
|
||||
|
||||
GetWifiRemoteStationManager(linkId)->SetMldAddress(from, mle->GetMldMacAddress());
|
||||
GetWifiRemoteStationManager(linkId)->AddStationEmlCapabilities(from, emlCapabilities);
|
||||
|
||||
for (std::size_t i = 0; i < mle->GetNPerStaProfileSubelements(); i++)
|
||||
{
|
||||
@@ -2004,6 +2015,9 @@ ApWifiMac::ParseReportedStaInfo(const AssocReqRefVariant& assoc, Mac48Address fr
|
||||
newLinkId);
|
||||
GetWifiRemoteStationManager(newLinkId)->SetMldAddress(perStaProfile.GetStaMacAddress(),
|
||||
mle->GetMldMacAddress());
|
||||
GetWifiRemoteStationManager(newLinkId)->AddStationEmlCapabilities(
|
||||
perStaProfile.GetStaMacAddress(),
|
||||
emlCapabilities);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1388,6 +1388,7 @@ WifiRemoteStationManager::LookupState(Mac48Address address) const
|
||||
state->m_vhtCapabilities = nullptr;
|
||||
state->m_heCapabilities = nullptr;
|
||||
state->m_ehtCapabilities = nullptr;
|
||||
state->m_emlCapabilities = nullptr;
|
||||
state->m_channelWidth = m_wifiPhy->GetChannelWidth();
|
||||
state->m_guardInterval = GetGuardInterval();
|
||||
state->m_ness = 0;
|
||||
@@ -1556,6 +1557,15 @@ WifiRemoteStationManager::AddStationEhtCapabilities(Mac48Address from,
|
||||
SetQosSupport(from, true);
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::AddStationEmlCapabilities(
|
||||
Mac48Address from,
|
||||
const std::shared_ptr<CommonInfoBasicMle::EmlCapabilities>& emlCapabilities)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << from);
|
||||
LookupState(from)->m_emlCapabilities = emlCapabilities;
|
||||
}
|
||||
|
||||
Ptr<const HtCapabilities>
|
||||
WifiRemoteStationManager::GetStationHtCapabilities(Mac48Address from)
|
||||
{
|
||||
@@ -1580,6 +1590,12 @@ WifiRemoteStationManager::GetStationEhtCapabilities(Mac48Address from)
|
||||
return LookupState(from)->m_ehtCapabilities;
|
||||
}
|
||||
|
||||
std::shared_ptr<CommonInfoBasicMle::EmlCapabilities>
|
||||
WifiRemoteStationManager::GetStationEmlCapabilities(const Mac48Address& from)
|
||||
{
|
||||
return LookupState(from)->m_emlCapabilities;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetLdpcSupported(Mac48Address address) const
|
||||
{
|
||||
@@ -1953,6 +1969,13 @@ WifiRemoteStationManager::GetEhtSupported(const WifiRemoteStation* station) cons
|
||||
return (bool)(station->m_state->m_ehtCapabilities);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetEmlsrSupported(const WifiRemoteStation* station) const
|
||||
{
|
||||
auto emlCapabilities = station->m_state->m_emlCapabilities;
|
||||
return emlCapabilities && emlCapabilities->emlsrSupport == 1;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
WifiRemoteStationManager::GetNMcsSupported(const WifiRemoteStation* station) const
|
||||
{
|
||||
@@ -2054,6 +2077,13 @@ WifiRemoteStationManager::GetEhtSupported(Mac48Address address) const
|
||||
return (bool)(LookupState(address)->m_ehtCapabilities);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetEmlsrSupported(const Mac48Address& address) const
|
||||
{
|
||||
auto emlCapabilities = LookupState(address)->m_emlCapabilities;
|
||||
return emlCapabilities && emlCapabilities->emlsrSupport == 1;
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::SetDefaultTxPowerLevel(uint8_t txPower)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "ns3/he-capabilities.h"
|
||||
#include "ns3/ht-capabilities.h"
|
||||
#include "ns3/mac48-address.h"
|
||||
#include "ns3/multi-link-element.h"
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/traced-callback.h"
|
||||
#include "ns3/vht-capabilities.h"
|
||||
@@ -113,6 +114,8 @@ struct WifiRemoteStationState
|
||||
Ptr<const VhtCapabilities> m_vhtCapabilities; //!< remote station VHT capabilities
|
||||
Ptr<const HeCapabilities> m_heCapabilities; //!< remote station HE capabilities
|
||||
Ptr<const EhtCapabilities> m_ehtCapabilities; //!< remote station EHT capabilities
|
||||
/// remote station EML capabilities
|
||||
std::shared_ptr<CommonInfoBasicMle::EmlCapabilities> m_emlCapabilities;
|
||||
|
||||
uint16_t m_channelWidth; //!< Channel width (in MHz) supported by the remote station
|
||||
uint16_t m_guardInterval; //!< HE Guard interval duration (in nanoseconds) supported by the
|
||||
@@ -260,6 +263,15 @@ class WifiRemoteStationManager : public Object
|
||||
* \param ehtCapabilities the EHT capabilities of the station
|
||||
*/
|
||||
void AddStationEhtCapabilities(Mac48Address from, EhtCapabilities ehtCapabilities);
|
||||
/**
|
||||
* Records EML capabilities of the remote station.
|
||||
*
|
||||
* \param from the address of the station being recorded
|
||||
* \param emlCapabilities the EML capabilities of the station
|
||||
*/
|
||||
void AddStationEmlCapabilities(
|
||||
Mac48Address from,
|
||||
const std::shared_ptr<CommonInfoBasicMle::EmlCapabilities>& emlCapabilities);
|
||||
/**
|
||||
* Return the HT capabilities sent by the remote station.
|
||||
*
|
||||
@@ -288,6 +300,12 @@ class WifiRemoteStationManager : public Object
|
||||
* \return the EHT capabilities sent by the remote station
|
||||
*/
|
||||
Ptr<const EhtCapabilities> GetStationEhtCapabilities(Mac48Address from);
|
||||
/**
|
||||
* \param from the (MLD or link) address of the remote non-AP MLD
|
||||
* \return the EML Capabilities advertised by the remote non-AP MLD
|
||||
*/
|
||||
std::shared_ptr<CommonInfoBasicMle::EmlCapabilities> GetStationEmlCapabilities(
|
||||
const Mac48Address& from);
|
||||
/**
|
||||
* Return whether the device has HT capability support enabled.
|
||||
*
|
||||
@@ -610,6 +628,11 @@ class WifiRemoteStationManager : public Object
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetEhtSupported(Mac48Address address) const;
|
||||
/**
|
||||
* \param address the (MLD or link) address of the non-AP MLD
|
||||
* \return whether the non-AP MLD supports EMLSR
|
||||
*/
|
||||
bool GetEmlsrSupported(const Mac48Address& address) const;
|
||||
|
||||
/**
|
||||
* Return a mode for non-unicast packets.
|
||||
@@ -1113,6 +1136,11 @@ class WifiRemoteStationManager : public Object
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetEhtSupported(const WifiRemoteStation* station) const;
|
||||
/**
|
||||
* \param station the station of a non-AP MLD
|
||||
* \return whether the non-AP MLD supports EMLSR
|
||||
*/
|
||||
bool GetEmlsrSupported(const WifiRemoteStation* station) const;
|
||||
/**
|
||||
* Return the WifiMode supported by the specified station at the specified index.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user