wifi: (fixes #468) Compute correct size of MU-BAR Trigger Frames

This commit is contained in:
Stefano Avallone
2021-10-11 23:09:18 +02:00
parent dba8375e18
commit dcf022ad8b
3 changed files with 10 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ New user-visible features
Bugs fixed
----------
- (wifi) #467 - WiFi: Failed association process
- (wifi) #468 - WiFi: Wrong txDuration for trigger frame
Release 3.35
============

View File

@@ -356,7 +356,8 @@ HeFrameExchangeManager::SendPsduMap (void)
m_staExpectTbPpduFrom.insert (station.first);
}
Time txDuration = m_phy->CalculateTxDuration (m_triggerFrame->GetSize (),
Ptr<WifiPsdu> triggerPsdu = GetWifiPsdu (m_triggerFrame, acknowledgment->muBarTxVector);
Time txDuration = m_phy->CalculateTxDuration (triggerPsdu->GetSize (),
acknowledgment->muBarTxVector,
m_phy->GetPhyBand ());
// update acknowledgmentTime to correctly set the Duration/ID
@@ -372,7 +373,7 @@ HeFrameExchangeManager::SendPsduMap (void)
&m_staExpectTbPpduFrom, m_staExpectTbPpduFrom.size ());
m_channelAccessManager->NotifyAckTimeoutStartNow (timeout);
ForwardMpduDown (m_triggerFrame, acknowledgment->muBarTxVector);
ForwardPsduDown (triggerPsdu, acknowledgment->muBarTxVector);
return;
}
}
@@ -733,6 +734,11 @@ HeFrameExchangeManager::CalculateAcknowledgmentTime (WifiAcknowledgment* acknowl
txVector, m_phy->GetPhyBand ());
uint32_t muBarSize = GetMuBarSize (dlMuTfMuBarAcknowledgment->barTypes);
if (dlMuTfMuBarAcknowledgment->muBarTxVector.GetModulationClass () >= WIFI_MOD_CLASS_VHT)
{
// MU-BAR TF will be sent as an S-MPDU
muBarSize = MpduAggregator::GetSizeIfAggregated (muBarSize, 0);
}
dlMuTfMuBarAcknowledgment->acknowledgmentTime = m_phy->GetSifs ()
+ m_phy->CalculateTxDuration (muBarSize,
dlMuTfMuBarAcknowledgment->muBarTxVector,

View File

@@ -431,7 +431,7 @@ HtFrameExchangeManager::SendMpduFromBaManager (Ptr<QosTxop> edca, Time available
// we can transmit the BlockAckReq frame
Ptr<const WifiMacQueueItem> mpdu = edca->GetBaManager ()->GetBar ();
SendPsduWithProtection (Create<WifiPsdu> (mpdu, false), txParams);
SendPsduWithProtection (GetWifiPsdu (Copy (mpdu), txParams.m_txVector), txParams);
return true;
}