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

(-)a/src/wave/model/ocb-wifi-mac.cc (-2 / +28 lines)
 Lines 160-167    Link Here 
160
  NS_LOG_FUNCTION (this << packet << to);
160
  NS_LOG_FUNCTION (this << packet << to);
161
  if (m_stationManager->IsBrandNew (to))
161
  if (m_stationManager->IsBrandNew (to))
162
    {
162
    {
163
      // In ocb mode, we assume that every destination supports all
163
      //In ad hoc mode, we assume that every destination supports all
164
      // the rates we support.
164
      //the rates we support.
165
      if (m_htSupported || m_vhtSupported)
166
        {
167
          m_stationManager->AddAllSupportedMcs (to);
168
          m_stationManager->AddStationHtCapabilities (to, GetHtCapabilities());
169
        }
170
      if (m_vhtSupported)
171
        {
172
          m_stationManager->AddStationVhtCapabilities (to, GetVhtCapabilities());
173
        }
165
      m_stationManager->AddAllSupportedModes (to);
174
      m_stationManager->AddAllSupportedModes (to);
166
      m_stationManager->RecordDisassociated (to);
175
      m_stationManager->RecordDisassociated (to);
167
    }
176
    }
 Lines 237-242    Link Here 
237
  Mac48Address from = hdr->GetAddr2 ();
246
  Mac48Address from = hdr->GetAddr2 ();
238
  Mac48Address to = hdr->GetAddr1 ();
247
  Mac48Address to = hdr->GetAddr1 ();
239
248
249
  if (m_stationManager->IsBrandNew (from))
250
    {
251
      //In ad hoc mode, we assume that every destination supports all
252
      //the rates we support.
253
      if (m_htSupported || m_vhtSupported)
254
        {
255
          m_stationManager->AddAllSupportedMcs (from);
256
          m_stationManager->AddStationHtCapabilities (from, GetHtCapabilities());
257
        }
258
      if (m_vhtSupported)
259
        {
260
          m_stationManager->AddStationVhtCapabilities (from, GetVhtCapabilities());
261
        }
262
      m_stationManager->AddAllSupportedModes (from);
263
      m_stationManager->RecordDisassociated (from);
264
    }
265
240
  if (hdr->IsData ())
266
  if (hdr->IsData ())
241
    {
267
    {
242
      if (hdr->IsQosData () && hdr->IsQosAmsdu ())
268
      if (hdr->IsQosData () && hdr->IsQosAmsdu ())
(-)a/src/wifi/model/adhoc-wifi-mac.cc (+16 lines)
 Lines 178-183    Link Here 
178
  NS_ASSERT (!hdr->IsCtl ());
178
  NS_ASSERT (!hdr->IsCtl ());
179
  Mac48Address from = hdr->GetAddr2 ();
179
  Mac48Address from = hdr->GetAddr2 ();
180
  Mac48Address to = hdr->GetAddr1 ();
180
  Mac48Address to = hdr->GetAddr1 ();
181
  if (m_stationManager->IsBrandNew (from))
182
    {
183
      //In ad hoc mode, we assume that every destination supports all
184
      //the rates we support.
185
      if (m_htSupported || m_vhtSupported)
186
        {
187
          m_stationManager->AddAllSupportedMcs (from);
188
          m_stationManager->AddStationHtCapabilities (from, GetHtCapabilities());
189
        }
190
      if (m_vhtSupported)
191
        {
192
          m_stationManager->AddStationVhtCapabilities (from, GetVhtCapabilities());
193
        }
194
      m_stationManager->AddAllSupportedModes (from);
195
      m_stationManager->RecordDisassociated (from);
196
    }
181
  if (hdr->IsData ())
197
  if (hdr->IsData ())
182
    {
198
    {
183
      if (hdr->IsQosData () && hdr->IsQosAmsdu ())
199
      if (hdr->IsQosData () && hdr->IsQosAmsdu ())
(-)a/src/wifi/model/wifi-remote-station-manager.cc (+6 lines)
 Lines 569-586    Link Here 
569
void
569
void
570
WifiRemoteStationManager::AddAllSupportedModes (Mac48Address address)
570
WifiRemoteStationManager::AddAllSupportedModes (Mac48Address address)
571
{
571
{
572
  NS_LOG_FUNCTION (this << address);
572
  NS_ASSERT (!address.IsGroup ());
573
  NS_ASSERT (!address.IsGroup ());
573
  WifiRemoteStationState *state = LookupState (address);
574
  WifiRemoteStationState *state = LookupState (address);
574
  state->m_operationalRateSet.clear ();
575
  state->m_operationalRateSet.clear ();
575
  for (uint32_t i = 0; i < m_wifiPhy->GetNModes (); i++)
576
  for (uint32_t i = 0; i < m_wifiPhy->GetNModes (); i++)
576
    {
577
    {
577
      state->m_operationalRateSet.push_back (m_wifiPhy->GetMode (i));
578
      state->m_operationalRateSet.push_back (m_wifiPhy->GetMode (i));
579
      if (m_wifiPhy->GetMode (i).IsMandatory ())
580
        {
581
          AddBasicMode (m_wifiPhy->GetMode (i));
582
        }
578
    }
583
    }
579
}
584
}
580
585
581
void
586
void
582
WifiRemoteStationManager::AddAllSupportedMcs (Mac48Address address)
587
WifiRemoteStationManager::AddAllSupportedMcs (Mac48Address address)
583
{
588
{
589
  NS_LOG_FUNCTION (this << address);
584
  NS_ASSERT (!address.IsGroup ());
590
  NS_ASSERT (!address.IsGroup ());
585
  WifiRemoteStationState *state = LookupState (address);
591
  WifiRemoteStationState *state = LookupState (address);
586
  state->m_operationalMcsSet.clear ();
592
  state->m_operationalMcsSet.clear ();

Return to bug 2406