wifi: Add function to retrieve whether a GCR BAR shall be retransmitted

This commit is contained in:
Sébastien Deronne
2023-10-31 21:53:27 +01:00
parent 8aaf403faa
commit 1becfcfff6
2 changed files with 25 additions and 0 deletions

View File

@@ -1156,6 +1156,15 @@ BlockAckManager::NeedBarRetransmission(uint8_t tid, const Mac48Address& recipien
return false;
}
bool
BlockAckManager::NeedGcrBarRetransmission(const Mac48Address& gcrGroupAddress,
const Mac48Address& recipient,
uint8_t tid) const
{
const auto it = GetOriginatorBaAgreement(recipient, tid, gcrGroupAddress);
return (it != m_originatorAgreements.cend() && it->second.first.IsEstablished());
}
void
BlockAckManager::SetBlockAckInactivityCallback(
Callback<void, Mac48Address, uint8_t, bool, std::optional<Mac48Address>> callback)

View File

@@ -359,6 +359,22 @@ class BlockAckManager : public Object
* @returns true if BAR retransmission needed
*/
bool NeedBarRetransmission(uint8_t tid, const Mac48Address& recipient);
/**
* This function returns true if a GCR block ack agreement is established with the given
* recipient, for the given TID, for the given GCR group address and there is at least an
* outstanding MPDU for such agreement whose lifetime is not expired.
*
* @param gcrGroupAddress the GCR group address
* @param tid Traffic ID
* @param recipient MAC address of the recipient
*
* @returns true if BAR retransmission needed
*/
bool NeedGcrBarRetransmission(const Mac48Address& gcrGroupAddress,
const Mac48Address& recipient,
uint8_t tid) const;
/**
* This function returns the buffer size negotiated with the recipient.
*