--- a/src/devices/mesh/mesh-wifi-interface-mac.cc Wed Jan 06 16:25:53 2010 +0100
+++ b/src/devices/mesh/mesh-wifi-interface-mac.cc Wed Jan 06 16:26:07 2010 +0100
@@ -22,6 +22,7 @@
#include "ns3/mesh-wifi-interface-mac.h"
#include "ns3/mesh-wifi-beacon.h"
#include "ns3/log.h"
+#include "ns3/boolean.h"
#include "ns3/wifi-phy.h"
#include "ns3/dcf-manager.h"
#include "ns3/mac-rx-middle.h"
@@ -384,16 +385,15 @@
// Assert that address1 is set. Assert will fail e.g. if there is no installed routing plugin.
NS_ASSERT (hdr.GetAddr1 () != Mac48Address ());
// Queue frame
- WifiRemoteStation *destination = m_stationManager->Lookup (to);
- if (destination->IsBrandNew ())
+ if (m_stationManager->IsBrandNew (to))
{
// in adhoc mode, we assume that every destination
// supports all the rates we support.
for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
{
- destination->AddSupportedMode (m_phy->GetMode (i));
+ m_stationManager->AddSupportedMode (to, m_phy->GetMode (i));
}
- destination->RecordDisassociated ();
+ m_stationManager->RecordDisassociated (to);
}
//Classify: application sets a tag, which is removed here
// Get Qos tag:
@@ -592,14 +592,13 @@
if (beacon_hdr.GetSsid ().IsEqual (GetSsid ()))
{
SupportedRates rates = beacon_hdr.GetSupportedRates ();
- WifiRemoteStation * peerSta = 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 ()))
{
- peerSta->AddSupportedMode (mode);
+ m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
if (rates.IsBasicRate (mode.GetDataRate ()))
{
m_stationManager->AddBasicMode (mode);