wifi: Generate backoff if needed when unblocking links after BA agreement
This commit is contained in:
committed by
Stefano Avallone
parent
3cea322710
commit
2bb301a8db
@@ -618,6 +618,15 @@ QosTxop::GotAddBaResponse(const MgtAddBaResponseHeader& respHdr, Mac48Address re
|
||||
{
|
||||
NS_LOG_FUNCTION(this << respHdr << recipient);
|
||||
uint8_t tid = respHdr.GetTid();
|
||||
|
||||
// save the status of the AC queues before unblocking the transmissions to the recipient
|
||||
// (performed by the calls to the BlockAckManager below)
|
||||
std::map<uint8_t, bool> hasFramesToTransmit;
|
||||
for (const auto& [id, link] : GetLinks())
|
||||
{
|
||||
hasFramesToTransmit[id] = HasFramesToTransmit(id);
|
||||
}
|
||||
|
||||
if (respHdr.GetStatusCode().IsSuccess())
|
||||
{
|
||||
NS_LOG_DEBUG("block ack agreement established with " << recipient << " tid " << +tid);
|
||||
@@ -644,7 +653,7 @@ QosTxop::GotAddBaResponse(const MgtAddBaResponseHeader& respHdr, Mac48Address re
|
||||
|
||||
for (const auto& [id, link] : GetLinks())
|
||||
{
|
||||
StartAccessIfNeeded(id);
|
||||
StartAccessAfterEvent(id, hasFramesToTransmit.at(id), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,12 +670,20 @@ QosTxop::NotifyOriginatorAgreementNoReply(const Mac48Address& recipient, uint8_t
|
||||
{
|
||||
NS_LOG_FUNCTION(this << recipient << tid);
|
||||
|
||||
// save the status of the AC queues before unblocking the transmissions to the recipient
|
||||
// (performed by the call to the BlockAckManager below)
|
||||
std::map<uint8_t, bool> hasFramesToTransmit;
|
||||
for (const auto& [id, link] : GetLinks())
|
||||
{
|
||||
hasFramesToTransmit[id] = HasFramesToTransmit(id);
|
||||
}
|
||||
|
||||
m_baManager->NotifyOriginatorAgreementNoReply(recipient, tid);
|
||||
// the recipient has been "unblocked" and transmissions can resume using normal
|
||||
// acknowledgment, hence start access (if needed) on all the links
|
||||
for (const auto& [id, link] : GetLinks())
|
||||
{
|
||||
StartAccessIfNeeded(id);
|
||||
StartAccessAfterEvent(id, hasFramesToTransmit.at(id), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user