wifi: Fix supported streams in VHT operation and HE operation IEs
This commit is contained in:
@@ -671,17 +671,20 @@ ApWifiMac::GetVhtOperation (void) const
|
||||
{
|
||||
operation.SetChannelWidth (0);
|
||||
}
|
||||
for (uint8_t nss = 1; nss <= 8; nss++)
|
||||
uint8_t maxSpatialStream = m_phy->GetMaxSupportedRxSpatialStreams ();
|
||||
for (std::map<uint16_t, Mac48Address>::const_iterator i = m_staList.begin (); i != m_staList.end (); i++)
|
||||
{
|
||||
uint8_t maxMcs;
|
||||
if (nss <= m_phy->GetMaxSupportedRxSpatialStreams ())
|
||||
if (m_stationManager->GetVhtSupported (i->second))
|
||||
{
|
||||
maxMcs = 9; //TBD: hardcode to 9 for now since we assume all MCS values are supported
|
||||
}
|
||||
else
|
||||
{
|
||||
maxMcs = 0;
|
||||
if (m_stationManager->GetNumberOfSupportedStreams (i->second) < maxSpatialStream)
|
||||
{
|
||||
maxSpatialStream = m_stationManager->GetNumberOfSupportedStreams (i->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
|
||||
{
|
||||
uint8_t maxMcs = 9; //TBD: hardcode to 9 for now since we assume all MCS values are supported
|
||||
operation.SetMaxVhtMcsPerNss (nss, maxMcs);
|
||||
}
|
||||
}
|
||||
@@ -696,7 +699,18 @@ ApWifiMac::GetHeOperation (void) const
|
||||
if (GetHeSupported ())
|
||||
{
|
||||
operation.SetHeSupported (1);
|
||||
for (uint8_t nss = 1; nss <= m_phy->GetMaxSupportedRxSpatialStreams (); nss++)
|
||||
uint8_t maxSpatialStream = m_phy->GetMaxSupportedRxSpatialStreams ();
|
||||
for (std::map<uint16_t, Mac48Address>::const_iterator i = m_staList.begin (); i != m_staList.end (); i++)
|
||||
{
|
||||
if (m_stationManager->GetHeSupported (i->second))
|
||||
{
|
||||
if (m_stationManager->GetNumberOfSupportedStreams (i->second) < maxSpatialStream)
|
||||
{
|
||||
maxSpatialStream = m_stationManager->GetNumberOfSupportedStreams (i->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
|
||||
{
|
||||
operation.SetMaxHeMcsPerNss (nss, 11); //TBD: hardcode to 11 for now since we assume all MCS values are supported
|
||||
}
|
||||
|
||||
@@ -2215,6 +2215,12 @@ WifiRemoteStationManager::GetVhtSupported (Mac48Address address) const
|
||||
return LookupState (address)->m_vhtSupported;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetHeSupported (Mac48Address address) const
|
||||
{
|
||||
return LookupState (address)->m_heSupported;
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::SetDefaultTxPowerLevel (uint8_t txPower)
|
||||
{
|
||||
|
||||
@@ -485,6 +485,15 @@ public:
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetVhtSupported (Mac48Address address) const;
|
||||
/**
|
||||
* Return whether the station supports HE or not.
|
||||
*
|
||||
* \param address the address of the station
|
||||
*
|
||||
* \return true if HE is supported by the station,
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetHeSupported (Mac48Address address) const;
|
||||
|
||||
/**
|
||||
* Return a mode for non-unicast packets.
|
||||
|
||||
Reference in New Issue
Block a user