From c01e14c43f6a5641f9dc80c3a4cedc7574b83d0a Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Mon, 28 Mar 2022 12:36:04 +0200 Subject: [PATCH] wifi: Workaround to avoid a crash when expecting a TB PPDU and receiving a pre-11ax PPDU A real fix requires to review the PHY design so that a PHY entity can somehow control the reception of PPDUs of previous modulation classes. --- src/wifi/model/he/he-frame-exchange-manager.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wifi/model/he/he-frame-exchange-manager.cc b/src/wifi/model/he/he-frame-exchange-manager.cc index 7e9fbfb41..cbb9fd99f 100644 --- a/src/wifi/model/he/he-frame-exchange-manager.cc +++ b/src/wifi/model/he/he-frame-exchange-manager.cc @@ -1473,7 +1473,13 @@ HeFrameExchangeManager::ReceiveMpdu (Ptr mpdu, RxSignalInfo rx mpdu->GetPacket ()->PeekPacketTag (tag); ReceivedNormalAck (*it->second->begin (), m_txParams.m_txVector, txVector, rxSignalInfo, tag.Get ()); } - else if (hdr.IsBlockAck () && m_txTimer.IsRunning () + // TODO the PHY should not pass us a non-TB PPDU if we are waiting for a + // TB PPDU. However, processing the PHY header is done by the PHY entity + // corresponding to the modulation class of the PPDU being received, hence + // it is not possible to check if a valid TRIGVECTOR is stored when receiving + // PPDUs of older modulation classes. Therefore, we check here that we are + // actually receiving a TB PPDU. + else if (hdr.IsBlockAck () && txVector.IsUlMu () && m_txTimer.IsRunning () && m_txTimer.GetReason () == WifiTxTimer::WAIT_BLOCK_ACKS_IN_TB_PPDU) { Mac48Address sender = hdr.GetAddr2 ();