diff --git a/src/wifi/model/block-ack-manager.cc b/src/wifi/model/block-ack-manager.cc index 50f6c259a..76033b65e 100644 --- a/src/wifi/model/block-ack-manager.cc +++ b/src/wifi/model/block-ack-manager.cc @@ -250,15 +250,6 @@ BlockAckManager::StorePacket (Ptr 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 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 bar = ScheduleBlockAckReqIfNeeded (recipient, tid); diff --git a/src/wifi/model/block-ack-manager.h b/src/wifi/model/block-ack-manager.h index ff6dcd432..ed2540411 100644 --- a/src/wifi/model/block-ack-manager.h +++ b/src/wifi/model/block-ack-manager.h @@ -266,13 +266,6 @@ public: * The nextSeqNumber 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. * diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 077e9f045..375dcf0d9 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -558,9 +558,6 @@ MacLow::StartTransmission (Ptr mpdu, { m_currentPacket = Create (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 mpdu, m_currentPacket = Create (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 ()); diff --git a/src/wifi/model/originator-block-ack-agreement.cc b/src/wifi/model/originator-block-ack-agreement.cc index 42c947e82..32c25739d 100644 --- a/src/wifi/model/originator-block-ack-agreement.cc +++ b/src/wifi/model/originator-block-ack-agreement.cc @@ -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 diff --git a/src/wifi/model/originator-block-ack-agreement.h b/src/wifi/model/originator-block-ack-agreement.h index a95cf2d37..5d251dd32 100644 --- a/src/wifi/model/originator-block-ack-agreement.h +++ b/src/wifi/model/originator-block-ack-agreement.h @@ -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 diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index 90e88163e..f76e67823 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -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 { diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index f8cb13b68..fe41edaae 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -143,14 +143,6 @@ public: * recipient for tid tid. */ 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.