src/devices/wifi/qsta-wifi-mac.cc
changeset 6065 0f012e7d9128
parent 5819 514ec98954ab
child 6068 a2127017ecb4
--- a/src/devices/wifi/qsta-wifi-mac.cc	Wed Jan 06 16:25:53 2010 +0100
+++ b/src/devices/wifi/qsta-wifi-mac.cc	Wed Jan 06 16:26:07 2010 +0100
@@ -23,6 +23,7 @@
 #include "ns3/simulator.h"
 #include "ns3/string.h"
 #include "ns3/pointer.h"
+#include "ns3/boolean.h"
 
 #include "qos-tag.h"
 #include "edca-txop-n.h"
@@ -649,13 +650,12 @@
               m_state = ASSOCIATED;
               NS_LOG_DEBUG ("assoc completed"); 
               SupportedRates rates = assocResp.GetSupportedRates ();
-              WifiRemoteStation *ap = m_stationManager->Lookup (hdr->GetAddr2 ());
               for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
                 {
                   WifiMode mode = m_phy->GetMode (i);
                   if (rates.IsSupportedRate (mode.GetDataRate ()))
                     {
-                      ap->AddSupportedMode (mode);
+                      m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
                       if (rates.IsBasicRate (mode.GetDataRate ()))
                         {
                           m_stationManager->AddBasicMode (mode);