wifi: Include link ID when notifying the Block Ack Manager
This commit is contained in:
committed by
Stefano Avallone
parent
90363ead05
commit
3cf872e27a
@@ -429,9 +429,9 @@ BlockAckManager::HandleInFlightMpdu(PacketQueueI mpduIt,
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::NotifyGotAck(Ptr<const WifiMpdu> mpdu)
|
||||
BlockAckManager::NotifyGotAck(uint8_t linkId, Ptr<const WifiMpdu> mpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *mpdu);
|
||||
NS_LOG_FUNCTION(this << linkId << *mpdu);
|
||||
NS_ASSERT(mpdu->GetHeader().IsQosData());
|
||||
|
||||
Mac48Address recipient = mpdu->GetHeader().GetAddr1();
|
||||
@@ -456,9 +456,9 @@ BlockAckManager::NotifyGotAck(Ptr<const WifiMpdu> mpdu)
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::NotifyMissedAck(Ptr<WifiMpdu> mpdu)
|
||||
BlockAckManager::NotifyMissedAck(uint8_t linkId, Ptr<WifiMpdu> mpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *mpdu);
|
||||
NS_LOG_FUNCTION(this << linkId << *mpdu);
|
||||
NS_ASSERT(mpdu->GetHeader().IsQosData());
|
||||
|
||||
Mac48Address recipient = mpdu->GetHeader().GetAddr1();
|
||||
@@ -481,12 +481,13 @@ BlockAckManager::NotifyMissedAck(Ptr<WifiMpdu> mpdu)
|
||||
}
|
||||
|
||||
std::pair<uint16_t, uint16_t>
|
||||
BlockAckManager::NotifyGotBlockAck(const CtrlBAckResponseHeader& blockAck,
|
||||
BlockAckManager::NotifyGotBlockAck(uint8_t linkId,
|
||||
const CtrlBAckResponseHeader& blockAck,
|
||||
Mac48Address recipient,
|
||||
const std::set<uint8_t>& tids,
|
||||
size_t index)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << blockAck << recipient << index);
|
||||
NS_LOG_FUNCTION(this << linkId << blockAck << recipient << index);
|
||||
uint16_t nSuccessfulMpdus = 0;
|
||||
uint16_t nFailedMpdus = 0;
|
||||
|
||||
@@ -564,9 +565,9 @@ BlockAckManager::NotifyGotBlockAck(const CtrlBAckResponseHeader& blockAck,
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::NotifyMissedBlockAck(Mac48Address recipient, uint8_t tid)
|
||||
BlockAckManager::NotifyMissedBlockAck(uint8_t linkId, Mac48Address recipient, uint8_t tid)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << recipient << +tid);
|
||||
NS_LOG_FUNCTION(this << linkId << recipient << +tid);
|
||||
if (ExistsAgreementInState(recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
|
||||
{
|
||||
AgreementsI it = m_agreements.find(std::make_pair(recipient, tid));
|
||||
|
||||
@@ -176,24 +176,27 @@ class BlockAckManager : public Object
|
||||
uint8_t tid = 8,
|
||||
Mac48Address recipient = Mac48Address::GetBroadcast());
|
||||
/**
|
||||
* Invoked upon receipt of an Ack frame after the transmission of a QoS data frame
|
||||
* sent under an established block ack agreement. Remove the acknowledged frame
|
||||
* from the outstanding packets and update the starting sequence number of the
|
||||
* Invoked upon receipt of an Ack frame on the given link after the transmission of a
|
||||
* QoS data frame sent under an established block ack agreement. Remove the acknowledged
|
||||
* frame from the outstanding packets and update the starting sequence number of the
|
||||
* transmit window, if needed.
|
||||
*
|
||||
* \param linkId the ID of the given link
|
||||
* \param mpdu The acknowledged MPDU.
|
||||
*/
|
||||
void NotifyGotAck(Ptr<const WifiMpdu> mpdu);
|
||||
void NotifyGotAck(uint8_t linkId, Ptr<const WifiMpdu> mpdu);
|
||||
/**
|
||||
* Invoked upon missed reception of an Ack frame after the transmission of a
|
||||
* QoS data frame sent under an established block ack agreement. Remove the
|
||||
* acknowledged frame from the outstanding packets and insert it in the
|
||||
* Invoked upon missed reception of an Ack frame on the given link after the
|
||||
* transmission of a QoS data frame sent under an established block ack agreement.
|
||||
* Remove the acknowledged frame from the outstanding packets and insert it in the
|
||||
* retransmission queue.
|
||||
*
|
||||
* \param linkId the ID of the given link
|
||||
* \param mpdu The unacknowledged MPDU.
|
||||
*/
|
||||
void NotifyMissedAck(Ptr<WifiMpdu> mpdu);
|
||||
void NotifyMissedAck(uint8_t linkId, Ptr<WifiMpdu> mpdu);
|
||||
/**
|
||||
* \param linkId the ID of the given link
|
||||
* \param blockAck The received BlockAck frame.
|
||||
* \param recipient Sender of BlockAck frame.
|
||||
* \param tids the set of TIDs the acknowledged MPDUs belong to
|
||||
@@ -202,26 +205,28 @@ class BlockAckManager : public Object
|
||||
* \return a pair of values indicating the number of successfully received MPDUs
|
||||
* and the number of failed MPDUs
|
||||
*
|
||||
* Invoked upon receipt of a BlockAck frame. Typically, this function, is called
|
||||
* by ns3::QosTxop object. Performs a check on which MPDUs, previously sent
|
||||
* Invoked upon receipt of a BlockAck frame on the given link. Typically, this function
|
||||
* is called by ns3::QosTxop object. Performs a check on which MPDUs, previously sent
|
||||
* with Ack Policy set to Block Ack, were correctly received by the recipient.
|
||||
* An acknowledged MPDU is removed from the buffer, retransmitted otherwise.
|
||||
* Note that <i>tids</i> is only used if <i>blockAck</i> is a Multi-STA Block Ack
|
||||
* using All-ack context.
|
||||
*/
|
||||
std::pair<uint16_t, uint16_t> NotifyGotBlockAck(const CtrlBAckResponseHeader& blockAck,
|
||||
std::pair<uint16_t, uint16_t> NotifyGotBlockAck(uint8_t linkId,
|
||||
const CtrlBAckResponseHeader& blockAck,
|
||||
Mac48Address recipient,
|
||||
const std::set<uint8_t>& tids,
|
||||
size_t index = 0);
|
||||
/**
|
||||
* \param linkId the ID of the given link
|
||||
* \param recipient Sender of the expected BlockAck frame.
|
||||
* \param tid Traffic ID.
|
||||
*
|
||||
* Invoked upon missed reception of a block ack frame. Typically, this function, is called
|
||||
* by ns3::QosTxop object. Performs a check on which MPDUs, previously sent
|
||||
* with ack policy set to Block Ack, should be placed in the retransmission queue.
|
||||
* Invoked upon missed reception of a block ack frame on the given link. Typically, this
|
||||
* function is called by ns3::QosTxop object. Performs a check on which MPDUs, previously
|
||||
* sent with ack policy set to Block Ack, should be placed in the retransmission queue.
|
||||
*/
|
||||
void NotifyMissedBlockAck(Mac48Address recipient, uint8_t tid);
|
||||
void NotifyMissedBlockAck(uint8_t linkId, Mac48Address recipient, uint8_t tid);
|
||||
/**
|
||||
* \param recipient Address of peer station involved in block ack mechanism.
|
||||
* \param tid Traffic ID.
|
||||
|
||||
@@ -1756,7 +1756,7 @@ HeFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
mpdu->GetPacket()->PeekHeader(blockAck);
|
||||
uint8_t tid = blockAck.GetTidInfo();
|
||||
std::pair<uint16_t, uint16_t> ret =
|
||||
GetBaManager(tid)->NotifyGotBlockAck(blockAck, hdr.GetAddr2(), {tid});
|
||||
GetBaManager(tid)->NotifyGotBlockAck(m_linkId, blockAck, hdr.GetAddr2(), {tid});
|
||||
GetWifiRemoteStationManager()->ReportAmpduTxStatus(hdr.GetAddr2(),
|
||||
ret.first,
|
||||
ret.second,
|
||||
@@ -1821,7 +1821,7 @@ HeFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
{
|
||||
// Acknowledgment context
|
||||
NS_ABORT_IF(m_psduMap.empty() || m_psduMap.begin()->first != staId);
|
||||
GetBaManager(tid)->NotifyGotAck(*m_psduMap.at(staId)->begin());
|
||||
GetBaManager(tid)->NotifyGotAck(m_linkId, *m_psduMap.at(staId)->begin());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1837,7 +1837,8 @@ HeFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
}
|
||||
|
||||
std::pair<uint16_t, uint16_t> ret =
|
||||
GetBaManager(tid)->NotifyGotBlockAck(blockAck,
|
||||
GetBaManager(tid)->NotifyGotBlockAck(m_linkId,
|
||||
blockAck,
|
||||
hdr.GetAddr2(),
|
||||
{tid},
|
||||
index);
|
||||
|
||||
@@ -595,7 +595,7 @@ HtFrameExchangeManager::NotifyReceivedNormalAck(Ptr<WifiMpdu> mpdu)
|
||||
if (edca->GetBaAgreementEstablished(mpdu->GetHeader().GetAddr1(), tid))
|
||||
{
|
||||
// notify the BA manager that the MPDU was acknowledged
|
||||
edca->GetBaManager()->NotifyGotAck(mpdu);
|
||||
edca->GetBaManager()->NotifyGotAck(m_linkId, mpdu);
|
||||
}
|
||||
}
|
||||
else if (mpdu->GetHeader().IsAction())
|
||||
@@ -722,7 +722,7 @@ HtFrameExchangeManager::RetransmitMpduAfterMissedAck(Ptr<WifiMpdu> mpdu) const
|
||||
if (edca->GetBaAgreementEstablished(mpdu->GetHeader().GetAddr1(), tid))
|
||||
{
|
||||
// notify the BA manager that the MPDU was not acknowledged
|
||||
edca->GetBaManager()->NotifyMissedAck(mpdu);
|
||||
edca->GetBaManager()->NotifyMissedAck(m_linkId, mpdu);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1293,7 +1293,7 @@ HtFrameExchangeManager::MissedBlockAck(Ptr<WifiPsdu> psdu,
|
||||
else
|
||||
{
|
||||
NS_LOG_DEBUG("Missed Block Ack, retransmit data frames");
|
||||
GetBaManager(tid)->NotifyMissedBlockAck(recipient, tid);
|
||||
GetBaManager(tid)->NotifyMissedBlockAck(m_linkId, recipient, tid);
|
||||
resetCw = false;
|
||||
}
|
||||
}
|
||||
@@ -1408,7 +1408,7 @@ HtFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
mpdu->GetPacket()->PeekHeader(blockAck);
|
||||
uint8_t tid = blockAck.GetTidInfo();
|
||||
std::pair<uint16_t, uint16_t> ret =
|
||||
GetBaManager(tid)->NotifyGotBlockAck(blockAck, hdr.GetAddr2(), {tid});
|
||||
GetBaManager(tid)->NotifyGotBlockAck(m_linkId, blockAck, hdr.GetAddr2(), {tid});
|
||||
GetWifiRemoteStationManager()->ReportAmpduTxStatus(hdr.GetAddr2(),
|
||||
ret.first,
|
||||
ret.second,
|
||||
|
||||
Reference in New Issue
Block a user