diff --git a/src/devices/mesh/mesh-wifi-interface-mac.cc b/src/devices/mesh/mesh-wifi-interface-mac.cc index b0601a845..01eb9b313 100644 --- a/src/devices/mesh/mesh-wifi-interface-mac.cc +++ b/src/devices/mesh/mesh-wifi-interface-mac.cc @@ -303,20 +303,6 @@ MeshWifiInterfaceMac::InstallPlugin ( Ptr plugin) //----------------------------------------------------------------------------- // Switch channels //----------------------------------------------------------------------------- -bool MeshWifiInterfaceMac::CanSwitchChannel () const -{ - NS_LOG_FUNCTION (this); - - // now only YansWifiPhy can switch channels runtime - if (m_phy != 0) - { - Ptr phy = m_phy->GetObject (); - return (phy != 0); - } - else - return false; -} - uint16_t MeshWifiInterfaceMac::GetFrequencyChannel () const { NS_LOG_FUNCTION (this); @@ -344,8 +330,6 @@ void MeshWifiInterfaceMac::SwitchFrequencyChannel (uint16_t new_id) * * Now we use dirty channel switch -- just change frequency */ - NS_ASSERT(CanSwitchChannel()); - Ptr phy = m_phy->GetObject (); phy->SetChannelNumber (new_id); // Don't know NAV on new channel diff --git a/src/devices/mesh/mesh-wifi-interface-mac.h b/src/devices/mesh/mesh-wifi-interface-mac.h index a0b0db406..7e46f71b5 100644 --- a/src/devices/mesh/mesh-wifi-interface-mac.h +++ b/src/devices/mesh/mesh-wifi-interface-mac.h @@ -135,8 +135,6 @@ public: * Number of channels to use must be limited elsewhere. */ //\{ - /// Return true if PHY layer can switch channels - bool CanSwitchChannel () const; /// Current channel Id uint16_t GetFrequencyChannel () const; /// Switch channel diff --git a/src/helper/mesh-helper.cc b/src/helper/mesh-helper.cc index 19ef09b11..ad8b8aade 100644 --- a/src/helper/mesh-helper.cc +++ b/src/helper/mesh-helper.cc @@ -39,7 +39,6 @@ void MeshHelper::SetStackInstaller (std::string type) { NS_LOG_FUNCTION (this << type); - m_stackFactory = ObjectFactory (); m_stackFactory.SetTypeId (type); m_stack = m_stackFactory.Create (); if (m_stack == 0)