diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 235ddff9b..e735eb07a 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -122,6 +122,7 @@ Bugs fixed - Bug 2316 - MacLow shall use a single TXVECTOR for all MPDUs belonging to a same A-MPDU - Bug 2318 - MPDU Aggregation fails with TCP - Bug 2319 - BlockAckTimeout value is too low for 802.11n operating at 2.4 GHz +- Bug 2320 - Add method to check whether a WifiTxVector contains a valid combination of WifiMode, number of spatial streams and channel width - Bug 2321 - Wifi rate managers should not be triggered for each MPDU when A-MPDU is used - Bug 2327 - CWmin value selection for 802.11g is not compliant with the standard rules diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index e79907c49..5eee8bbcc 100755 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1559,6 +1559,42 @@ WifiPhy::GetVhtMcs9 () return mcs; } +bool +WifiPhy::IsValidTxVector (WifiTxVector txVector) +{ + uint32_t chWidth = txVector.GetChannelWidth(); + uint8_t nss = txVector.GetNss(); + std::string modeName = txVector.GetMode().GetUniqueName(); + + if (chWidth == 20) + { + if (nss != 3 && nss != 6) + { + return (modeName != "VhtMcs9"); + } + } + else if (chWidth == 80) + { + if (nss == 3 || nss == 7) + { + return (modeName != "VhtMcs6"); + } + else if (nss == 6) + { + return (modeName != "VhtMcs9"); + } + } + else if (chWidth == 160) + { + if (nss == 3) + { + return (modeName != "VhtMcs9"); + } + } + + return true; +} + std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state) { switch (state) diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 4e015dc43..aa55f0e64 100755 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -1056,6 +1056,15 @@ public: * \return MCS 9 from VHT MCS values */ static WifiMode GetVhtMcs9 (); + /** + * The standard disallows certain combinations of WifiMode, number of + * spatial streams, and channel widths. This method can be used to + * check whether this WifiTxVector contains an invalid combination. + * + * \param txVector the WifiTxVector to inspect + * \return true if the WifiTxVector parameters are allowed by the standard + */ + static bool IsValidTxVector (WifiTxVector txVector); /** * Public method used to fire a PhyTxBegin trace.