wifi: Set address1 in groupcast A-MSDUs with GCR concealement address

This commit is contained in:
Sébastien Deronne
2023-09-27 20:20:11 +02:00
parent a049255291
commit 855a2abbdb
3 changed files with 28 additions and 4 deletions

View File

@@ -533,6 +533,8 @@ FrameExchangeManager::SendMpdu()
NS_LOG_DEBUG("Prepare groupcast MPDU for retry");
mpdu->ResetInFlight(m_linkId);
mpdu->GetHeader().SetRetry();
// restore addr1 to the group address instead of the concealment address
mpdu->GetHeader().SetAddr1(mpdu->begin()->second.GetDestinationAddr());
});
}
else

View File

@@ -1138,6 +1138,8 @@ HtFrameExchangeManager::SendPsdu()
{
mpdu->ResetInFlight(m_linkId);
mpdu->GetHeader().SetRetry();
// restore addr1 to the group address instead of the concealment address
mpdu->GetHeader().SetAddr1(mpdu->begin()->second.GetDestinationAddr());
}
});
}
@@ -1275,6 +1277,13 @@ HtFrameExchangeManager::FinalizeMacHeader(Ptr<const WifiPsdu> psdu)
hdr.SetQosEosp();
hdr.SetQosQueueSize(queueSizeForTid[tid].value());
}
if (m_mac->GetTypeOfStation() == AP && m_apMac->UseGcr(hdr))
{
const auto& gcrConcealmentAddress =
m_apMac->GetGcrManager()->GetGcrConcealmentAddress();
hdr.SetAddr1(gcrConcealmentAddress);
}
}
}

View File

@@ -70,10 +70,23 @@ WifiMacQueueContainer::GetQueueId(Ptr<const WifiMpdu> mpdu)
{
const WifiMacHeader& hdr = mpdu->GetHeader();
auto addrType = hdr.GetAddr1().IsBroadcast() ? WIFI_BROADCAST
: hdr.GetAddr1().IsGroup() ? WIFI_GROUPCAST
: WIFI_UNICAST;
auto address = hdr.GetAddr1().IsBroadcast() ? hdr.GetAddr2() : hdr.GetAddr1();
WifiReceiverAddressType addrType;
Mac48Address address;
if (hdr.GetAddr1().IsBroadcast())
{
addrType = WIFI_BROADCAST;
address = hdr.GetAddr2();
}
else if (hdr.GetAddr1().IsGroup())
{
addrType = WIFI_GROUPCAST;
address = hdr.IsQosAmsdu() ? mpdu->begin()->second.GetDestinationAddr() : hdr.GetAddr1();
}
else
{
addrType = WIFI_UNICAST;
address = hdr.GetAddr1();
}
if (hdr.IsCtl())
{