wifi: Inactivity callback must be setup on originator, not on recipient

This commit is contained in:
Stefano Avallone
2022-02-08 12:21:12 +01:00
committed by Stefano Avallone
parent ec94e47acb
commit 07b4ad8efd
3 changed files with 15 additions and 11 deletions

View File

@@ -313,7 +313,6 @@ HtFrameExchangeManager::CreateBlockAckAgreement (const MgtAddBaResponseHeader *r
}
m_agreements.insert ({{originator, tid}, agreement});
GetBaManager (tid)->SetBlockAckInactivityCallback (MakeCallback (&HtFrameExchangeManager::SendDelbaFrame, this));
}
void

View File

@@ -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 <i>addr</i> for TID <i>tid</i>.
*
* \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 <i>addr</i> for TID <i>tid</i>.
*
* \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 <i>blockAck</i> and start its transmission.
*

View File

@@ -984,6 +984,11 @@ WifiMac::Receive (Ptr<WifiMacQueueItem> mpdu)
//and act by locally establishing the agreement on
//the appropriate queue.
GetQosTxop (respHdr.GetTid ())->GotAddBaResponse (&respHdr, from);
auto htFem = DynamicCast<HtFrameExchangeManager> (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;
}