wifi: Further cleanup of the OriginatorBlockAckAgreement class
The m_sentMpdus and m_needBlockAckReq members of the OriginatorBlockAckAgreement class are not actually used. Consequently, remove the NotifyMpduTransmission and CompleteExchange methods of the same class and various other methods that only call the removed methods.
This commit is contained in:
@@ -250,15 +250,6 @@ BlockAckManager::StorePacket (Ptr<const WifiMacQueueItem> mpdu)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::CompleteAmpduExchange (Mac48Address recipient, uint8_t tid)
|
||||
{
|
||||
AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
|
||||
NS_ASSERT (it != m_agreements.end ());
|
||||
OriginatorBlockAckAgreement &agreement = (*it).second.first;
|
||||
agreement.CompleteExchange ();
|
||||
}
|
||||
|
||||
Ptr<WifiMacQueueItem>
|
||||
BlockAckManager::GetNextPacket (bool removePacket)
|
||||
{
|
||||
@@ -644,12 +635,6 @@ BlockAckManager::NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac4
|
||||
}
|
||||
}
|
||||
m_stationManager->ReportAmpduTxStatus (recipient, tid, nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr);
|
||||
uint16_t newSeq = m_txMiddle->GetNextSeqNumberByTidAndAddress (tid, recipient);
|
||||
if ((foundFirstLost && !SwitchToBlockAckIfNeeded (recipient, tid, sequenceFirstLost))
|
||||
|| (!foundFirstLost && !SwitchToBlockAckIfNeeded (recipient, tid, newSeq)))
|
||||
{
|
||||
it->second.first.CompleteExchange ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -699,7 +684,6 @@ BlockAckManager::ScheduleBlockAckReqIfNeeded (Mac48Address recipient, uint8_t ti
|
||||
NS_ASSERT (it != m_agreements.end ());
|
||||
|
||||
OriginatorBlockAckAgreement &agreement = (*it).second.first;
|
||||
agreement.CompleteExchange ();
|
||||
|
||||
CtrlBAckRequestHeader reqHdr;
|
||||
reqHdr.SetType (m_blockAckType);
|
||||
@@ -778,16 +762,6 @@ BlockAckManager::NotifyMpduTransmission (Mac48Address recipient, uint8_t tid, ui
|
||||
NS_LOG_FUNCTION (this << recipient << +tid << nextSeqNumber);
|
||||
AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
|
||||
NS_ASSERT (it != m_agreements.end ());
|
||||
uint16_t nextSeq;
|
||||
if (GetNRetryNeededPackets (recipient, tid) > 0)
|
||||
{
|
||||
nextSeq = GetSeqNumOfNextRetryPacket (recipient, tid);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextSeq = nextSeqNumber;
|
||||
}
|
||||
it->second.first.NotifyMpduTransmission (nextSeq);
|
||||
if (policy == WifiMacHeader::BLOCK_ACK)
|
||||
{
|
||||
Ptr<Packet> bar = ScheduleBlockAckReqIfNeeded (recipient, tid);
|
||||
|
||||
@@ -266,13 +266,6 @@ public:
|
||||
* The <i>nextSeqNumber</i> parameter is used to block transmission of packets that are out of bitmap.
|
||||
*/
|
||||
void NotifyMpduTransmission (Mac48Address recipient, uint8_t tid, uint16_t nextSeqNumber, WifiMacHeader::QosAckPolicy policy);
|
||||
/**
|
||||
* \param recipient Address of peer station involved in block ack mechanism.
|
||||
* \param tid Traffic ID of transmitted packet.
|
||||
*
|
||||
* This method to set the number of packets waiting for blockAck = 0 since the receiver will send the blockAck right away
|
||||
*/
|
||||
void CompleteAmpduExchange (Mac48Address recipient, uint8_t tid);
|
||||
/**
|
||||
* \param nPackets Minimum number of packets for use of block ack.
|
||||
*
|
||||
|
||||
@@ -558,9 +558,6 @@ MacLow::StartTransmission (Ptr<WifiMacQueueItem> mpdu,
|
||||
{
|
||||
m_currentPacket = Create<WifiPsdu> (mpduList);
|
||||
|
||||
// assume implicit block ack for now
|
||||
qosTxop->CompleteAmpduTransfer (hdr.GetAddr1 (), tid);
|
||||
|
||||
if (qosTxop->GetBaBufferSize (hdr.GetAddr1 (), tid) > 64)
|
||||
{
|
||||
m_txParams.EnableExtendedCompressedBlockAck ();
|
||||
@@ -580,11 +577,6 @@ MacLow::StartTransmission (Ptr<WifiMacQueueItem> mpdu,
|
||||
m_currentPacket = Create<WifiPsdu> (mpdu, true);
|
||||
m_currentPacket->SetAckPolicyForTid (tid, WifiMacHeader::NORMAL_ACK);
|
||||
|
||||
if (qosTxop->GetBaAgreementEstablished (hdr.GetAddr1 (), tid))
|
||||
{
|
||||
qosTxop->CompleteAmpduTransfer (hdr.GetAddr1 (), tid);
|
||||
}
|
||||
|
||||
//VHT/HE single MPDUs are followed by normal ACKs
|
||||
m_txParams.EnableAck ();
|
||||
NS_LOG_DEBUG ("tx unicast S-MPDU with sequence number " << hdr.GetSequenceNumber ());
|
||||
|
||||
@@ -25,9 +25,7 @@ namespace ns3 {
|
||||
|
||||
OriginatorBlockAckAgreement::OriginatorBlockAckAgreement (Mac48Address recipient, uint8_t tid)
|
||||
: BlockAckAgreement (recipient, tid),
|
||||
m_state (PENDING),
|
||||
m_sentMpdus (0),
|
||||
m_needBlockAckReq (false)
|
||||
m_state (PENDING)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,11 +37,6 @@ void
|
||||
OriginatorBlockAckAgreement::SetState (State state)
|
||||
{
|
||||
m_state = state;
|
||||
if (state == INACTIVE)
|
||||
{
|
||||
m_needBlockAckReq = false;
|
||||
m_sentMpdus = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -82,23 +75,4 @@ OriginatorBlockAckAgreement::IsReset (void) const
|
||||
return (m_state == RESET) ? true : false;
|
||||
}
|
||||
|
||||
void
|
||||
OriginatorBlockAckAgreement::NotifyMpduTransmission (uint16_t nextSeqNumber)
|
||||
{
|
||||
NS_ASSERT (m_sentMpdus < m_bufferSize);
|
||||
m_sentMpdus++;
|
||||
uint16_t delta = (nextSeqNumber - m_startingSeq + 4096) % 4096;
|
||||
if (delta >= m_bufferSize || m_sentMpdus == m_bufferSize)
|
||||
{
|
||||
m_needBlockAckReq = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
OriginatorBlockAckAgreement::CompleteExchange (void)
|
||||
{
|
||||
m_needBlockAckReq = false;
|
||||
m_sentMpdus = 0;
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -157,20 +157,9 @@ public:
|
||||
* false otherwise
|
||||
*/
|
||||
bool IsRejected (void) const;
|
||||
/**
|
||||
* Notifies a packet's transmission with ack policy Block Ack.
|
||||
*
|
||||
* \param nextSeqNumber
|
||||
*/
|
||||
void NotifyMpduTransmission (uint16_t nextSeqNumber);
|
||||
/// Complete exchange function
|
||||
void CompleteExchange (void);
|
||||
|
||||
|
||||
private:
|
||||
State m_state; ///< state
|
||||
uint16_t m_sentMpdus; ///< sent MPDUs
|
||||
bool m_needBlockAckReq; ///< flag whether it needs a Block ACK request
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -128,12 +128,6 @@ QosTxop::GetBaAgreementEstablished (Mac48Address address, uint8_t tid) const
|
||||
return m_baManager->ExistsAgreementInState (address, tid, OriginatorBlockAckAgreement::ESTABLISHED);
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::CompleteAmpduTransfer (Mac48Address recipient, uint8_t tid)
|
||||
{
|
||||
m_baManager->CompleteAmpduExchange (recipient, tid);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
QosTxop::GetBaBufferSize (Mac48Address address, uint8_t tid) const
|
||||
{
|
||||
|
||||
@@ -143,14 +143,6 @@ public:
|
||||
* <i>recipient</i> for tid <i>tid</i>.
|
||||
*/
|
||||
bool GetBaAgreementEstablished (Mac48Address address, uint8_t tid) const;
|
||||
/**
|
||||
* \param recipient address of peer station involved in block ack mechanism.
|
||||
* \param tid Ttraffic ID of transmitted packet.
|
||||
*
|
||||
* This function resets the status of OriginatorBlockAckAgreement after the transfer
|
||||
* of an A-MPDU with ImmediateBlockAck policy (i.e. no BAR is scheduled).
|
||||
*/
|
||||
void CompleteAmpduTransfer (Mac48Address recipient, uint8_t tid);
|
||||
/**
|
||||
* \param address recipient address of the peer station
|
||||
* \param tid traffic ID.
|
||||
|
||||
Reference in New Issue
Block a user