From da5f141e92e652a3cccdf81058f8b49e109f5414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 14 Sep 2022 07:41:30 +0200 Subject: [PATCH] wifi: Allow to set empty list of punctured channels --- src/wifi/model/wifi-tx-vector.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wifi/model/wifi-tx-vector.cc b/src/wifi/model/wifi-tx-vector.cc index 7e8138179..8c5fa1603 100644 --- a/src/wifi/model/wifi-tx-vector.cc +++ b/src/wifi/model/wifi-tx-vector.cc @@ -523,7 +523,7 @@ WifiTxVector::SetInactiveSubchannels (const std::vector& inactiveSubchanne "Only HE (or later) authorized for preamble puncturing"); NS_ABORT_MSG_IF (m_channelWidth < 80, "Preamble puncturing only possible for transmission bandwidth of 80 MHz or larger"); - NS_ABORT_MSG_IF (inactiveSubchannels.size () != (m_channelWidth / 20), + NS_ABORT_MSG_IF (!inactiveSubchannels.empty () && inactiveSubchannels.size () != (m_channelWidth / 20), "The size of the inactive subchannnels bitmap should be equal to the number of 20 MHz subchannels"); m_inactiveSubchannels = inactiveSubchannels; }