From b6b92f8cef40a544665d93d10554409ce50774b6 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Mon, 4 Sep 2023 21:53:59 +0200 Subject: [PATCH] wifi: No need for RSM to have member variables for default MCS/mode --- src/wifi/model/wifi-remote-station-manager.cc | 13 +++++-------- src/wifi/model/wifi-remote-station-manager.h | 3 --- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index c5a8687cc..cfaff297e 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -168,12 +168,6 @@ WifiRemoteStationManager::SetupPhy(const Ptr 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 diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index a5067db08..5aedb2f6d 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -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