diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 715d2f102..944ae6063 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -31,6 +31,7 @@ Bugs fixed - Bug 2511 - HT Greenfield is not working - Bug 2521 - Include ipv6-option.h in wscript - Bug 2529 - Missing trace when Block ACK timeout is triggered or when missing MPDUs are announced by a Block ACK response +- Bug 2532 - Inconsistencies between 802.11n MCS and NSS value reported in TXVECTOR Known issues ------------ diff --git a/src/wifi/model/spectrum-wifi-phy.cc b/src/wifi/model/spectrum-wifi-phy.cc index f5335cf11..5c9bbd302 100644 --- a/src/wifi/model/spectrum-wifi-phy.cc +++ b/src/wifi/model/spectrum-wifi-phy.cc @@ -398,8 +398,15 @@ SpectrumWifiPhy::StartRx (Ptr rxParams) NS_FATAL_ERROR ("Received Wi-Fi Spectrum Signal with no WifiPhyTag"); return; } - + WifiTxVector txVector = tag.GetWifiTxVector (); + + if (txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT + && (txVector.GetNss () != (1 + (txVector.GetMode ().GetMcsValue () / 8)))) + { + NS_FATAL_ERROR ("MCS value does not match NSS value: MCS = " << (uint16_t)txVector.GetMode ().GetMcsValue () << ", NSS = " << (uint16_t)txVector.GetNss ()); + } + if (txVector.GetNss () > GetNumberOfReceiveAntennas ()) { /* failure. */ diff --git a/src/wifi/model/sta-wifi-mac.cc b/src/wifi/model/sta-wifi-mac.cc index 8ac8cd2de..26ee7b41b 100644 --- a/src/wifi/model/sta-wifi-mac.cc +++ b/src/wifi/model/sta-wifi-mac.cc @@ -547,7 +547,7 @@ StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) SetSlot (MicroSeconds (20)); } } - if (m_qosSupported) + if (m_qosSupported) { EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet (); //The value of the TXOP Limit field is specified as an unsigned integer, with the least significant octet transmitted first, in units of 32 μs. @@ -556,6 +556,16 @@ StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit())); SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit())); } + if (m_htSupported) + { + HtCapabilities htcapabilities = beacon.GetHtCapabilities (); + m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities); + } + if (m_vhtSupported) + { + VhtCapabilities vhtcapabilities = beacon.GetVhtCapabilities (); + m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities); + } m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled); m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ()); } diff --git a/src/wifi/model/yans-wifi-phy.cc b/src/wifi/model/yans-wifi-phy.cc index 6b0207e53..7c04bf949 100644 --- a/src/wifi/model/yans-wifi-phy.cc +++ b/src/wifi/model/yans-wifi-phy.cc @@ -271,6 +271,13 @@ YansWifiPhy::StartReceivePreambleAndHeader (Ptr packet, double rxPowerDb WifiPhyTag tag; packet->RemovePacketTag (tag); WifiTxVector txVector = tag.GetWifiTxVector (); + + if (txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT + && (txVector.GetNss () != (1 + (txVector.GetMode ().GetMcsValue () / 8)))) + { + NS_FATAL_ERROR ("MCS value does not match NSS value: MCS = " << (uint16_t)txVector.GetMode ().GetMcsValue () << ", NSS = " << (uint16_t)txVector.GetNss ()); + } + if (txVector.GetNss () > GetNumberOfReceiveAntennas ()) { /* failure. */ @@ -483,6 +490,11 @@ YansWifiPhy::SendPacket (Ptr packet, WifiTxVector txVector, WifiPr * - we are idle */ NS_ASSERT (!m_state->IsStateTx () && !m_state->IsStateSwitching ()); + + if (txVector.GetNss () > GetNumberOfTransmitAntennas ()) + { + NS_FATAL_ERROR ("Less TX antennas than number of spatial streams!"); + } if (m_state->IsStateSleep ()) {