wifi: Always update queue priority when enqueuing an MPDU

This commit is contained in:
Stefano Avallone
2023-02-13 15:25:46 +01:00
parent ce956b50fb
commit e4e962c315

View File

@@ -132,15 +132,11 @@ FcfsWifiQueueScheduler::DoNotifyEnqueue(AcIndex ac, Ptr<WifiMpdu> mpdu)
const auto queueId = WifiMacQueueContainer::GetQueueId(mpdu);
if (GetWifiMacQueue(ac)->GetNPackets(queueId) > 1)
{
// Enqueue takes place at the tail, while the priority is determined by the
// head of the queue. Therefore, if the queue was not empty before inserting
// this MPDU, priority does not change
return;
}
// priority is determined by the head of the queue
auto item = GetWifiMacQueue(ac)->PeekByQueueId(queueId);
NS_ASSERT(item);
SetPriority(ac, queueId, {mpdu->GetTimestamp(), std::get<WifiContainerQueueType>(queueId)});
SetPriority(ac, queueId, {item->GetTimestamp(), std::get<WifiContainerQueueType>(queueId)});
}
void