From 58ce22aa2fc431fe515223dadd5668953a25fa82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 7 Aug 2023 22:44:12 +0200 Subject: [PATCH] wifi: Reduce code duplication in SpectrumWifiPhyHelper --- src/wifi/helper/spectrum-wifi-helper.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/wifi/helper/spectrum-wifi-helper.cc b/src/wifi/helper/spectrum-wifi-helper.cc index f433b0f09..56b3aa266 100644 --- a/src/wifi/helper/spectrum-wifi-helper.cc +++ b/src/wifi/helper/spectrum-wifi-helper.cc @@ -54,16 +54,13 @@ SpectrumWifiPhyHelper::SpectrumWifiPhyHelper(uint8_t nLinks) void SpectrumWifiPhyHelper::SetChannel(const Ptr channel) { - m_channels[WHOLE_WIFI_SPECTRUM] = channel; - AddWifiBandwidthFilter(channel); + AddChannel(channel); } void SpectrumWifiPhyHelper::SetChannel(const std::string& channelName) { - Ptr channel = Names::Find(channelName); - m_channels[WHOLE_WIFI_SPECTRUM] = channel; - AddWifiBandwidthFilter(channel); + AddChannel(channelName); } void