wifi: Reduce code duplication in SpectrumWifiPhyHelper

This commit is contained in:
Sébastien Deronne
2023-08-07 22:44:12 +02:00
parent ef76e67861
commit 58ce22aa2f

View File

@@ -54,16 +54,13 @@ SpectrumWifiPhyHelper::SpectrumWifiPhyHelper(uint8_t nLinks)
void
SpectrumWifiPhyHelper::SetChannel(const Ptr<SpectrumChannel> channel)
{
m_channels[WHOLE_WIFI_SPECTRUM] = channel;
AddWifiBandwidthFilter(channel);
AddChannel(channel);
}
void
SpectrumWifiPhyHelper::SetChannel(const std::string& channelName)
{
Ptr<SpectrumChannel> channel = Names::Find<SpectrumChannel>(channelName);
m_channels[WHOLE_WIFI_SPECTRUM] = channel;
AddWifiBandwidthFilter(channel);
AddChannel(channelName);
}
void