diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc
index 4bd7d5794..6e4c38cdf 100644
--- a/src/wifi/model/ht/ht-frame-exchange-manager.cc
+++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc
@@ -313,7 +313,6 @@ HtFrameExchangeManager::CreateBlockAckAgreement (const MgtAddBaResponseHeader *r
}
m_agreements.insert ({{originator, tid}, agreement});
- GetBaManager (tid)->SetBlockAckInactivityCallback (MakeCallback (&HtFrameExchangeManager::SendDelbaFrame, this));
}
void
diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.h b/src/wifi/model/ht/ht-frame-exchange-manager.h
index bd0699ca7..76f8a0352 100644
--- a/src/wifi/model/ht/ht-frame-exchange-manager.h
+++ b/src/wifi/model/ht/ht-frame-exchange-manager.h
@@ -198,6 +198,16 @@ public:
*/
BlockAckType GetBlockAckType (Mac48Address originator, uint8_t tid) const;
+ /**
+ * Sends DELBA frame to cancel a block ack agreement with STA
+ * addressed by addr for TID tid.
+ *
+ * \param addr address of the recipient.
+ * \param tid traffic ID.
+ * \param byOriginator flag to indicate whether this is set by the originator.
+ */
+ void SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator);
+
protected:
void DoDispose () override;
@@ -334,16 +344,6 @@ protected:
void SendAddBaRequest (Mac48Address recipient, uint8_t tid, uint16_t startingSeq,
uint16_t timeout, bool immediateBAck);
- /**
- * Sends DELBA frame to cancel a block ack agreement with STA
- * addressed by addr for TID tid.
- *
- * \param addr address of the recipient.
- * \param tid traffic ID.
- * \param byOriginator flag to indicate whether this is set by the originator.
- */
- void SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator);
-
/**
* Create a BlockAck frame with header equal to blockAck and start its transmission.
*
diff --git a/src/wifi/model/wifi-mac.cc b/src/wifi/model/wifi-mac.cc
index fdc70cdff..e535dfd66 100644
--- a/src/wifi/model/wifi-mac.cc
+++ b/src/wifi/model/wifi-mac.cc
@@ -984,6 +984,11 @@ WifiMac::Receive (Ptr mpdu)
//and act by locally establishing the agreement on
//the appropriate queue.
GetQosTxop (respHdr.GetTid ())->GotAddBaResponse (&respHdr, from);
+ auto htFem = DynamicCast (m_feManager);
+ if (htFem != 0)
+ {
+ GetQosTxop (respHdr.GetTid ())->GetBaManager ()->SetBlockAckInactivityCallback (MakeCallback (&HtFrameExchangeManager::SendDelbaFrame, htFem));
+ }
//This frame is now completely dealt with, so we're done.
return;
}