From 383b537fbca01a48f42d688279bed63e8132eae5 Mon Sep 17 00:00:00 2001 From: Sebastien Deronne Date: Sun, 1 May 2022 13:37:29 +0200 Subject: [PATCH] wifi: Implement per-20 MHz CCA sensitivity --- src/wifi/model/he/he-phy.cc | 94 ++++++++++++++++++++++++++ src/wifi/model/he/he-phy.h | 13 ++++ src/wifi/model/phy-entity.cc | 14 +++- src/wifi/model/phy-entity.h | 9 ++- src/wifi/model/wifi-phy-state-helper.h | 6 +- src/wifi/model/wifi-phy.cc | 7 ++ src/wifi/model/wifi-phy.h | 7 ++ 7 files changed, 142 insertions(+), 8 deletions(-) diff --git a/src/wifi/model/he/he-phy.cc b/src/wifi/model/he/he-phy.cc index bb783d63e..e21af85e7 100644 --- a/src/wifi/model/he/he-phy.cc +++ b/src/wifi/model/he/he-phy.cc @@ -1015,6 +1015,100 @@ HePhy::GetCcaThreshold (const Ptr ppdu, WifiChannelListType chan return std::max (VhtPhy::GetCcaThreshold (ppdu, channelType), obssPdLevel); } +void +HePhy::NotifyCcaBusy (const Ptr ppdu, Time duration, WifiChannelListType channelType) +{ + NS_LOG_FUNCTION (this << duration << channelType); + NS_LOG_DEBUG ("CCA busy for " << channelType << " during " << duration.As (Time::S)); + m_state->SwitchMaybeToCcaBusy (duration, channelType, GetPer20MHzDurations (ppdu)); +} + +std::vector