diff --git a/src/wifi/model/frame-exchange-manager.cc b/src/wifi/model/frame-exchange-manager.cc index c86a6dee8..b78f412a0 100644 --- a/src/wifi/model/frame-exchange-manager.cc +++ b/src/wifi/model/frame-exchange-manager.cc @@ -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 diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc index 05c768b51..8db969a2d 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.cc +++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc @@ -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 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); + } } } diff --git a/src/wifi/model/wifi-mac-queue-container.cc b/src/wifi/model/wifi-mac-queue-container.cc index 380333e44..7fa25892f 100644 --- a/src/wifi/model/wifi-mac-queue-container.cc +++ b/src/wifi/model/wifi-mac-queue-container.cc @@ -70,10 +70,23 @@ WifiMacQueueContainer::GetQueueId(Ptr 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()) {