View | Details | Raw Unified | Return to bug 2532
Collapse All | Expand All

(-)a/src/wifi/model/spectrum-wifi-phy.cc (-1 / +8 lines)
 Lines 398-405    Link Here 
398
      NS_FATAL_ERROR ("Received Wi-Fi Spectrum Signal with no WifiPhyTag");
398
      NS_FATAL_ERROR ("Received Wi-Fi Spectrum Signal with no WifiPhyTag");
399
      return;
399
      return;
400
    }
400
    }
401
    
402
  WifiTxVector txVector = tag.GetWifiTxVector ();
401
403
402
  WifiTxVector txVector = tag.GetWifiTxVector ();
404
  if (txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT
405
      && (txVector.GetNss () != (1 + (txVector.GetMode ().GetMcsValue () / 8))))
406
    {
407
      NS_FATAL_ERROR ("MCS value does not match NSS value: MCS = " << (uint16_t)txVector.GetMode ().GetMcsValue () << ", NSS = " << (uint16_t)txVector.GetNss ());
408
    }
409
403
  if (txVector.GetNss () > GetNumberOfReceiveAntennas ())
410
  if (txVector.GetNss () > GetNumberOfReceiveAntennas ())
404
    {
411
    {
405
      /* failure. */
412
      /* failure. */
(-)a/src/wifi/model/sta-wifi-mac.cc (-1 / +11 lines)
 Lines 547-553    Link Here 
547
                  SetSlot (MicroSeconds (20));
547
                  SetSlot (MicroSeconds (20));
548
                }
548
                }
549
            }
549
            }
550
            if (m_qosSupported)
550
          if (m_qosSupported)
551
            {
551
            {
552
              EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet ();
552
              EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet ();
553
              //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.
553
              //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.
 Lines 556-561    Link Here 
556
              SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
556
              SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
557
              SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
557
              SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
558
            }
558
            }
559
          if (m_htSupported)
560
            {
561
              HtCapabilities htcapabilities = beacon.GetHtCapabilities ();
562
              m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities);
563
            }
564
          if (m_vhtSupported)
565
            {
566
              VhtCapabilities vhtcapabilities = beacon.GetVhtCapabilities ();
567
              m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities);
568
            }
559
          m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled);
569
          m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled);
560
          m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
570
          m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
561
        }
571
        }
(-)a/src/wifi/model/yans-wifi-phy.cc (+12 lines)
 Lines 271-276    Link Here 
271
  WifiPhyTag tag;
271
  WifiPhyTag tag;
272
  packet->RemovePacketTag (tag);
272
  packet->RemovePacketTag (tag);
273
  WifiTxVector txVector = tag.GetWifiTxVector ();
273
  WifiTxVector txVector = tag.GetWifiTxVector ();
274
  
275
  if (txVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT
276
      && (txVector.GetNss () != (1 + (txVector.GetMode ().GetMcsValue () / 8))))
277
    {
278
      NS_FATAL_ERROR ("MCS value does not match NSS value: MCS = " << (uint16_t)txVector.GetMode ().GetMcsValue () << ", NSS = " << (uint16_t)txVector.GetNss ());
279
    }
280
  
274
  if (txVector.GetNss () > GetNumberOfReceiveAntennas ())
281
  if (txVector.GetNss () > GetNumberOfReceiveAntennas ())
275
    {
282
    {
276
      /* failure. */
283
      /* failure. */
 Lines 484-489    Link Here 
484
   *  - we are idle
491
   *  - we are idle
485
   */
492
   */
486
  NS_ASSERT (!m_state->IsStateTx () && !m_state->IsStateSwitching ());
493
  NS_ASSERT (!m_state->IsStateTx () && !m_state->IsStateSwitching ());
494
  
495
  if (txVector.GetNss () > GetNumberOfTransmitAntennas ())
496
    {
497
      NS_FATAL_ERROR ("Less TX antennas than number of spatial streams!");
498
    }
487
499
488
  if (m_state->IsStateSleep ())
500
  if (m_state->IsStateSleep ())
489
    {
501
    {

Return to bug 2532