Skip to content

Commit

Permalink
wifi: Fix incorrect TX duration calculated in MinstrelHt
Browse files Browse the repository at this point in the history
  • Loading branch information
sderonne committed Nov 24, 2024
1 parent 2a9b568 commit 2c00428
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/wifi/model/rate-control/minstrel-ht-wifi-manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ MinstrelHtWifiManager::CalculateMpduTxDuration(Ptr<WifiPhy> phy,
txvector.SetNess(0);
txvector.SetStbc(false);
txvector.SetMode(mode);
txvector.SetPreambleType(WIFI_PREAMBLE_HT_MF);
txvector.SetPreambleType(GetPreambleForTransmission(mode.GetModulationClass()));
return WifiPhy::CalculatePhyPreambleAndHeaderDuration(txvector) +
WifiPhy::GetPayloadDuration(m_frameLength, txvector, phy->GetPhyBand(), mpduType);
}
Expand Down
2 changes: 1 addition & 1 deletion src/wifi/model/wifi-phy-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GetGuardIntervalForMode(WifiMode mode, bool htShortGuardInterval, Time heGuardIn
}

WifiPreamble
GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble /* = false */)
{
if (modulation == WIFI_MOD_CLASS_EHT)
{
Expand Down
3 changes: 2 additions & 1 deletion src/wifi/model/wifi-phy-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ Time GetGuardIntervalForMode(WifiMode mode, bool htShortGuardInterval, Time heGu
*
* @return the preamble to be used for the transmission
*/
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble);
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation,
bool useShortPreamble = false);

/**
* Return the modulation class corresponding to the given preamble type.
Expand Down

0 comments on commit 2c00428

Please sign in to comment.