From d71a519976477003e1191be4a443d468def31709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Fri, 11 May 2018 16:58:49 +0200 Subject: [PATCH] wifi: Fix some types in MacLow --- src/wifi/model/mac-low.cc | 10 +++++----- src/wifi/model/mac-low.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 1583647bf..690519fdf 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -2301,7 +2301,7 @@ MacLow::DeaggregateAmpduAndReceive (Ptr aggregatedPacket, double rxSnr, } bool -MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const +MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint8_t blockAckSize) const { if (peekedPacket == 0) { @@ -2326,7 +2326,7 @@ MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peeke return true; } - if (!edcaIt->second->GetMpduAggregator ()->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, aggregatedPacket, size)) + if (!edcaIt->second->GetMpduAggregator ()->CanBeAggregated (peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, aggregatedPacket, blockAckSize)) { NS_LOG_DEBUG ("no more packets can be aggregated because the maximum A-MPDU size has been reached"); return true; @@ -2379,9 +2379,9 @@ MacLow::AggregateToAmpdu (Ptr packet, const WifiMacHeader hdr) uint16_t startingSequenceNumber = 0; uint16_t currentSequenceNumber = 0; uint8_t qosPolicy = 0; - uint16_t blockAckSize = 0; + uint8_t blockAckSize = 0; bool aggregated = false; - int i = 0; + uint8_t i = 0; aggPacket = newPacket->Copy (); if (!hdr.IsBlockAckReq ()) @@ -2669,7 +2669,7 @@ MacLow::InsertInTxQueue (Ptr packet, const WifiMacHeader &hdr, Tim } Ptr -MacLow::PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint16_t blockAckSize) +MacLow::PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint8_t blockAckSize) { bool msduAggregation = false; bool isAmsdu = false; diff --git a/src/wifi/model/mac-low.h b/src/wifi/model/mac-low.h index 960301df9..eb5045ac6 100644 --- a/src/wifi/model/mac-low.h +++ b/src/wifi/model/mac-low.h @@ -388,13 +388,13 @@ public: * \param peekedPacket the packet to be aggregated * \param peekedHdr the WifiMacHeader for the packet. * \param aggregatedPacket the current A-MPDU - * \param size the size of a piggybacked block ack request + * \param blockAckSize the size of a piggybacked block ack request * \return false if the given packet can be added to an A-MPDU, true otherwise * * This function decides if a given packet can be added to an A-MPDU or not * */ - bool StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const; + bool StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint8_t blockAckSize) const; /** * * This function is called to flush the aggregate queue, which is used for A-MPDU @@ -818,7 +818,7 @@ private: * * \return the aggregate if MSDU aggregation succeeded, 0 otherwise */ - Ptr PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint16_t blockAckSize); + Ptr PerformMsduAggregation (Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint8_t blockAckSize); Ptr m_phy; //!< Pointer to WifiPhy (actually send/receives frames) Ptr m_stationManager; //!< Pointer to WifiRemoteStationManager (rate control)