wifi: GCR manager indicates whether a group addressed frame should be transmitted to the GCR concealment address

This commit is contained in:
Sébastien Deronne
2023-12-03 14:24:50 +01:00
parent 855a2abbdb
commit f4b3b2e0da
2 changed files with 32 additions and 0 deletions

View File

@@ -143,6 +143,29 @@ GcrManager::GetGcrConcealmentAddress() const
return m_gcrConcealmentAddress;
}
bool
GcrManager::UseConcealment(const WifiMacHeader& header) const
{
NS_ASSERT_MSG(header.IsQosData() && IsGroupcast(header.GetAddr1()),
"GCR service is only for QoS groupcast data frames");
NS_ASSERT_MSG(m_retransmissionPolicy != GroupAddressRetransmissionPolicy::NO_ACK_NO_RETRY,
"GCR service is not enabled");
NS_ASSERT_MSG(!m_staMembers.empty(), "GCR service should not be used");
// Only GCR capable STAs, hence concealment is always used
if (m_nonGcrStas.empty())
{
return true;
}
// If A-MSDU is used, that means previous transmission was already concealed
if (header.IsQosAmsdu())
{
return true;
}
// Otherwise, use concealment except for the first transmission (hence when it is a retry)
return header.IsRetry();
}
bool
GcrManager::KeepGroupcastQueued(Ptr<WifiMpdu> mpdu)
{

View File

@@ -92,6 +92,15 @@ class GcrManager : public Object
*/
const Mac48Address& GetGcrConcealmentAddress() const;
/**
* Indicate whether a group addressed packet should be transmitted to the GCR concealment
* address.
*
* @param header the header of the groupcast packet
* @return whether GCR concealment should be used
*/
bool UseConcealment(const WifiMacHeader& header) const;
/**
* This function indicates whether a groupcast MPDU should be kept for next retransmission.
*