From 4cb770cbda481d39e78d7208311df0417d9db2c0 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 7 Apr 2023 18:49:16 +0200 Subject: [PATCH] wifi: Allow setting UID of previously received PPDU This is needed, e.g., in case an EMLSR client receives a Trigger frame via an aux PHY and sends the response via the main PHY. --- src/wifi/model/wifi-phy.cc | 7 +++++++ src/wifi/model/wifi-phy.h | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 0ec862751..60551e481 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1839,6 +1839,13 @@ WifiPhy::GetPreviouslyRxPpduUid() const return m_previouslyRxPpduUid; } +void +WifiPhy::SetPreviouslyRxPpduUid(uint64_t uid) +{ + NS_ASSERT(m_standard >= WIFI_STANDARD_80211be); + m_previouslyRxPpduUid = uid; +} + void WifiPhy::Reset() { diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index c5ae2f21b..058065157 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -1122,6 +1122,18 @@ class WifiPhy : public Object */ uint64_t GetPreviouslyRxPpduUid() const; + /** + * Set the UID of the previously received PPDU. + * + * \param uid the value for the UID of the previously received PPDU + * + * \note This method shall only be used in exceptional circumstances, such as when a PHY + * transmits a response to a Trigger Frame that was received by another PHY. This is the + * case, e.g., when an aux PHY of an EMLSR client receives an ICF but it is the main PHY + * that switches channel and transmits the response to the ICF. + */ + void SetPreviouslyRxPpduUid(uint64_t uid); + /** * \param currentChannelWidth channel width of the current transmission (MHz) * \return the width of the guard band (MHz)