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

(-)a/src/wifi/model/ap-wifi-mac.cc (-12 / +19 lines)
 Lines 954-981    Link Here 
954
                    }
954
                    }
955
                  if (m_htSupported)
955
                  if (m_htSupported)
956
                    {
956
                    {
957
                      HtCapabilities htcapabilities = assocReq.GetHtCapabilities ();
957
                      HtCapabilities htCapabilities = assocReq.GetHtCapabilities ();
958
                      m_stationManager->AddStationHtCapabilities (from, htcapabilities);
958
                      if (htCapabilities.IsSupportedMcs (0))
959
                      for (uint32_t j = 0; j < m_phy->GetNMcs (); j++)
960
                        {
959
                        {
961
                          WifiMode mcs = m_phy->GetMcs (j);
960
                          m_stationManager->AddStationHtCapabilities (from, htCapabilities);
962
                          if (mcs.GetModulationClass () == WIFI_MOD_CLASS_HT && htcapabilities.IsSupportedMcs (mcs.GetMcsValue ()))
961
                          for (uint32_t j = 0; j < m_phy->GetNMcs (); j++)
963
                            {
962
                            {
964
                              m_stationManager->AddSupportedMcs (from, mcs);
963
                              WifiMode mcs = m_phy->GetMcs (j);
964
                              if (mcs.GetModulationClass () == WIFI_MOD_CLASS_HT && htCapabilities.IsSupportedMcs (mcs.GetMcsValue ()))
965
                                {
966
                                  m_stationManager->AddSupportedMcs (from, mcs);
967
                                }
965
                            }
968
                            }
966
                        }
969
                        }
967
                    }
970
                    }
968
                  if (m_vhtSupported)
971
                  if (m_vhtSupported)
969
                    {
972
                    {
970
                      VhtCapabilities vhtCapabilities = assocReq.GetVhtCapabilities ();
973
                      VhtCapabilities vhtCapabilities = assocReq.GetVhtCapabilities ();
971
                      m_stationManager->AddStationVhtCapabilities (from, vhtCapabilities);
974
                      //we will always fill in RxHighestSupportedLgiDataRate field at TX, so this can be used to check whether it supports VHT
972
                      for (uint32_t i = 0; i < m_phy->GetNMcs (); i++)
975
                      if (vhtCapabilities.GetRxHighestSupportedLgiDataRate () > 0)
973
                        {
976
                        {
974
                          WifiMode mcs = m_phy->GetMcs (i);
977
                          m_stationManager->AddStationVhtCapabilities (from, vhtCapabilities);
975
                          if (mcs.GetModulationClass () == WIFI_MOD_CLASS_VHT && vhtCapabilities.IsSupportedTxMcs (mcs.GetMcsValue ()))
978
                          for (uint32_t i = 0; i < m_phy->GetNMcs (); i++)
976
                            {
979
                            {
977
                              m_stationManager->AddSupportedMcs (hdr->GetAddr2 (), mcs);
980
                              WifiMode mcs = m_phy->GetMcs (i);
978
                              //here should add a control to add basic MCS when it is implemented
981
                              if (mcs.GetModulationClass () == WIFI_MOD_CLASS_VHT && vhtCapabilities.IsSupportedTxMcs (mcs.GetMcsValue ()))
982
                                {
983
                                  m_stationManager->AddSupportedMcs (hdr->GetAddr2 (), mcs);
984
                                  //here should add a control to add basic MCS when it is implemented
985
                                }
979
                            }
986
                            }
980
                        }
987
                        }
981
                    }
988
                    }
(-)a/src/wifi/model/edca-parameter-set.cc (+6 lines)
 Lines 46-51    Link Here 
46
  m_qosSupported = qosSupported;
46
  m_qosSupported = qosSupported;
