wifi: (fixes #2311) store state received about the remote station being HT or VHT capable
This commit is contained in:
@@ -1432,6 +1432,8 @@ WifiRemoteStationManager::LookupState (Mac48Address address) const
|
||||
state->m_ness = 0;
|
||||
state->m_aggregation = false;
|
||||
state->m_stbc = false;
|
||||
state->m_htSupported = false;
|
||||
state->m_vhtSupported = false;
|
||||
const_cast<WifiRemoteStationManager *> (this)->m_states.push_back (state);
|
||||
NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning new state");
|
||||
return state;
|
||||
@@ -1491,6 +1493,7 @@ WifiRemoteStationManager::AddStationHtCapabilities (Mac48Address from, HtCapabil
|
||||
{
|
||||
state->m_channelWidth = 20;
|
||||
}
|
||||
state->m_htSupported = true;
|
||||
state->m_greenfield = htCapabilities.GetGreenfield ();
|
||||
state->m_rx = htCapabilities.GetRxHighestSupportedAntennas ();
|
||||
}
|
||||
@@ -1516,6 +1519,7 @@ WifiRemoteStationManager::AddStationVhtCapabilities (Mac48Address from, VhtCapab
|
||||
{
|
||||
state->m_channelWidth = m_wifiPhy->GetChannelWidth ();
|
||||
}
|
||||
state->m_vhtSupported = true;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1805,6 +1809,18 @@ WifiRemoteStationManager::GetNSupported (const WifiRemoteStation *station) const
|
||||
return station->m_state->m_operationalRateSet.size ();
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetHtSupported (const WifiRemoteStation *station) const
|
||||
{
|
||||
return station->m_state->m_htSupported;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::GetVhtSupported (const WifiRemoteStation *station) const
|
||||
{
|
||||
return station->m_state->m_vhtSupported;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
WifiRemoteStationManager::GetNMcsSupported (const WifiRemoteStation *station) const
|
||||
{
|
||||
|
||||
@@ -753,6 +753,24 @@ protected:
|
||||
* \return the number of modes supported by the given station
|
||||
*/
|
||||
uint32_t GetNSupported (const WifiRemoteStation *station) const;
|
||||
/**
|
||||
* Return whether the given station is HT capable.
|
||||
*
|
||||
* \param station the station being queried
|
||||
*
|
||||
* \return true if the station has HT capabilities,
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetHtSupported (const WifiRemoteStation *station) const;
|
||||
/**
|
||||
* Return whether the given station is VHT capable.
|
||||
*
|
||||
* \param station the station being queried
|
||||
*
|
||||
* \return true if the station has VHT capabilities,
|
||||
* false otherwise
|
||||
*/
|
||||
bool GetVhtSupported (const WifiRemoteStation *station) const;
|
||||
/**
|
||||
* Return the WifiMode supported by the specified station at the specified index.
|
||||
*
|
||||
@@ -761,6 +779,7 @@ protected:
|
||||
*
|
||||
* \return the WifiMode at the given index of the specified station
|
||||
*/
|
||||
|
||||
WifiMode GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const;
|
||||
/**
|
||||
* Return the number of MCS supported by the given station.
|
||||
@@ -1232,6 +1251,8 @@ struct WifiRemoteStationState
|
||||
bool m_greenfield; //!< Flag if greenfield is supported by the remote station
|
||||
bool m_shortPreamble; //!< Flag if short PLCP preamble is supported by the remote station
|
||||
bool m_shortSlotTime; //!< Flag if short ERP slot time is supported by the remote station
|
||||
bool m_htSupported; //!< Flag if HT is supported by the station
|
||||
bool m_vhtSupported; //!< Flag if VHT is supported by the station
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user