Fixed review comments
authorKirill Andreev <andreev@iitp.ru>
Thu, 16 Jul 2009 17:57:23 +0400
changeset 5123 bdd3ae2a9816
parent 5122 0326727af888
child 5124 e206046b2e44
Fixed review comments
src/devices/mesh/mesh-wifi-interface-mac.cc
src/devices/mesh/mesh-wifi-interface-mac.h
src/helper/mesh-helper.cc
--- a/src/devices/mesh/mesh-wifi-interface-mac.cc	Thu Jul 16 11:51:46 2009 +0400
+++ b/src/devices/mesh/mesh-wifi-interface-mac.cc	Thu Jul 16 17:57:23 2009 +0400
@@ -303,20 +303,6 @@
 //-----------------------------------------------------------------------------
 // Switch channels
 //-----------------------------------------------------------------------------
-bool MeshWifiInterfaceMac::CanSwitchChannel () const
-{
-  NS_LOG_FUNCTION (this);
-
-  // now only YansWifiPhy can switch channels runtime
-  if (m_phy != 0)
-    {
-      Ptr<YansWifiPhy> phy = m_phy->GetObject<YansWifiPhy> ();
-      return (phy != 0);
-    }
-  else
-    return false;
-}
-
 uint16_t MeshWifiInterfaceMac::GetFrequencyChannel () const
 {
   NS_LOG_FUNCTION (this);
@@ -344,8 +330,6 @@
    *
    * Now we use dirty channel switch -- just change frequency
    */
-  NS_ASSERT(CanSwitchChannel());
-
   Ptr<YansWifiPhy> phy = m_phy->GetObject<YansWifiPhy> ();
   phy->SetChannelNumber (new_id);
   // Don't know NAV on new channel
--- a/src/devices/mesh/mesh-wifi-interface-mac.h	Thu Jul 16 11:51:46 2009 +0400
+++ b/src/devices/mesh/mesh-wifi-interface-mac.h	Thu Jul 16 17:57:23 2009 +0400
@@ -135,8 +135,6 @@
    * 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
--- a/src/helper/mesh-helper.cc	Thu Jul 16 11:51:46 2009 +0400
+++ b/src/helper/mesh-helper.cc	Thu Jul 16 17:57:23 2009 +0400
@@ -39,7 +39,6 @@
 MeshHelper::SetStackInstaller (std::string type)
 {
   NS_LOG_FUNCTION (this << type);
-  m_stackFactory = ObjectFactory ();
   m_stackFactory.SetTypeId (type);
   m_stack = m_stackFactory.Create<MeshStack> ();
   if (m_stack == 0)