47
}
47
}
48
48
49
uint8_t
50
EdcaParameterSet::IsQosSupported (void) const
51
{
52
  return ((m_acBE != 0) || (m_acBK != 0) || (m_acVI != 0) || (m_acVO!= 0));
53
}
54
49
void
55
void
50
EdcaParameterSet::SetQosInfo (uint8_t qosInfo)
56
EdcaParameterSet::SetQosInfo (uint8_t qosInfo)
51
{
57
{
(-)a/src/wifi/model/edca-parameter-set.h (+1 lines)
 Lines 36-41    Link Here 
36
public:
36
public:
37
  EdcaParameterSet ();
37
  EdcaParameterSet ();
38
  void SetQosSupported (uint8_t qosSupported);
38
  void SetQosSupported (uint8_t qosSupported);
39
  uint8_t IsQosSupported (void) const;
39
  
40
  
40
  /**
41
  /**
41
   * Set the QoS Info field in the EdcaParameterSet information element.
42
   * Set the QoS Info field in the EdcaParameterSet information element.
(-)a/src/wifi/model/edca-txop-n.cc (+1 lines)
 Lines 523-528    Link Here 
523
              return;
523
              return;
524
            }
524
            }
525
          if (m_currentHdr.IsQosData () && !m_currentHdr.GetAddr1 ().IsBroadcast ()
525
          if (m_currentHdr.IsQosData () && !m_currentHdr.GetAddr1 ().IsBroadcast ()
526
              && m_stationManager->GetQosSupported (m_currentHdr.GetAddr1 ())
526
              && !m_baManager->ExistsAgreement (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ())
527
              && !m_baManager->ExistsAgreement (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ())
527
              && SetupBlockAckIfNeeded ())
528
              && SetupBlockAckIfNeeded ())
528
            {
529
            {
(-)a/src/wifi/model/ht-capabilities.cc (-3 / +6 lines)
 Lines 591-601    Link Here 
591
std::ostream &
591
std::ostream &
592
operator << (std::ostream &os, const HtCapabilities &htcapabilities)
592
operator << (std::ostream &os, const HtCapabilities &htcapabilities)
593
{
593
{
594
  os <<  bool (htcapabilities.GetLdpc ())
594
  os << bool (htcapabilities.GetLdpc ())
595
     << "|" << bool (htcapabilities.GetSupportedChannelWidth ())
595
     << "|" << bool (htcapabilities.GetSupportedChannelWidth ())
596
     << "|" << bool (htcapabilities.GetGreenfield ())
596
     << "|" << bool (htcapabilities.GetGreenfield ())
597
     << "|" << bool (htcapabilities.GetShortGuardInterval20 ());
597
     << "|" << bool (htcapabilities.GetShortGuardInterval20 ()) << "|";
598
598
  for (uint32_t k = 0; k < MAX_SUPPORTED_MCS; k++)
599
    {
600
      os << htcapabilities.IsSupportedMcs (k) << " ";
601
    }
599
  return os;
602
  return os;
600
}
603
}
601
604
(-)a/src/wifi/model/regular-wifi-mac.cc (+16 lines)
 Lines 144-149    Link Here 
144
  if (m_htSupported)
144
  if (m_htSupported)
145
    {
145
    {
146
      capabilities.SetHtSupported (1);
146
      capabilities.SetHtSupported (1);
147
      capabilities.SetHtSupported (1);
147
      capabilities.SetLdpc (m_phy->GetLdpc ());
148
      capabilities.SetLdpc (m_phy->GetLdpc ());
148
      capabilities.SetSupportedChannelWidth (m_phy->GetChannelWidth () == 40);
149
      capabilities.SetSupportedChannelWidth (m_phy->GetChannelWidth () == 40);
149
      capabilities.SetShortGuardInterval20 (m_phy->GetGuardInterval ());
150
      capabilities.SetShortGuardInterval20 (m_phy->GetGuardInterval ());
 Lines 216-221    Link Here 
216
        {
217
        {
217
          capabilities.SetTxMcsMap (maxMcs, nss);
218
          capabilities.SetTxMcsMap (maxMcs, nss);
218
        }
219
        }
220
      uint64_t maxSupportedRateLGI = 0; //in bit/s
221
      for (uint8_t i = 0; i < m_phy->GetNMcs (); i++)
222
        {
223
          WifiMode mcs = m_phy->GetMcs (i);
224
          if (mcs.GetModulationClass () != WIFI_MOD_CLASS_VHT || !mcs.IsAllowed (m_phy->GetChannelWidth (), 1))
225
            {
226
              continue;
227
            }
228
          if (mcs.GetDataRate (m_phy->GetChannelWidth ()) > maxSupportedRateLGI)
229
            {
230
              maxSupportedRateLGI = mcs.GetDataRate (m_phy->GetChannelWidth ());
231
              NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
232
            }
233
        }
234
      capabilities.SetRxHighestSupportedLgiDataRate (maxSupportedRateLGI / 1e6); //in Mbit/s
219
    }
235
    }
220
  return capabilities;
236
  return capabilities;
221
}
237
}
(-)a/src/wifi/model/sta-wifi-mac.cc (-20 / +54 lines)
 Lines 535-556    Link Here 
535
            }
535
            }
536
          if (m_qosSupported)
536
          if (m_qosSupported)
537
            {
537
            {
538
              bool qosSupported = false;
538
              EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet ();
539
              EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet ();
539
              //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.
540
              if (edcaParameters.IsQosSupported ())
540
              SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit()));
541
                {
541
              SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit()));
542
                  qosSupported = true;
542
              SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
543
                  //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.
543
              SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
544
                  SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit()));
545
                  SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit()));
546
                  SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
547
                  SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
548
                }
549
              m_stationManager->SetQosSupport (hdr->GetAddr2 (), qosSupported);
544
            }
550
            }
545
          if (m_htSupported)
551
          if (m_htSupported)
546
            {
552
            {
547
              HtCapabilities htcapabilities = beacon.GetHtCapabilities ();
553
              HtCapabilities htCapabilities = beacon.GetHtCapabilities ();
548
              m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities);
554
              if (!htCapabilities.IsSupportedMcs (0))
555
                {
556
                  m_stationManager->RemoveAllSupportedMcs (hdr->GetAddr2 ());
557
                }
558
              else
559
                {
560
                  m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htCapabilities);
561
                }
549
            }
562
            }
550
          if (m_vhtSupported)
563
          if (m_vhtSupported)
551
            {
564
            {
552
              VhtCapabilities vhtcapabilities = beacon.GetVhtCapabilities ();
565
              VhtCapabilities vhtCapabilities = beacon.GetVhtCapabilities ();
553
              m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities);
566
              //we will always fill in RxHighestSupportedLgiDataRate field at TX, so this can be used to check whether it supports VHT
567
              if (vhtCapabilities.GetRxHighestSupportedLgiDataRate () > 0)
568
                {
569
                  m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtCapabilities);
570
                }
554
            }
571
            }
555
          m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled);
572
          m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled);
556
          m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
573
          m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
 Lines 702-725    Link Here 
702
              m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
719
              m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ());
703
              if (m_qosSupported)
720
              if (m_qosSupported)
704
                {
721
                {
722
                  bool qosSupported = false;
705
                  EdcaParameterSet edcaParameters = assocResp.GetEdcaParameterSet ();
723
                  EdcaParameterSet edcaParameters = assocResp.GetEdcaParameterSet ();
706
                  //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.
724
                  if (edcaParameters.IsQosSupported ())
707
                  SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit()));
725
                    {
708
                  SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit()));
726
                      qosSupported = true;
709
                  SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
727
                      //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.
710
                  SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
728
                      SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit()));
729
                      SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit()));
730
                      SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit()));
731
                      SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit()));
732
                    }
733
                  m_stationManager->SetQosSupport (hdr->GetAddr2 (), qosSupported);
711
                }
734
                }
712
              if (m_htSupported)
735
              if (m_htSupported)
713
                {
736
                {
714
                  HtCapabilities htcapabilities = assocResp.GetHtCapabilities ();
737
                  HtCapabilities htCapabilities = assocResp.GetHtCapabilities ();
715
                  HtOperation htOperation = assocResp.GetHtOperation ();
738
                  if (!htCapabilities.IsSupportedMcs (0))
716
                  m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities);
739
                    {
740
                      m_stationManager->RemoveAllSupportedMcs (hdr->GetAddr2 ());
741
                    }
742
                  else
743
                    {
744
                      m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htCapabilities);
745
                      HtOperation htOperation = assocResp.GetHtOperation ();
746
                    }
717
                }
747
                }
718
              if (m_vhtSupported)
748
              if (m_vhtSupported)
719
                {
749
                {
720
                  VhtCapabilities vhtcapabilities = assocResp.GetVhtCapabilities ();
750
                  VhtCapabilities vhtCapabilities = assocResp.GetVhtCapabilities ();
721
                  VhtOperation vhtOperation = assocResp.GetVhtOperation ();
751
                  //we will always fill in RxHighestSupportedLgiDataRate field at TX, so this can be used to check whether it supports VHT
722
                  m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities);
752
                  if (vhtCapabilities.GetRxHighestSupportedLgiDataRate () > 0)
753
                    {
754
                      m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtCapabilities);
755
                      VhtOperation vhtOperation = assocResp.GetVhtOperation ();
756
                    }
723
                }
757
                }
724
758
725
              for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
759
              for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
(-)a/src/wifi/model/wifi-mode.cc (-6 / +26 lines)
 Lines 68-73    Link Here 
68
  return is;
68
  return is;
69
}
69
}
70
70
71
bool
72
WifiMode::IsAllowed (uint8_t channelWidth, uint8_t nss) const
73
{
74
  WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid);
75
  if (item->modClass == WIFI_MOD_CLASS_VHT)
76
    {
77
      if (item->mcsValue == 9 && channelWidth == 20 && nss != 3)
78
        {
79
          return false;
80
        }
81
      if (item->mcsValue == 6 && channelWidth == 80 && nss == 3)
82
        {
83
          return false;
84
        }
85
    }
86
  else
87
    {
88
      //We should not go here!
89
      NS_ASSERT (false);
90
      return false;
91
    }
92
  return true;
93
}
94
71
uint64_t
95
uint64_t
72
WifiMode::GetPhyRate (uint8_t channelWidth, bool isShortGuardInterval, uint8_t nss) const
96
WifiMode::GetPhyRate (uint8_t channelWidth, bool isShortGuardInterval, uint8_t nss) const
73
{
97
{
 Lines 172-184    Link Here 
172
    }
196
    }
173
  else if (item->modClass == WIFI_MOD_CLASS_HT || item->modClass == WIFI_MOD_CLASS_VHT)
197
  else if (item->modClass == WIFI_MOD_CLASS_HT || item->modClass == WIFI_MOD_CLASS_VHT)
174
    {
198
    {
175
      if (item->modClass == WIFI_MOD_CLASS_VHT && item->mcsValue == 9 && nss != 3)
199
      if (item->modClass == WIFI_MOD_CLASS_VHT)
176
        {
200
        {
177
          NS_ASSERT_MSG (channelWidth != 20, "VHT MCS 9 forbidden at 20 MHz (only allowed when NSS = 3)");
201
          NS_ASSERT_MSG (IsAllowed (channelWidth, nss), "VHT MCS "<< (uint16_t)item->mcsValue << " forbidden at "<< (uint16_t)channelWidth << " MHz when NSS is " << (uint16_t)nss);
178
        }
179
      if (item->modClass == WIFI_MOD_CLASS_VHT && item->mcsValue == 6 && nss == 3)
180
        {
181
          NS_ASSERT_MSG (channelWidth != 80, "VHT MCS 6 forbidden at 80 MHz when NSS = 3");
182
        }
202
        }
183
203
184
      if (!isShortGuardInterval)
204
      if (!isShortGuardInterval)
(-)a/src/wifi/model/wifi-mode.h (+7 lines)
 Lines 96-101    Link Here 
96
{
96
{
97
public:
97
public:
98
  /**
98
  /**
99
   * \returns true if this <MCS, channel width, NSS> combination is allowed, false otherwise.
100
   *
101
   * \param channelWidth the considered channel width in MHz
102
   * \param nss the considered number of streams
103
   */
104
  bool IsAllowed (uint8_t channelWidth, uint8_t nss) const;
105
  /**
99
   *
106
   *
100
   * \param channelWidth the considered channel width in MHz
107
   * \param channelWidth the considered channel width in MHz
101
   * \param isShortGuardInterval whether short guard interval is considered or not
108
   * \param isShortGuardInterval whether short guard interval is considered or not
(-)a/src/wifi/model/wifi-remote-station-manager.cc (-1 / +46 lines)
 Lines 352-358    Link Here 
352
}
352
}
353
353
354
WifiRemoteStationManager::WifiRemoteStationManager ()
354
WifiRemoteStationManager::WifiRemoteStationManager ()
355
  : m_htSupported (false),
355
  : m_qosSupported (false),
356
    m_htSupported (false),
356
    m_vhtSupported (false),
357
    m_vhtSupported (false),
357
    m_useNonErpProtection (false),
358
    m_useNonErpProtection (false),
358
    m_shortPreambleEnabled (false),
359
    m_shortPreambleEnabled (false),
 Lines 406-411    Link Here 
406
}
407
}
407
408
408
void
409
void
410
WifiRemoteStationManager::SetQosSupported (bool enable)
411
{
412
  m_qosSupported = enable;
413
}
414
415
void
409
WifiRemoteStationManager::SetHtSupported (bool enable)
416
WifiRemoteStationManager::SetHtSupported (bool enable)
410
{
417
{
411
  m_htSupported = enable;
418
  m_htSupported = enable;
 Lines 472-477    Link Here 
472
}
479
}
473
480
474
bool
481
bool
482
WifiRemoteStationManager::HasQosSupported (void) const
483
{
484
  return m_qosSupported;
485
}
486
487
bool
475
WifiRemoteStationManager::HasHtSupported (void) const
488
WifiRemoteStationManager::HasHtSupported (void) const
476
{
489
{
477
  return m_htSupported;
490
  return m_htSupported;
 Lines 591-596    Link Here 
591
}
604
}
592
605
593
void
606
void
607
WifiRemoteStationManager::RemoveAllSupportedMcs (Mac48Address address)
608
{
609
  NS_LOG_FUNCTION (this << address);
610
  NS_ASSERT (!address.IsGroup ());
611
  WifiRemoteStationState *state = LookupState (address);
612
  state->m_operationalMcsSet.clear ();
613
}
614
615
void
594
WifiRemoteStationManager::AddSupportedMcs (Mac48Address address, WifiMode mcs)
616
WifiRemoteStationManager::AddSupportedMcs (Mac48Address address, WifiMode mcs)
595
{
617
{
596
  NS_LOG_FUNCTION (this << address << mcs);
618
  NS_LOG_FUNCTION (this << address << mcs);
 Lines 620-625    Link Here 
620
}
642
}
621
643
622
bool
644
bool
645
WifiRemoteStationManager::GetQosSupported (Mac48Address address) const
646
{
647
  return LookupState (address)->m_qosSupported;
648
}
649
650
bool
623
WifiRemoteStationManager::IsBrandNew (Mac48Address address) const
651
WifiRemoteStationManager::IsBrandNew (Mac48Address address) const
624
{
652
{
625
  if (address.IsGroup ())
653
  if (address.IsGroup ())
 Lines 1490-1495    Link Here 
1490
  state->m_ness = 0;
1518
  state->m_ness = 0;
1491
  state->m_aggregation = false;
1519
  state->m_aggregation = false;
1492
  state->m_stbc = false;
1520
  state->m_stbc = false;
1521
  state->m_qosSupported = false;
1493
  state->m_htSupported = false;
1522
  state->m_htSupported = false;
1494
  state->m_vhtSupported = false;
1523
  state->m_vhtSupported = false;
1495
  const_cast<WifiRemoteStationManager *> (this)->m_states.push_back (state);
1524
  const_cast<WifiRemoteStationManager *> (this)->m_states.push_back (state);
 Lines 1536-1541    Link Here 
1536
}
1565
}
1537
1566
1538
void
1567
void
1568
WifiRemoteStationManager::SetQosSupport (Mac48Address from, bool qosSupported)
1569
{
1570
  NS_LOG_FUNCTION (this << from << qosSupported);
1571
  WifiRemoteStationState *state;
1572
  state = LookupState (from);
1573
  state->m_qosSupported = qosSupported;
1574
}
1575
1576
void
1539
WifiRemoteStationManager::AddStationHtCapabilities (Mac48Address from, HtCapabilities htCapabilities)
1577
WifiRemoteStationManager::AddStationHtCapabilities (Mac48Address from, HtCapabilities htCapabilities)
1540
{
1578
{
1541
  //Used by all stations to record HT capabilities of remote stations
1579
  //Used by all stations to record HT capabilities of remote stations
 Lines 1552-1557    Link Here 
1552
      state->m_channelWidth = 20;
1590
      state->m_channelWidth = 20;
1553
    }
1591
    }
1554
  state->m_htSupported = true;
1592
  state->m_htSupported = true;
1593
  SetQosSupport (from, true);
1555
  state->m_greenfield = htCapabilities.GetGreenfield ();
1594
  state->m_greenfield = htCapabilities.GetGreenfield ();
1556
  state->m_streams = htCapabilities.GetRxHighestSupportedAntennas ();
1595
  state->m_streams = htCapabilities.GetRxHighestSupportedAntennas ();
1557
}
1596
}
 Lines 1880-1885    Link Here 
1880
}
1919
}
1881
1920
1882
bool
1921
bool
1922
WifiRemoteStationManager::GetQosSupported (const WifiRemoteStation *station) const
1923
{
1924
  return station->m_state->m_qosSupported;
1925
}
1926
1927
bool
1883
WifiRemoteStationManager::GetHtSupported (const WifiRemoteStation *station) const
1928
WifiRemoteStationManager::GetHtSupported (const WifiRemoteStation *station) const
1884
{
1929
{
1885
  return station->m_state->m_htSupported;
1930
  return station->m_state->m_htSupported;
(-)a/src/wifi/model/wifi-remote-station-manager.h (+45 lines)
 Lines 165-170    Link Here 
165
   */
165
   */
166
  void UpdateFragmentationThreshold (void);
166
  void UpdateFragmentationThreshold (void);
167
  /**
167
  /**
168
   * Records QoS support of the remote station.
169
   *
170
   * \param from the address of the station being recorded
171
   * \param qosSupported whether the station supports QoS
172
   */
173
  void SetQosSupport (Mac48Address from, bool qosSupported);
174
  /**
168
   * Records HT capabilities of the remote station.
175
   * Records HT capabilities of the remote station.
169
   *
176
   *
170
   * \param from the address of the station being recorded
177
   * \param from the address of the station being recorded
 Lines 179-184    Link Here 
179
   */
186
   */
180
  void AddStationVhtCapabilities (Mac48Address from,VhtCapabilities vhtcapabilities);
187
  void AddStationVhtCapabilities (Mac48Address from,VhtCapabilities vhtcapabilities);
181
  /**
188
  /**
189
   * Enable or disable QoS support.
190
   *
191
   * \param enable enable or disable QoS support
192
   */
193
  virtual void SetQosSupported (bool enable);
194
  /**
195
   * Return whether the device has QoS support enabled.
196
   *
197
   * \return true if QoS support is enabled, false otherwise
198
   */
199
  bool HasQosSupported (void) const;
200
  /**
182
   * Enable or disable HT capability support.
201
   * Enable or disable HT capability support.
183
   *
202
   *
184
   * \param enable enable or disable HT capability support
203
   * \param enable enable or disable HT capability support
 Lines 329-334    Link Here 
329
   */
348
   */
330
  bool GetShortSlotTimeSupported (Mac48Address address) const;
349
  bool GetShortSlotTimeSupported (Mac48Address address) const;
331
  /**
350
  /**
351
   * Return whether the given station is QoS capable.
352
   *
353
   * \param address the address of the station
354
   *
355
   * \return true if the station has QoS capabilities,
356
   *         false otherwise
357
   */
358
  bool GetQosSupported (Mac48Address address) const;
359
  /**
332
   * Add a given Modulation and Coding Scheme (MCS) index to
360
   * Add a given Modulation and Coding Scheme (MCS) index to
333
   * the set of basic MCS.
361
   * the set of basic MCS.
334
   *
362
   *
 Lines 422-427    Link Here 
422
   */
450
   */
423
  void AddAllSupportedMcs (Mac48Address address);
451
  void AddAllSupportedMcs (Mac48Address address);
424
  /**
452
  /**
453
   * Invoked in a STA or AP to delete all of the suppported MCS by a destination.
454
   *
455
   * \param address the address of the station being recorded
456
   */
457
  void RemoveAllSupportedMcs (Mac48Address address);
458
  /**
425
   * Record whether the short PLCP preamble is supported by the station.
459
   * Record whether the short PLCP preamble is supported by the station.
426
   *
460
   *
427
   * \param address the address of the station
461
   * \param address the address of the station
 Lines 788-793    Link Here 
788
   */
822
   */
789
  uint32_t GetNSupported (const WifiRemoteStation *station) const;
823
  uint32_t GetNSupported (const WifiRemoteStation *station) const;
790
  /**
824
  /**
825
   * Return whether the given station is QoS capable.
826
   *
827
   * \param station the station being queried
828
   *
829
   * \return true if the station has QoS capabilities,
830
   *         false otherwise
831
   */
832
  bool GetQosSupported (const WifiRemoteStation *station) const;
833
  /**
791
   * Return whether the given station is HT capable.
834
   * Return whether the given station is HT capable.
792
   *
835
   *
793
   * \param station the station being queried
836
   * \param station the station being queried
 Lines 1254-1259    Link Here 
1254
  WifiMode m_defaultTxMode; //!< The default transmission mode
1297
  WifiMode m_defaultTxMode; //!< The default transmission mode
1255
  WifiMode m_defaultTxMcs;   //!< The default transmission modulation-coding scheme (MCS)
1298
  WifiMode m_defaultTxMcs;   //!< The default transmission modulation-coding scheme (MCS)
1256
1299
1300
  bool m_qosSupported;  //!< Flag if HT capability is supported
1257
  bool m_htSupported;  //!< Flag if HT capability is supported
1301
  bool m_htSupported;  //!< Flag if HT capability is supported
1258
  bool m_vhtSupported; //!< Flag if VHT capability is supported
1302
  bool m_vhtSupported; //!< Flag if VHT capability is supported
1259
  uint32_t m_maxSsrc;  //!< Maximum STA short retry count (SSRC)
1303
  uint32_t m_maxSsrc;  //!< Maximum STA short retry count (SSRC)
 Lines 1327-1332    Link Here 
1327
  bool m_greenfield;          //!< Flag if greenfield is supported by the remote station
1371
  bool m_greenfield;          //!< Flag if greenfield is supported by the remote station
1328
  bool m_shortPreamble;       //!< Flag if short PLCP preamble is supported by the remote station
1372
  bool m_shortPreamble;       //!< Flag if short PLCP preamble is supported by the remote station
1329
  bool m_shortSlotTime;       //!< Flag if short ERP slot time is supported by the remote station
1373
  bool m_shortSlotTime;       //!< Flag if short ERP slot time is supported by the remote station
1374
  bool m_qosSupported;         //!< Flag if HT is supported by the station
1330
  bool m_htSupported;         //!< Flag if HT is supported by the station
1375
  bool m_htSupported;         //!< Flag if HT is supported by the station
1331
  bool m_vhtSupported;        //!< Flag if VHT is supported by the station
1376
  bool m_vhtSupported;        //!< Flag if VHT is supported by the station
1332
};
1377
};

Return to bug 2605