From a7f92e2d468103b571cefb4a43111b8070bb7b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 25 Sep 2017 20:25:58 +0200 Subject: [PATCH] wifi: (fixes #2771) Ideal wifi manager does not check the maximum number of TX streams --- RELEASE_NOTES | 1 + src/wifi/model/ideal-wifi-manager.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 3ed19b585..11a032ea0 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -120,6 +120,7 @@ Bugs fixed - Bug 2762 - BindToNetDevice behaviour is not coherent with Linux - Bug 2763 - wifi management packets in the PCAPs are all marked as wrong by Wireshark - Bug 2769 - Set ssthresh correctly upon RTO +- Bug 2771 - wifi: Simulation fails with IdealWifiManager if stations have different number of antennas - Bug 2781 - tcp: Do not go beyond limit in TcpTxBuffer - Bug 2783 - wifi: MonitorSnifferRx SNR is invariant to RxNoiseFigure diff --git a/src/wifi/model/ideal-wifi-manager.cc b/src/wifi/model/ideal-wifi-manager.cc index bf444f152..10ac1a771 100644 --- a/src/wifi/model/ideal-wifi-manager.cc +++ b/src/wifi/model/ideal-wifi-manager.cc @@ -330,7 +330,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st) uint8_t nss = (mode.GetMcsValue () / 8) + 1; txVector.SetNss (nss); if (WifiPhy::IsValidTxVector (txVector) == false || - nss > GetNumberOfSupportedStreams (st)) + nss > std::min (GetMaxNumberOfTransmitStreams (), GetNumberOfSupportedStreams (st))) { NS_LOG_DEBUG ("Skipping mode " << mode.GetUniqueName () << " nss " << (uint16_t) nss << " width " << @@ -370,7 +370,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st) { continue; } - for (uint8_t nss = 1; nss <= GetNumberOfSupportedStreams (station); nss++) + for (uint8_t nss = 1; nss <= std::min (GetMaxNumberOfTransmitStreams (), GetNumberOfSupportedStreams (station)); nss++) { txVector.SetNss (nss); if (WifiPhy::IsValidTxVector (txVector) == false)