mesh: Enable operation with SpectrumWifiPhy

This commit is contained in:
Tom Henderson
2020-08-17 08:57:48 -07:00
parent b12ac52109
commit bb0ec5258f
2 changed files with 4 additions and 12 deletions

View File

@@ -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
============

View File

@@ -176,17 +176,9 @@ MeshWifiInterfaceMac::GetFrequencyChannel () const
{
NS_LOG_FUNCTION (this);
NS_ASSERT (m_phy != 0); // need PHY to set/get channel
Ptr<YansWifiPhy> phy = m_phy->GetObject<YansWifiPhy> ();
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<YansWifiPhy> phy = m_phy->GetObject<YansWifiPhy> ();
phy->SetChannelNumber (new_id);
m_phy->SetChannelNumber (new_id);
// Don't know NAV on new channel
m_channelAccessManager->NotifyNavResetNow (Seconds (0));
}