wifi: No need for RSM to have member variables for default MCS/mode

This commit is contained in:
Stefano Avallone
2023-09-04 21:53:59 +02:00
committed by Stefano Avallone
parent f93647d459
commit b6b92f8cef
2 changed files with 5 additions and 11 deletions

View File

@@ -168,12 +168,6 @@ WifiRemoteStationManager::SetupPhy(const Ptr<WifiPhy> phy)
// transmit rate for automatic control responses like
// acknowledgments.
m_wifiPhy = phy;
m_defaultTxMode = phy->GetDefaultMode();
NS_ASSERT(m_defaultTxMode.IsMandatory());
if (GetHtSupported())
{
m_defaultTxMcs = HtPhy::GetHtMcs(0);
}
Reset();
}
@@ -1701,13 +1695,16 @@ WifiRemoteStationManager::GetLdpcSupported(Mac48Address address) const
WifiMode
WifiRemoteStationManager::GetDefaultMode() const
{
return m_defaultTxMode;
NS_ASSERT(m_wifiPhy);
auto defaultTxMode = m_wifiPhy->GetDefaultMode();
NS_ASSERT(defaultTxMode.IsMandatory());
return defaultTxMode;
}
WifiMode
WifiRemoteStationManager::GetDefaultMcs() const
{
return m_defaultTxMcs;
return HtPhy::GetHtMcs0();
}
WifiMode

View File

@@ -1491,9 +1491,6 @@ class WifiRemoteStationManager : public Object
StationStates m_states; //!< States of known stations
Stations m_stations; //!< Information for each known stations
WifiMode m_defaultTxMode; //!< The default transmission mode
WifiMode m_defaultTxMcs; //!< The default transmission modulation-coding scheme (MCS)
uint32_t m_maxSsrc; //!< Maximum STA short retry count (SSRC)
uint32_t m_maxSlrc; //!< Maximum STA long retry count (SLRC)
uint32_t m_rtsCtsThreshold; //!< Threshold for RTS/CTS