wifi: GCR manager indicates whether a group addressed frame should be transmitted to the GCR concealment address
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user