wifi: Pass reference instead of pointer to RecipientBlockAckAgreement::FillBlockAckBitmap
This commit is contained in:
@@ -1740,7 +1740,7 @@ HeFrameExchangeManager::SendMultiStaBlockAck(const WifiTxParameters& txParams, T
|
||||
|
||||
auto agreement = m_mac->GetBaAgreementEstablishedAsRecipient(receiver, tid);
|
||||
NS_ASSERT(agreement);
|
||||
agreement->get().FillBlockAckBitmap(&blockAck, index);
|
||||
agreement->get().FillBlockAckBitmap(blockAck, index);
|
||||
NS_LOG_DEBUG("Multi-STA Block Ack: Sending Block Ack with seq="
|
||||
<< blockAck.GetStartingSequence(index) << " to=" << receiver
|
||||
<< " tid=" << +tid);
|
||||
|
||||
@@ -1485,7 +1485,7 @@ HtFrameExchangeManager::SendBlockAck(const RecipientBlockAckAgreement& agreement
|
||||
CtrlBAckResponseHeader blockAck;
|
||||
blockAck.SetType(agreement.GetBlockAckType());
|
||||
blockAck.SetTidInfo(agreement.GetTid());
|
||||
agreement.FillBlockAckBitmap(&blockAck);
|
||||
agreement.FillBlockAckBitmap(blockAck);
|
||||
|
||||
Ptr<Packet> packet = Create<Packet>();
|
||||
packet->AddHeader(blockAck);
|
||||
|
||||
@@ -218,20 +218,20 @@ RecipientBlockAckAgreement::NotifyReceivedBar(uint16_t startingSequenceNumber)
|
||||
}
|
||||
|
||||
void
|
||||
RecipientBlockAckAgreement::FillBlockAckBitmap(CtrlBAckResponseHeader* blockAckHeader,
|
||||
RecipientBlockAckAgreement::FillBlockAckBitmap(CtrlBAckResponseHeader& blockAckHeader,
|
||||
std::size_t index) const
|
||||
{
|
||||
NS_LOG_FUNCTION(this << blockAckHeader << index);
|
||||
if (blockAckHeader->IsBasic())
|
||||
if (blockAckHeader.IsBasic())
|
||||
{
|
||||
NS_FATAL_ERROR("Basic block ack is not supported.");
|
||||
}
|
||||
else if (blockAckHeader->IsMultiTid())
|
||||
else if (blockAckHeader.IsMultiTid())
|
||||
{
|
||||
NS_FATAL_ERROR("Multi-tid block ack is not supported.");
|
||||
}
|
||||
else if (blockAckHeader->IsCompressed() || blockAckHeader->IsExtendedCompressed() ||
|
||||
blockAckHeader->IsMultiSta())
|
||||
else if (blockAckHeader.IsCompressed() || blockAckHeader.IsExtendedCompressed() ||
|
||||
blockAckHeader.IsMultiSta())
|
||||
{
|
||||
// The Starting Sequence Number subfield of the Block Ack Starting Sequence
|
||||
// Control subfield of the BlockAck frame shall be set to any value in the
|
||||
@@ -239,14 +239,14 @@ RecipientBlockAckAgreement::FillBlockAckBitmap(CtrlBAckResponseHeader* blockAckH
|
||||
// We set it to WinStartR
|
||||
uint16_t ssn = m_scoreboard.GetWinStart();
|
||||
NS_LOG_DEBUG("SSN=" << ssn);
|
||||
blockAckHeader->SetStartingSequence(ssn, index);
|
||||
blockAckHeader->ResetBitmap(index);
|
||||
blockAckHeader.SetStartingSequence(ssn, index);
|
||||
blockAckHeader.ResetBitmap(index);
|
||||
|
||||
for (std::size_t i = 0; i < m_scoreboard.GetWinSize(); i++)
|
||||
{
|
||||
if (m_scoreboard.At(i))
|
||||
{
|
||||
blockAckHeader->SetReceivedPacket((ssn + i) % SEQNO_SPACE_SIZE, index);
|
||||
blockAckHeader.SetReceivedPacket((ssn + i) % SEQNO_SPACE_SIZE, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class RecipientBlockAckAgreement : public BlockAckAgreement
|
||||
* @param blockAckHeader the block ack header
|
||||
* @param index the index of the Per AID TID Info subfield (Multi-STA Block Ack only)
|
||||
*/
|
||||
void FillBlockAckBitmap(CtrlBAckResponseHeader* blockAckHeader, std::size_t index = 0) const;
|
||||
void FillBlockAckBitmap(CtrlBAckResponseHeader& blockAckHeader, std::size_t index = 0) const;
|
||||
/**
|
||||
* This is called when a Block Ack agreement is destroyed to flush the
|
||||
* received packets.
|
||||
|
||||
Reference in New Issue
Block a user