diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 3836c909d..93f75a0a2 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -2645,7 +2645,6 @@ MacLow::AggregateToAmpdu (Ptr packet, const WifiMacHeader hdr) if (peekedPacket == 0) { Ptr item = queue->PeekByTidAndAddress (tid, - WifiMacHeader::ADDR1, hdr.GetAddr1 ()); if (item) { @@ -2744,7 +2743,6 @@ MacLow::AggregateToAmpdu (Ptr packet, const WifiMacHeader hdr) //I reached the first packet that I added to this A-MPDU retry = false; Ptr item = queue->PeekByTidAndAddress (tid, - WifiMacHeader::ADDR1, hdr.GetAddr1 ()); if (item != 0) { @@ -2772,7 +2770,7 @@ MacLow::AggregateToAmpdu (Ptr packet, const WifiMacHeader hdr) else { Ptr item = queue->PeekByTidAndAddress (tid, - WifiMacHeader::ADDR1, hdr.GetAddr1 ()); + hdr.GetAddr1 ()); if (item != 0) { peekedPacket = item->GetPacket (); @@ -2910,7 +2908,6 @@ MacLow::PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Ti queue = edcaIt->second->GetWifiMacQueue (); Ptr peekedItem = queue->DequeueByTidAndAddress (hdr->GetQosTid (), - WifiMacHeader::ADDR1, hdr->GetAddr1 ()); if (peekedItem) { @@ -2921,7 +2918,7 @@ MacLow::PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Ti edcaIt->second->MapSrcAddressForAggregation (*hdr), edcaIt->second->MapDestAddressForAggregation (*hdr)); - peekedItem = queue->PeekByTidAndAddress (hdr->GetQosTid (), WifiMacHeader::ADDR1, hdr->GetAddr1 ()); + peekedItem = queue->PeekByTidAndAddress (hdr->GetQosTid (), hdr->GetAddr1 ()); while (peekedItem != 0) { *hdr = peekedItem->GetHeader (); @@ -2942,7 +2939,7 @@ MacLow::PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Ti { break; } - peekedItem = queue->PeekByTidAndAddress (hdr->GetQosTid (), WifiMacHeader::ADDR1, hdr->GetAddr1 ()); + peekedItem = queue->PeekByTidAndAddress (hdr->GetQosTid (), hdr->GetAddr1 ()); } if (isAmsdu) diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index fd1829190..2727fd141 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -274,7 +274,7 @@ QosTxop::NotifyAccessGranted (void) Ptr item; if (m_currentHdr.IsQosData () && (item = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ())) + m_currentHdr.GetAddr1 ())) && !m_currentHdr.GetAddr1 ().IsBroadcast () && m_msduAggregator != 0 && !m_currentHdr.IsRetry ()) { @@ -287,7 +287,6 @@ QosTxop::NotifyAccessGranted (void) bool aggregated = false; bool isAmsdu = false; Ptr peekedItem = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); while (peekedItem != 0) { @@ -305,7 +304,7 @@ QosTxop::NotifyAccessGranted (void) break; } peekedItem = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); + m_currentHdr.GetAddr1 ()); } if (isAmsdu) { @@ -820,7 +819,6 @@ QosTxop::StartNextPacket (void) if (peekedPacket == 0) { Ptr peekedItem = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); if (peekedItem) { @@ -855,7 +853,6 @@ QosTxop::StartNextPacket (void) { NS_LOG_DEBUG ("start next packet"); Ptr item = m_queue->DequeueByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); NS_ASSERT (item != 0); m_currentPacket = item->GetPacket (); @@ -905,7 +902,6 @@ QosTxop::HasTxop (void) const } Ptr peekedItem = m_queue->PeekByTidAndAddress (m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); if (peekedItem == 0) { diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index 9b03f9e86..73c32a097 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -748,7 +748,7 @@ Txop::SendCfFrame (WifiMacType frameType, Mac48Address addr) } else if ((m_queue->GetNPacketsByAddress (addr) > 0) && (frameType != WIFI_MAC_CTL_END)) //if no packet for that dest, send to another dest? { - Ptr item = m_queue->DequeueByAddress (WifiMacHeader::ADDR1, addr); + Ptr item = m_queue->DequeueByAddress (addr); NS_ASSERT (item != 0); m_currentPacket = item->GetPacket (); m_currentHdr = item->GetHeader (); diff --git a/src/wifi/model/wifi-mac-queue.cc b/src/wifi/model/wifi-mac-queue.cc index 4374ea4a7..00fd4d74c 100644 --- a/src/wifi/model/wifi-mac-queue.cc +++ b/src/wifi/model/wifi-mac-queue.cc @@ -160,7 +160,7 @@ WifiMacQueue::Dequeue (void) } Ptr -WifiMacQueue::DequeueByAddress (WifiMacHeader::AddressType type, Mac48Address dest) +WifiMacQueue::DequeueByAddress (Mac48Address dest) { NS_LOG_FUNCTION (this << dest); @@ -181,8 +181,7 @@ WifiMacQueue::DequeueByAddress (WifiMacHeader::AddressType type, Mac48Address de } Ptr -WifiMacQueue::DequeueByTidAndAddress (uint8_t tid, - WifiMacHeader::AddressType type, Mac48Address dest) +WifiMacQueue::DequeueByTidAndAddress (uint8_t tid, Mac48Address dest) { NS_LOG_FUNCTION (this << dest); for (auto it = Head (); it != Tail (); ) @@ -241,8 +240,7 @@ WifiMacQueue::Peek (void) const } Ptr -WifiMacQueue::PeekByTidAndAddress (uint8_t tid, - WifiMacHeader::AddressType type, Mac48Address dest) +WifiMacQueue::PeekByTidAndAddress (uint8_t tid, Mac48Address dest) { NS_LOG_FUNCTION (this << dest); for (auto it = Head (); it != Tail (); ) diff --git a/src/wifi/model/wifi-mac-queue.h b/src/wifi/model/wifi-mac-queue.h index 327f853a6..482d6fc53 100644 --- a/src/wifi/model/wifi-mac-queue.h +++ b/src/wifi/model/wifi-mac-queue.h @@ -102,13 +102,11 @@ public: * This method removes the packet from the queue. * It is typically used by ns3::Txop during the CF period. * - * \param type the given address type * \param dest the given destination * * \return the packet */ - Ptr DequeueByAddress (WifiMacHeader::AddressType type, - Mac48Address dest); + Ptr DequeueByAddress (Mac48Address dest); /** * Search and return, if present in the queue, the first packet having the * address indicated by type equal to addr, and tid @@ -117,13 +115,11 @@ public: * aggregation (A-MSDU). * * \param tid the given TID - * \param type the given address type * \param dest the given destination * * \return the packet */ Ptr DequeueByTidAndAddress (uint8_t tid, - WifiMacHeader::AddressType type, Mac48Address dest); /** * Return first available packet for transmission. A packet could be no available @@ -151,13 +147,11 @@ public: * aggregation (A-MSDU). * * \param tid the given TID - * \param type the given address type * \param dest the given destination * * \return packet */ Ptr PeekByTidAndAddress (uint8_t tid, - WifiMacHeader::AddressType type, Mac48Address dest); /** * Return first available packet for transmission. The packet is not removed from queue.