diff --git a/RELEASE_NOTES b/RELEASE_NOTES index ec50c4871..e91615585 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -26,6 +26,7 @@ New user-visible features Bugs fixed ---------- - (traffic-control) #225 - Do not mark packet twice within a CoDel queue +- (mesh) - Enable possible use with SpectrumWifiPhy Release 3.31 ============ diff --git a/src/mesh/model/mesh-wifi-interface-mac.cc b/src/mesh/model/mesh-wifi-interface-mac.cc index 8ea0159a0..b422eee02 100644 --- a/src/mesh/model/mesh-wifi-interface-mac.cc +++ b/src/mesh/model/mesh-wifi-interface-mac.cc @@ -176,17 +176,9 @@ MeshWifiInterfaceMac::GetFrequencyChannel () const { NS_LOG_FUNCTION (this); NS_ASSERT (m_phy != 0); // need PHY to set/get channel - - Ptr phy = m_phy->GetObject (); - if (phy != 0) - { - return phy->GetChannelNumber (); - } - else - { - return 0; - } + return m_phy->GetChannelNumber (); } + void MeshWifiInterfaceMac::SwitchFrequencyChannel (uint16_t new_id) { @@ -203,8 +195,7 @@ MeshWifiInterfaceMac::SwitchFrequencyChannel (uint16_t new_id) * * Now we use dirty channel switch -- just change frequency */ - Ptr phy = m_phy->GetObject (); - phy->SetChannelNumber (new_id); + m_phy->SetChannelNumber (new_id); // Don't know NAV on new channel m_channelAccessManager->NotifyNavResetNow (Seconds (0)); }