wifi: remove unused input parameters

This commit is contained in:
Sébastien Deronne
2017-12-18 19:20:22 +01:00
parent 34dab9dccb
commit 8544519e76
5 changed files with 22 additions and 26 deletions

View File

@@ -208,7 +208,7 @@ AthstatsWifiTraceSink::TxFinalDataFailedTrace (std::string context, Mac48Address
void
AthstatsWifiTraceSink::PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble)
{
NS_LOG_FUNCTION (this << context << packet << " mode=" << mode << " snr=" << snr );
NS_LOG_FUNCTION (this << context << packet << " mode=" << mode << " snr=" << snr << "preamble=" << preamble);
++m_phyRxOkCount;
}

View File

@@ -458,7 +458,7 @@ HeCapabilities::GetHeLtfAndGiForHePpdus (void) const
}
uint8_t
HeCapabilities::GetHighestMcsSupported (uint8_t mcs) const
HeCapabilities::GetHighestMcsSupported (void) const
{
return m_highestMcsSupported + 7;
}

View File

@@ -143,10 +143,9 @@ public:
/**
* Get highest MCS supported.
*
* \param mcs the MCS
* \returns the highest MCS is supported
*/
uint8_t GetHighestMcsSupported (uint8_t mcs) const;
uint8_t GetHighestMcsSupported (void) const;
/**
* Get highest NSS supported.
*

View File

@@ -666,7 +666,7 @@ MacLow::ReceiveOk (Ptr<Packet> packet, double rxSnr, WifiTxVector txVector, bool
bool isPrevNavZero = IsNavZero ();
NS_LOG_DEBUG ("duration/id=" << hdr.GetDuration ());
NotifyNav (packet, hdr, txVector.GetPreambleType ());
NotifyNav (packet, hdr);
if (hdr.IsRts ())
{
/* see section 9.2.5.7 802.11-1999
@@ -1012,7 +1012,7 @@ MacLow::GetAckDuration (WifiTxVector ackTxVector) const
}
Time
MacLow::GetBlockAckDuration (Mac48Address to, WifiTxVector blockAckReqTxVector, BlockAckType type) const
MacLow::GetBlockAckDuration (WifiTxVector blockAckReqTxVector, BlockAckType type) const
{
/*
* For immediate Basic BlockAck we should transmit the frame with the same WifiMode
@@ -1129,7 +1129,7 @@ MacLow::CalculateTransmissionTime (Ptr<const Packet> packet,
}
void
MacLow::NotifyNav (Ptr<const Packet> packet,const WifiMacHeader &hdr, WifiPreamble preamble)
MacLow::NotifyNav (Ptr<const Packet> packet, const WifiMacHeader &hdr)
{
NS_ASSERT (m_lastNavStart <= Simulator::Now ());
Time duration = hdr.GetDuration ();
@@ -1466,12 +1466,12 @@ MacLow::SendRtsForPacket (void)
if (m_txParams.MustWaitBasicBlockAck ())
{
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, BASIC_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, BASIC_BLOCK_ACK);
}
else if (m_txParams.MustWaitCompressedBlockAck ())
{
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -1589,13 +1589,13 @@ MacLow::SendDataPacket (void)
{
duration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, BASIC_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, BASIC_BLOCK_ACK);
}
else if (m_txParams.MustWaitCompressedBlockAck ())
{
duration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -1661,13 +1661,13 @@ MacLow::SendCtsToSelf (void)
{
duration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, BASIC_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, BASIC_BLOCK_ACK);
}
else if (m_txParams.MustWaitCompressedBlockAck ())
{
duration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -1683,7 +1683,7 @@ MacLow::SendCtsToSelf (void)
{
duration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
duration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -1771,13 +1771,13 @@ MacLow::SendDataAfterCts (Mac48Address source, Time duration)
{
newDuration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
newDuration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, BASIC_BLOCK_ACK);
newDuration += GetBlockAckDuration (blockAckReqTxVector, BASIC_BLOCK_ACK);
}
else if (m_txParams.MustWaitCompressedBlockAck ())
{
newDuration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
newDuration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
newDuration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -1799,7 +1799,7 @@ MacLow::SendDataAfterCts (Mac48Address source, Time duration)
{
newDuration += GetSifs ();
WifiTxVector blockAckReqTxVector = GetBlockAckTxVector (m_currentHdr.GetAddr2 (), m_currentTxVector.GetMode ());
newDuration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
newDuration += GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (m_txParams.MustWaitAck ())
{
@@ -2141,11 +2141,11 @@ MacLow::SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Addre
duration -= GetSifs ();
if (blockAck->IsBasic ())
{
duration -= GetBlockAckDuration (originator, blockAckReqTxVector, BASIC_BLOCK_ACK);
duration -= GetBlockAckDuration (blockAckReqTxVector, BASIC_BLOCK_ACK);
}
else if (blockAck->IsCompressed ())
{
duration -= GetBlockAckDuration (originator, blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
duration -= GetBlockAckDuration (blockAckReqTxVector, COMPRESSED_BLOCK_ACK);
}
else if (blockAck->IsMultiTid ())
{
@@ -2309,8 +2309,7 @@ MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr,
WifiMacHeader firsthdr;
(*n).first->PeekHeader (firsthdr);
NS_LOG_DEBUG ("duration/id=" << firsthdr.GetDuration ());
WifiPreamble preamble = txVector.GetPreambleType ();
NotifyNav ((*n).first, firsthdr, preamble);
NotifyNav ((*n).first, firsthdr);
if (firsthdr.GetAddr1 () == m_self)
{
@@ -2321,7 +2320,7 @@ MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr,
NS_LOG_DEBUG ("Receive S-MPDU");
ampduSubframe = false;
}
else if (preamble != WIFI_PREAMBLE_NONE || !m_sendAckEvent.IsRunning ())
else if (txVector.GetPreambleType () != WIFI_PREAMBLE_NONE || !m_sendAckEvent.IsRunning ())
{
m_sendAckEvent = Simulator::Schedule (ampdu.GetRemainingAmpduDuration () + GetSifs (),
&MacLow::SendBlockAckAfterAmpdu, this,

View File

@@ -532,12 +532,11 @@ private:
* Return the time required to transmit the Block ACK to the specified address
* given the TXVECTOR of the BAR (including preamble and FCS).
*
* \param to
* \param blockAckReqTxVector
* \param type the Block ACK type
* \return the time required to transmit the Block ACK (including preamble and FCS)
*/
Time GetBlockAckDuration (Mac48Address to, WifiTxVector blockAckReqTxVector, BlockAckType type) const;
Time GetBlockAckDuration (WifiTxVector blockAckReqTxVector, BlockAckType type) const;
/**
* Check if the current packet should be sent with a RTS protection.
*
@@ -558,9 +557,8 @@ private:
*
* \param packet the packet
* \param hdr the header
* \param preamble the preamble
*/
void NotifyNav (Ptr<const Packet> packet,const WifiMacHeader &hdr, WifiPreamble preamble);
void NotifyNav (Ptr<const Packet> packet,const WifiMacHeader &hdr);
/**
* Reset NAV with the given duration.
*