wifi: HT and VHT are not supported on 6GHz links
This commit is contained in:
committed by
Stefano Avallone
parent
b47358f4a6
commit
8a24f52aac
@@ -78,7 +78,7 @@ AdhocWifiMac::Enqueue(Ptr<Packet> packet, Mac48Address to)
|
||||
if (GetWifiRemoteStationManager()->IsBrandNew(to))
|
||||
{
|
||||
// In ad hoc mode, we assume that every destination supports all the rates we support.
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(SINGLE_LINK_OP_ID))
|
||||
{
|
||||
GetWifiRemoteStationManager()->AddAllSupportedMcs(to);
|
||||
GetWifiRemoteStationManager()->AddStationHtCapabilities(
|
||||
@@ -145,7 +145,7 @@ AdhocWifiMac::Enqueue(Ptr<Packet> packet, Mac48Address to)
|
||||
hdr.SetType(WIFI_MAC_DATA);
|
||||
}
|
||||
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(SINGLE_LINK_OP_ID))
|
||||
{
|
||||
hdr.SetNoOrder(); // explicitly set to 0 for the time being since HT control field is not
|
||||
// yet implemented (set it to 1 when implemented)
|
||||
@@ -191,7 +191,7 @@ AdhocWifiMac::Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId)
|
||||
if (GetWifiRemoteStationManager()->IsBrandNew(from))
|
||||
{
|
||||
// In ad hoc mode, we assume that every destination supports all the rates we support.
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(SINGLE_LINK_OP_ID))
|
||||
{
|
||||
GetWifiRemoteStationManager()->AddAllSupportedMcs(from);
|
||||
GetWifiRemoteStationManager()->AddStationHtCapabilities(
|
||||
|
||||
@@ -565,7 +565,7 @@ ApWifiMac::GetSupportedRates(uint8_t linkId) const
|
||||
// must have its MSB set to 1 (must be treated as a Basic Rate)
|
||||
// Also the standard mentioned that at least 1 element should be included in the SupportedRates
|
||||
// the rest can be in the ExtendedSupportedRates
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
for (const auto& selector : GetWifiPhy(linkId)->GetBssMembershipSelectorList())
|
||||
{
|
||||
@@ -889,7 +889,7 @@ HtOperation
|
||||
ApWifiMac::GetHtOperation(uint8_t linkId) const
|
||||
{
|
||||
NS_LOG_FUNCTION(this << +linkId);
|
||||
NS_ASSERT(GetHtSupported());
|
||||
NS_ASSERT(GetHtSupported(linkId));
|
||||
HtOperation operation;
|
||||
auto phy = GetWifiPhy(linkId);
|
||||
auto remoteStationManager = GetWifiRemoteStationManager(linkId);
|
||||
@@ -1136,7 +1136,7 @@ ApWifiMac::SendProbeResp(Mac48Address to, uint8_t linkId)
|
||||
{
|
||||
probe.Get<EdcaParameterSet>() = GetEdcaParameterSet(linkId);
|
||||
}
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
probe.Get<ExtendedCapabilities>() = GetExtendedCapabilities();
|
||||
probe.Get<HtCapabilities>() = GetHtCapabilities(linkId);
|
||||
@@ -1239,7 +1239,7 @@ ApWifiMac::GetAssocResp(Mac48Address to, uint8_t linkId)
|
||||
{
|
||||
assoc.Get<EdcaParameterSet>() = GetEdcaParameterSet(linkId);
|
||||
}
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
assoc.Get<ExtendedCapabilities>() = GetExtendedCapabilities();
|
||||
assoc.Get<HtCapabilities>() = GetHtCapabilities(linkId);
|
||||
@@ -1535,7 +1535,7 @@ ApWifiMac::SendOneBeacon(uint8_t linkId)
|
||||
{
|
||||
beacon.Get<EdcaParameterSet>() = GetEdcaParameterSet(linkId);
|
||||
}
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
beacon.Get<ExtendedCapabilities>() = GetExtendedCapabilities();
|
||||
beacon.Get<HtCapabilities>() = GetHtCapabilities(linkId);
|
||||
@@ -2109,7 +2109,7 @@ ApWifiMac::ReceiveAssocRequest(const AssocReqRefVariant& assoc,
|
||||
return failure("STA's supported rate set not compatible with our Basic Rate set");
|
||||
}
|
||||
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
// check whether the HT STA supports all MCSs in Basic MCS Set
|
||||
const auto& htCapabilities = frame.template Get<HtCapabilities>();
|
||||
@@ -2283,7 +2283,7 @@ ApWifiMac::ReceiveAssocRequest(const AssocReqRefVariant& assoc,
|
||||
{
|
||||
remoteStationManager->AddSupportedErpSlotTime(from, true);
|
||||
}
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
const auto& htCapabilities = frame.template Get<HtCapabilities>();
|
||||
if (htCapabilities.has_value() && htCapabilities->IsSupportedMcs(0))
|
||||
|
||||
@@ -150,6 +150,7 @@ MpduAggregator::GetMaxAmpduSize(Mac48Address recipient,
|
||||
// Retrieve the Capabilities elements advertised by the recipient
|
||||
auto ehtCapabilities = stationManager->GetStationEhtCapabilities(recipient);
|
||||
auto heCapabilities = stationManager->GetStationHeCapabilities(recipient);
|
||||
auto he6GhzCapabilities = stationManager->GetStationHe6GhzCapabilities(recipient);
|
||||
auto vhtCapabilities = stationManager->GetStationVhtCapabilities(recipient);
|
||||
auto htCapabilities = stationManager->GetStationHtCapabilities(recipient);
|
||||
|
||||
@@ -161,11 +162,15 @@ MpduAggregator::GetMaxAmpduSize(Mac48Address recipient,
|
||||
|
||||
maxAmpduSize = std::min(maxAmpduSize, ehtCapabilities->GetMaxAmpduLength());
|
||||
}
|
||||
else if (modulation >= WIFI_MOD_CLASS_HE)
|
||||
else if (modulation >= WIFI_MOD_CLASS_HE || m_mac->Is6GhzBand(m_linkId))
|
||||
{
|
||||
NS_ABORT_MSG_IF(!heCapabilities, "HE Capabilities element not received");
|
||||
|
||||
maxAmpduSize = std::min(maxAmpduSize, heCapabilities->GetMaxAmpduLength());
|
||||
if (he6GhzCapabilities)
|
||||
{
|
||||
maxAmpduSize = std::min(maxAmpduSize, he6GhzCapabilities->GetMaxAmpduLength());
|
||||
}
|
||||
}
|
||||
else if (modulation == WIFI_MOD_CLASS_VHT)
|
||||
{
|
||||
|
||||
@@ -187,6 +187,7 @@ MsduAggregator::GetMaxAmsduSize(Mac48Address recipient,
|
||||
|
||||
// Retrieve the Capabilities elements advertised by the recipient
|
||||
auto ehtCapabilities = stationManager->GetStationEhtCapabilities(recipient);
|
||||
auto he6GhzCapabilities = stationManager->GetStationHe6GhzCapabilities(recipient);
|
||||
auto vhtCapabilities = stationManager->GetStationVhtCapabilities(recipient);
|
||||
auto htCapabilities = stationManager->GetStationHtCapabilities(recipient);
|
||||
|
||||
@@ -199,12 +200,16 @@ MsduAggregator::GetMaxAmsduSize(Mac48Address recipient,
|
||||
{
|
||||
maxMpduSize = ehtCapabilities->GetMaxMpduLength();
|
||||
}
|
||||
else if (he6GhzCapabilities && m_mac->Is6GhzBand(m_linkId))
|
||||
{
|
||||
maxMpduSize = he6GhzCapabilities->GetMaxMpduLength();
|
||||
}
|
||||
else if (vhtCapabilities && m_mac->GetWifiPhy(m_linkId)->GetPhyBand() != WIFI_PHY_BAND_2_4GHZ)
|
||||
{
|
||||
maxMpduSize = vhtCapabilities->GetMaxMpduLength();
|
||||
}
|
||||
|
||||
if (!htCapabilities)
|
||||
if (!htCapabilities && !he6GhzCapabilities)
|
||||
{
|
||||
/* "A non-DMG STA shall not transmit an A-MSDU to a STA from which it has
|
||||
* not received a frame containing an HT Capabilities element" (Section
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "wifi-psdu.h"
|
||||
#include "wifi-tx-parameters.h"
|
||||
|
||||
#include "ns3/ht-configuration.h"
|
||||
#include "ns3/ht-frame-exchange-manager.h"
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/pointer.h"
|
||||
@@ -541,7 +542,7 @@ QosTxop::GetNextMpdu(uint8_t linkId,
|
||||
|
||||
// try A-MSDU aggregation if the MPDU does not contain an A-MSDU and does not already
|
||||
// have a sequence number assigned (may be a retransmission)
|
||||
if (m_mac->GetHtSupported() && !recipient.IsBroadcast() &&
|
||||
if (m_mac->GetHtConfiguration() && !recipient.IsBroadcast() &&
|
||||
!peekedItem->GetHeader().IsQosAmsdu() && !peekedItem->HasSeqNoAssigned() &&
|
||||
!peekedItem->IsFragment())
|
||||
{
|
||||
|
||||
@@ -371,7 +371,7 @@ StaWifiMac::SendProbeRequest(uint8_t linkId)
|
||||
auto supportedRates = GetSupportedRates(linkId);
|
||||
probe.Get<SupportedRates>() = supportedRates.rates;
|
||||
probe.Get<ExtendedSupportedRatesIE>() = supportedRates.extendedRates;
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
probe.Get<ExtendedCapabilities>() = GetExtendedCapabilities();
|
||||
probe.Get<HtCapabilities>() = GetHtCapabilities(linkId);
|
||||
@@ -437,7 +437,7 @@ StaWifiMac::GetAssociationRequest(bool isReassoc, uint8_t linkId) const
|
||||
frame.template Get<ExtendedSupportedRatesIE>() = supportedRates.extendedRates;
|
||||
frame.Capabilities() = GetCapabilities(linkId);
|
||||
frame.SetListenInterval(0);
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
frame.template Get<ExtendedCapabilities>() = GetExtendedCapabilities();
|
||||
frame.template Get<HtCapabilities>() = GetHtCapabilities(linkId);
|
||||
@@ -1714,26 +1714,22 @@ StaWifiMac::UpdateApInfo(const MgtFrameType& frame,
|
||||
}
|
||||
GetWifiRemoteStationManager(linkId)->SetQosSupport(apAddr, qosSupported);
|
||||
|
||||
if (!GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* HT station */
|
||||
if (const auto& htCapabilities = frame.template Get<HtCapabilities>();
|
||||
htCapabilities.has_value())
|
||||
{
|
||||
if (!htCapabilities->IsSupportedMcs(0))
|
||||
{
|
||||
GetWifiRemoteStationManager(linkId)->RemoveAllSupportedMcs(apAddr);
|
||||
}
|
||||
else
|
||||
/* HT station */
|
||||
if (const auto& htCapabilities = frame.template Get<HtCapabilities>();
|
||||
htCapabilities.has_value())
|
||||
{
|
||||
GetWifiRemoteStationManager(linkId)->AddStationHtCapabilities(apAddr,
|
||||
*htCapabilities);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetWifiRemoteStationManager(linkId)->RemoveAllSupportedMcs(apAddr);
|
||||
}
|
||||
// TODO: process ExtendedCapabilities
|
||||
// ExtendedCapabilities extendedCapabilities = frame.GetExtendedCapabilities ();
|
||||
}
|
||||
// TODO: process ExtendedCapabilities
|
||||
// ExtendedCapabilities extendedCapabilities = frame.GetExtendedCapabilities ();
|
||||
|
||||
// we do not return if VHT is not supported because HE STAs operating in
|
||||
// the 2.4 GHz band do not support VHT
|
||||
@@ -1966,7 +1962,7 @@ StaWifiMac::GetSupportedRates(uint8_t linkId) const
|
||||
NS_LOG_DEBUG("Adding supported rate of " << modeDataRate);
|
||||
rates.AddSupportedRate(modeDataRate);
|
||||
}
|
||||
if (GetHtSupported())
|
||||
if (GetHtSupported(linkId))
|
||||
{
|
||||
for (const auto& selector : GetWifiPhy(linkId)->GetBssMembershipSelectorList())
|
||||
{
|
||||
|
||||
@@ -471,7 +471,7 @@ void
|
||||
WifiMac::SetDevice(const Ptr<WifiNetDevice> device)
|
||||
{
|
||||
m_device = device;
|
||||
if (GetHtSupported())
|
||||
if (device->GetHtConfiguration())
|
||||
{
|
||||
// the configured BlockAck buffer size can now be capped
|
||||
m_mpduBufferSize = std::min(m_mpduBufferSize, GetMaxBaBufferSize());
|
||||
@@ -1899,16 +1899,18 @@ WifiMac::GetEhtConfiguration() const
|
||||
}
|
||||
|
||||
bool
|
||||
WifiMac::GetHtSupported() const
|
||||
WifiMac::GetHtSupported(uint8_t linkId) const
|
||||
{
|
||||
return bool(GetDevice()->GetHtConfiguration());
|
||||
return (GetDevice()->GetHtConfiguration() &&
|
||||
GetWifiPhy(linkId)->GetPhyBand() != WIFI_PHY_BAND_6GHZ);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiMac::GetVhtSupported(uint8_t linkId) const
|
||||
{
|
||||
return (GetDevice()->GetVhtConfiguration() &&
|
||||
GetWifiPhy(linkId)->GetPhyBand() != WIFI_PHY_BAND_2_4GHZ);
|
||||
GetWifiPhy(linkId)->GetPhyBand() != WIFI_PHY_BAND_2_4GHZ &&
|
||||
GetWifiPhy(linkId)->GetPhyBand() != WIFI_PHY_BAND_6GHZ);
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1986,7 +1988,7 @@ WifiMac::GetMaxBaBufferSize(std::optional<Mac48Address> address) const
|
||||
{
|
||||
return 256;
|
||||
}
|
||||
NS_ASSERT(address ? GetHtSupported(*address) : GetHtSupported());
|
||||
NS_ASSERT(address ? GetHtSupported(*address) : static_cast<bool>(GetHtConfiguration()));
|
||||
return 64;
|
||||
}
|
||||
|
||||
@@ -2090,7 +2092,7 @@ WifiMac::GetExtendedCapabilities() const
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
ExtendedCapabilities capabilities;
|
||||
capabilities.SetHtSupported(GetHtSupported());
|
||||
capabilities.SetHtSupported(GetHtSupported(SINGLE_LINK_OP_ID));
|
||||
capabilities.SetVhtSupported(GetVhtSupported(SINGLE_LINK_OP_ID));
|
||||
// TODO: to be completed
|
||||
return capabilities;
|
||||
@@ -2100,7 +2102,7 @@ HtCapabilities
|
||||
WifiMac::GetHtCapabilities(uint8_t linkId) const
|
||||
{
|
||||
NS_LOG_FUNCTION(this << +linkId);
|
||||
NS_ASSERT(GetHtSupported());
|
||||
NS_ASSERT(GetHtSupported(linkId));
|
||||
HtCapabilities capabilities;
|
||||
|
||||
auto phy = GetWifiPhy(linkId);
|
||||
|
||||
@@ -579,11 +579,12 @@ class WifiMac : public Object
|
||||
*/
|
||||
bool GetDsssSupported(uint8_t linkId) const;
|
||||
/**
|
||||
* Return whether the device supports HT.
|
||||
* Return whether the device supports HT on the given link.
|
||||
*
|
||||
* \param linkId the ID of the given link.
|
||||
* \return true if HT is supported, false otherwise
|
||||
*/
|
||||
bool GetHtSupported() const;
|
||||
bool GetHtSupported(uint8_t linkId) const;
|
||||
/**
|
||||
* Return whether the device supports VHT on the given link.
|
||||
*
|
||||
|
||||
@@ -260,7 +260,8 @@ bool
|
||||
WifiRemoteStationManager::GetVhtSupported() const
|
||||
{
|
||||
return (m_wifiPhy->GetDevice()->GetVhtConfiguration() &&
|
||||
m_wifiPhy->GetPhyBand() != WIFI_PHY_BAND_2_4GHZ);
|
||||
m_wifiPhy->GetPhyBand() != WIFI_PHY_BAND_2_4GHZ &&
|
||||
m_wifiPhy->GetPhyBand() != WIFI_PHY_BAND_6GHZ);
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -2054,7 +2055,7 @@ WifiRemoteStationManager::GetQosSupported(const WifiRemoteStation* station) cons
|
||||
bool
|
||||
WifiRemoteStationManager::GetHtSupported(const WifiRemoteStation* station) const
|
||||
{
|
||||
return bool(station->m_state->m_htCapabilities);
|
||||
return station->m_state->m_htCapabilities || station->m_state->m_he6GhzBandCapabilities;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -2169,7 +2170,8 @@ WifiRemoteStationManager::GetOfdmSupported(const Mac48Address& address) const
|
||||
bool
|
||||
WifiRemoteStationManager::GetHtSupported(Mac48Address address) const
|
||||
{
|
||||
return bool(LookupState(address)->m_htCapabilities);
|
||||
const auto state = LookupState(address);
|
||||
return state->m_htCapabilities || state->m_he6GhzBandCapabilities;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user