wifi: Pass allowed TX width to GetDataTxVector()

This commit is contained in:
Stefano Avallone
2022-05-04 17:58:15 +02:00
committed by Stefano Avallone
parent 46d28c1c6a
commit 49d710fabe
40 changed files with 204 additions and 123 deletions

View File

@@ -80,7 +80,7 @@ AirtimeLinkMetricCalculator::CalculateMetric (Mac48Address peerAddress, Ptr<Mesh
*/
NS_ASSERT (!peerAddress.IsGroup ());
//obtain current rate:
WifiMode mode = mac->GetWifiRemoteStationManager ()->GetDataTxVector (m_testHeader).GetMode();
WifiMode mode = mac->GetWifiRemoteStationManager ()->GetDataTxVector (m_testHeader, mac->GetWifiPhy ()->GetChannelWidth ()).GetMode();
//obtain frame error rate:
double failAvg = mac->GetWifiRemoteStationManager ()->GetInfo (peerAddress).GetFrameErrorRate ();
if (failAvg == 1)

View File

@@ -72,7 +72,7 @@ WaveFrameExchangeManager::GetDataTxVector (Ptr<const WifiMacQueueItem> item) con
// will be determined by MAC layer itself.
if (!found)
{
return m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (item->GetHeader ());
return m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (item->GetHeader (), m_allowedWidth);
}
// if high layer has set the transmit parameters with non-adaption mode,
@@ -85,7 +85,7 @@ WaveFrameExchangeManager::GetDataTxVector (Ptr<const WifiMacQueueItem> item) con
// if high layer has set the transmit parameters with non-adaption mode,
// the real transmit parameters are determined by both high layer and MAC layer.
WifiTxVector txHigher = datatag.GetTxVector ();
WifiTxVector txMac = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (item->GetHeader ());
WifiTxVector txMac = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (item->GetHeader (), m_allowedWidth);
WifiTxVector txAdapter;
txAdapter.SetChannelWidth (10);
// the DataRate set by higher layer is the minimum data rate

View File

@@ -322,7 +322,7 @@ FrameExchangeManager::StartTransmission (Ptr<Txop> dcf, uint16_t allowedWidth)
NS_ASSERT (m_protectionManager != 0);
NS_ASSERT (m_ackManager != 0);
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_protection = m_protectionManager->TryAddMpdu (mpdu, txParams);
txParams.m_acknowledgment = m_ackManager->TryAddMpdu (mpdu, txParams);
txParams.AddMpdu (mpdu);

View File

@@ -233,7 +233,7 @@ RrMultiUserScheduler::GetTxVectorForUlMu (Func canbeSolicited)
WifiMacHeader hdr (WIFI_MAC_QOSDATA);
hdr.SetAddr1 (staIt->address);
hdr.SetAddr2 (m_apMac->GetAddress ());
WifiTxVector suTxVector = GetWifiRemoteStationManager ()->GetDataTxVector (hdr);
WifiTxVector suTxVector = GetWifiRemoteStationManager ()->GetDataTxVector (hdr, m_allowedWidth);
txVector.SetHeMuUserInfo (staIt->aid,
{HeRu::RuSpec (), // assigned later by FinalizeTxVector
suTxVector.GetMode (),
@@ -609,7 +609,7 @@ RrMultiUserScheduler::TrySendingDlMuPpdu (void)
// candidate station to check if the MPDU meets the size and time limits.
// An RU of the computed size is tentatively assigned to the candidate
// station, so that the TX duration can be correctly computed.
WifiTxVector suTxVector = GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader ()),
WifiTxVector suTxVector = GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth),
txVectorCopy = m_txParams.m_txVector;
m_txParams.m_txVector.SetHeMuUserInfo (staIt->aid,

View File

@@ -180,7 +180,7 @@ HtFrameExchangeManager::SendAddBaRequest (Mac48Address dest, uint8_t tid, uint16
mpdu->GetHeader ().SetSequenceNumber (sequence);
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_protection = std::unique_ptr<WifiProtection> (new WifiNoProtection);
txParams.m_acknowledgment = GetAckManager ()->TryAddMpdu (mpdu, txParams);
@@ -408,7 +408,7 @@ HtFrameExchangeManager::SendMpduFromBaManager (Ptr<QosTxop> edca, Time available
// The m_txVector field of the TX parameters is set to the BlockAckReq TxVector
// a few lines below.
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader (), m_allowedWidth);
txParams.m_protection = std::unique_ptr<WifiProtection> (new WifiNoProtection);
txParams.m_acknowledgment = GetAckManager ()->TryAddMpdu (peekedItem, txParams);
@@ -450,7 +450,7 @@ HtFrameExchangeManager::SendDataFrame (Ptr<const WifiMacQueueItem> peekedItem,
Ptr<QosTxop> edca = m_mac->GetQosTxop (peekedItem->GetHeader ().GetQosTid ());
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader (), m_allowedWidth);
Ptr<WifiMacQueueItem> mpdu = edca->GetNextMpdu (peekedItem, txParams, availableTime, initialFrame);
if (mpdu == nullptr)

View File

@@ -276,7 +276,7 @@ QosFrameExchangeManager::StartFrameExchange (Ptr<QosTxop> edca, Time availableTi
}
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
Ptr<WifiMacQueueItem> item = edca->GetNextMpdu (mpdu, txParams, availableTime, initialFrame);

View File

@@ -247,9 +247,9 @@ AarfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
AarfWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
AarfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
AarfWifiRemoteStation *station = static_cast<AarfWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -64,7 +64,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
uint32_t m_minTimerThreshold; ///< minimum timer threshold

View File

@@ -315,9 +315,9 @@ AarfcdWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
AarfcdWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
AarfcdWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
AarfcdWifiRemoteStation *station = static_cast<AarfcdWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -78,7 +78,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
bool DoNeedRts (WifiRemoteStation *station,
uint32_t size, bool normally) override;

View File

@@ -319,9 +319,9 @@ AmrrWifiManager::UpdateMode (AmrrWifiRemoteStation *station)
}
WifiTxVector
AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
AmrrWifiRemoteStation *station = static_cast<AmrrWifiRemoteStation*> (st);
UpdateMode (station);
NS_ASSERT (station->m_txrate < GetNSupported (station));

View File

@@ -67,7 +67,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/**

View File

@@ -336,9 +336,9 @@ AparfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
AparfWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
AparfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
AparfWifiRemoteStation *station = static_cast<AparfWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -79,7 +79,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/** Check for initializations.

View File

@@ -224,9 +224,9 @@ ArfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
ArfWifiRemoteStation *station = static_cast<ArfWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -70,7 +70,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
uint32_t m_timerThreshold; ///< timer threshold

View File

@@ -197,9 +197,9 @@ CaraWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st)
}
WifiTxVector
CaraWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
CaraWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
CaraWifiRemoteStation *station = static_cast<CaraWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -66,7 +66,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
bool DoNeedRts (WifiRemoteStation *station,
uint32_t size, bool normally) override;

View File

@@ -116,15 +116,15 @@ ConstantRateWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
ConstantRateWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
ConstantRateWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
uint8_t nss = Min (GetMaxNumberOfTransmitStreams (), GetNumberOfSupportedStreams (st));
if (m_dataMode.GetModulationClass () == WIFI_MOD_CLASS_HT)
{
nss = 1 + (m_dataMode.GetMcsValue () / 8);
}
return WifiTxVector (m_dataMode, GetDefaultTxPowerLevel (), GetPreambleForTransmission (m_dataMode.GetModulationClass (), GetShortPreambleEnabled ()), ConvertGuardIntervalToNanoSeconds (m_dataMode, GetShortGuardIntervalSupported (st), NanoSeconds (GetGuardInterval (st))), GetNumberOfAntennas (), nss, 0, GetChannelWidthForTransmission (m_dataMode, GetPhy ()->GetChannelWidth (), GetChannelWidth (st)), GetAggregation (st));
return WifiTxVector (m_dataMode, GetDefaultTxPowerLevel (), GetPreambleForTransmission (m_dataMode.GetModulationClass (), GetShortPreambleEnabled ()), ConvertGuardIntervalToNanoSeconds (m_dataMode, GetShortGuardIntervalSupported (st), NanoSeconds (GetGuardInterval (st))), GetNumberOfAntennas (), nss, 0, GetChannelWidthForTransmission (m_dataMode, allowedWidth, GetChannelWidth (st)), GetAggregation (st));
}
WifiTxVector

View File

@@ -56,7 +56,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
WifiMode m_dataMode; //!< Wifi mode for unicast Data frames

View File

@@ -312,9 +312,9 @@ IdealWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
IdealWifiRemoteStation *station = static_cast<IdealWifiRemoteStation*> (st);
//We search within the Supported rate set the mode with the
//highest data rate for which the SNR threshold is smaller than m_lastSnr
@@ -325,7 +325,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
uint64_t bestRate = 0;
uint8_t selectedNss = 1;
uint16_t guardInterval;
uint16_t channelWidth = std::min (GetChannelWidth (station), GetPhy ()->GetChannelWidth ());
uint16_t channelWidth = std::min (GetChannelWidth (station), allowedWidth);
txVector.SetChannelWidth (channelWidth);
if ((station->m_lastSnrCached != CACHE_INITIAL_VALUE) && (station->m_lastSnrObserved == station->m_lastSnrCached) && (channelWidth == station->m_lastChannelWidth))
{

View File

@@ -72,7 +72,7 @@ private:
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/**

View File

@@ -861,10 +861,68 @@ MinstrelHtWifiManager::UpdatePacketCounters (MinstrelHtWifiRemoteStation *statio
}
}
WifiTxVector
MinstrelHtWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
uint16_t
MinstrelHtWifiManager::UpdateRateAfterAllowedWidth (uint16_t txRate, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << txRate << allowedWidth);
auto groupId = GetGroupId (txRate);
McsGroup group = m_minstrelGroups[groupId];
if (group.chWidth <= allowedWidth)
{
NS_LOG_DEBUG ("Channel width is not greater than allowed width, nothing to do");
return txRate;
}
NS_ASSERT (GetHtSupported ());
NS_ASSERT (group.chWidth % 20 == 0);
// try halving the channel width and check if the group with the same number of
// streams and same GI is supported, until either a supported group is found or
// the width becomes lower than 20 MHz
uint16_t width = group.chWidth / 2;
while (width >= 20)
{
if (width > allowedWidth)
{
width /= 2;
continue;
}
switch (group.type)
{
case GROUP_HT:
groupId = GetHtGroupId (group.streams, group.gi, width);
break;
case GROUP_VHT:
groupId = GetVhtGroupId (group.streams, group.gi, width);
break;
case GROUP_HE:
groupId = GetHeGroupId (group.streams, group.gi, width);
break;
default:
NS_ABORT_MSG ("Unknown group type: " << group.type);
}
group = m_minstrelGroups[groupId];
if (group.isSupported)
{
break;
}
width /= 2;
}
NS_ABORT_MSG_IF (width < 20, "No rate compatible with the allowed width found");
return GetIndex (groupId, GetRateId (txRate));
}
WifiTxVector
MinstrelHtWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st << allowedWidth);
MinstrelHtWifiRemoteStation *station = static_cast<MinstrelHtWifiRemoteStation*> (st);
if (!station->m_initialized)
@@ -885,6 +943,7 @@ MinstrelHtWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
}
else
{
station->m_txrate = UpdateRateAfterAllowedWidth (station->m_txrate, allowedWidth);
NS_LOG_DEBUG ("DoGetDataMode m_txrate= " << station->m_txrate);
uint8_t rateId = GetRateId (station->m_txrate);

View File

@@ -256,7 +256,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
void DoReportAmpduTxStatus (WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus,
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
@@ -599,6 +599,22 @@ private:
*/
WifiModeList GetHtDeviceMcsList (void) const;
/**
* Given the index of the current TX rate, check whether the channel width is
* not greater than the given allowed width. If so, the index of the current TX
* rate is returned. Otherwise, try halving the channel width and check if the
* MCS group with the same number of streams and same GI is supported. If a
* supported MCS group is found, return the index of the TX rate within such a
* group with the same MCS as the given TX rate. If no supported MCS group is
* found, the simulation aborts.
*
* \param txRate the index of the current TX rate
* \param allowedWidth the allowed width in MHz
* \return the index of a TX rate whose channel width is not greater than the
* allowed width, if found (otherwise, the simulation aborts)
*/
uint16_t UpdateRateAfterAllowedWidth (uint16_t txRate, uint16_t allowedWidth);
Time m_updateStats; //!< How frequent do we calculate the stats.
Time m_legacyUpdateStats; //!< How frequent do we calculate the stats for legacy MinstrelWifiManager.
uint8_t m_lookAroundRate; //!< The % to try other rates than our current rate.

View File

@@ -849,9 +849,9 @@ MinstrelWifiManager::UpdateRetry (MinstrelWifiRemoteStation *station)
}
WifiTxVector
MinstrelWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
MinstrelWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
MinstrelWifiRemoteStation *station = static_cast<MinstrelWifiRemoteStation*> (st);
return GetDataTxVector (station);
}

View File

@@ -256,7 +256,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
bool DoNeedRetransmission (WifiRemoteStation *st,

View File

@@ -281,9 +281,9 @@ OnoeWifiManager::UpdateMode (OnoeWifiRemoteStation *station)
}
WifiTxVector
OnoeWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
OnoeWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
OnoeWifiRemoteStation *station = static_cast<OnoeWifiRemoteStation*> (st);
UpdateMode (station);
NS_ASSERT (station->m_txrate < GetNSupported (station));

View File

@@ -68,7 +68,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/**

View File

@@ -308,9 +308,9 @@ ParfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
}
WifiTxVector
ParfWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
ParfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
ParfWifiRemoteStation *station = static_cast<ParfWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -67,7 +67,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/** Check for initializations.

View File

@@ -345,9 +345,9 @@ RraaWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st)
}
WifiTxVector
RraaWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
RraaWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -84,7 +84,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
bool DoNeedRts (WifiRemoteStation *st,
uint32_t size, bool normally) override;

View File

@@ -387,9 +387,9 @@ RrpaaWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st)
}
WifiTxVector
RrpaaWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
RrpaaWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
RrpaaWifiRemoteStation *station = static_cast<RrpaaWifiRemoteStation*> (st);
uint16_t channelWidth = GetChannelWidth (station);
if (channelWidth > 20 && channelWidth != 22)

View File

@@ -109,7 +109,7 @@ private:
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
bool DoNeedRts (WifiRemoteStation *st,
uint32_t size, bool normally) override;

View File

@@ -307,15 +307,15 @@ ThompsonSamplingWifiManager::GetModeGuardInterval (WifiRemoteStation *st, WifiMo
}
WifiTxVector
ThompsonSamplingWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
ThompsonSamplingWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_FUNCTION (this << st << allowedWidth);
InitializeStation (st);
auto station = static_cast<ThompsonSamplingWifiRemoteStation *> (st);
auto &stats = station->m_mcsStats.at (station->m_nextMode);
WifiMode mode = stats.mode;
uint16_t channelWidth = std::min (stats.channelWidth, GetPhy ()->GetChannelWidth ());
uint16_t channelWidth = std::min (stats.channelWidth, allowedWidth);
uint8_t nss = stats.nss;
uint16_t guardInterval = GetModeGuardInterval (st, mode);

View File

@@ -65,7 +65,7 @@ private:
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
void DoReportFinalDataFailed (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) override;
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) override;
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
/**

View File

@@ -518,9 +518,9 @@ WifiRemoteStationManager::GetStaId (Mac48Address address, const WifiTxVector& tx
}
WifiTxVector
WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header)
WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header, uint16_t allowedWidth)
{
NS_LOG_FUNCTION (this << header);
NS_LOG_FUNCTION (this << header << allowedWidth);
Mac48Address address = header.GetAddr1 ();
if (!header.IsMgt () && address.IsGroup ())
{
@@ -529,7 +529,7 @@ WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header)
v.SetMode (mode);
v.SetPreambleType (GetPreambleForTransmission (mode.GetModulationClass (), GetShortPreambleEnabled ()));
v.SetTxPowerLevel (m_defaultTxPowerLevel);
v.SetChannelWidth (GetChannelWidthForTransmission (mode, m_wifiPhy->GetChannelWidth ()));
v.SetChannelWidth (GetChannelWidthForTransmission (mode, allowedWidth));
v.SetGuardInterval (ConvertGuardIntervalToNanoSeconds (mode, m_wifiPhy->GetDevice ()));
v.SetNTx (GetNumberOfAntennas ());
v.SetNss (1);
@@ -552,7 +552,7 @@ WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header)
txVector.SetMode (mgtMode);
txVector.SetPreambleType (GetPreambleForTransmission (mgtMode.GetModulationClass (), GetShortPreambleEnabled ()));
txVector.SetTxPowerLevel (m_defaultTxPowerLevel);
uint16_t channelWidth = m_wifiPhy->GetChannelWidth ();
uint16_t channelWidth = allowedWidth;
if (!header.GetAddr1 ().IsGroup ())
{
if (uint16_t rxWidth = GetChannelWidthSupported (header.GetAddr1 ());
@@ -567,7 +567,7 @@ WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header)
}
else
{
txVector = DoGetDataTxVector (Lookup (address));
txVector = DoGetDataTxVector (Lookup (address), allowedWidth);
txVector.SetLdpc (txVector.GetMode ().GetModulationClass () < WIFI_MOD_CLASS_HT ? 0 : UseLdpcForDestination (address));
}
Ptr<HeConfiguration> heConfiguration = m_wifiPhy->GetDevice ()->GetHeConfiguration ();
@@ -575,6 +575,12 @@ WifiRemoteStationManager::GetDataTxVector (const WifiMacHeader &header)
{
txVector.SetBssColor (heConfiguration->GetBssColor ());
}
// If both the allowed width and the TXVECTOR channel width are integer multiple
// of 20 MHz, then the TXVECTOR channel width must not exceed the allowed width
NS_ASSERT_MSG ((txVector.GetChannelWidth () % 20 != 0) || (allowedWidth % 20 != 0)
|| (txVector.GetChannelWidth () <= allowedWidth),
"TXVECTOR channel width (" << txVector.GetChannelWidth ()
<< " MHz) exceeds allowed width (" << allowedWidth << " MHz)");
return txVector;
}
@@ -957,7 +963,7 @@ WifiRemoteStationManager::NeedRts (const WifiMacHeader &header, uint32_t size)
{
NS_LOG_FUNCTION (this << header << size);
Mac48Address address = header.GetAddr1 ();
WifiTxVector txVector = GetDataTxVector (header);
WifiTxVector txVector = GetDataTxVector (header, m_wifiPhy->GetChannelWidth ());
WifiMode mode = txVector.GetMode ();
if (address.IsGroup ())
{

View File

@@ -710,10 +710,10 @@ public:
/**
* \param header MAC header
*
* \param allowedWidth the allowed width in MHz to send this packet
* \return the TXVECTOR to use to send this packet
*/
WifiTxVector GetDataTxVector (const WifiMacHeader &header);
WifiTxVector GetDataTxVector (const WifiMacHeader &header, uint16_t allowedWidth);
/**
* \param address remote address
*
@@ -1186,13 +1186,13 @@ private:
virtual WifiRemoteStation* DoCreateStation (void) const = 0;
/**
* \param station the station that we need to communicate
*
* \param allowedWidth the allowed width in MHz to send a packet to the station
* \return the TXVECTOR to use to send a packet to the station
*
* Note: This method is called before sending a unicast packet or a fragment
* of a unicast packet to decide which transmission mode to use.
*/
virtual WifiTxVector DoGetDataTxVector (WifiRemoteStation *station) = 0;
virtual WifiTxVector DoGetDataTxVector (WifiRemoteStation *station, uint16_t allowedWidth) = 0;
/**
* \param station the station that we need to communicate
*

View File

@@ -169,7 +169,7 @@ PowerRateAdaptationTest::TestParf ()
/*
* Parf initiates with maximal rate and power.
*/
WifiTxVector txVector = manager->GetDataTxVector (packetHeader);
WifiTxVector txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
WifiMode mode = txVector.GetMode ();
int power = (int) txVector.GetTxPowerLevel ();
@@ -187,7 +187,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -202,7 +202,7 @@ PowerRateAdaptationTest::TestParf ()
*/
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -222,7 +222,7 @@ PowerRateAdaptationTest::TestParf ()
}
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -237,7 +237,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -253,7 +253,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataFailed (mpdu);
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -271,7 +271,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -286,7 +286,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -304,7 +304,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -322,7 +322,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -342,7 +342,7 @@ PowerRateAdaptationTest::TestParf ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -391,7 +391,7 @@ PowerRateAdaptationTest::TestAparf ()
/*
* Aparf initiates with maximal rate and power.
*/
WifiTxVector txVector = manager->GetDataTxVector (packetHeader);
WifiTxVector txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
WifiMode mode = txVector.GetMode ();
int power = (int) txVector.GetTxPowerLevel ();
@@ -410,7 +410,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -425,7 +425,7 @@ PowerRateAdaptationTest::TestAparf ()
*/
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -444,7 +444,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -463,7 +463,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -481,7 +481,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -496,7 +496,7 @@ PowerRateAdaptationTest::TestAparf ()
*/
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -514,7 +514,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -530,7 +530,7 @@ PowerRateAdaptationTest::TestAparf ()
*/
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -548,7 +548,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -568,7 +568,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -580,7 +580,7 @@ PowerRateAdaptationTest::TestAparf ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -661,7 +661,7 @@ PowerRateAdaptationTest::TestRrpaa ()
/*
* RRPAA initiates with minimal rate and maximal power.
*/
WifiTxVector txVector = manager->GetDataTxVector (packetHeader);
WifiTxVector txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
WifiMode mode = txVector.GetMode ();
int power = (int) txVector.GetTxPowerLevel ();
@@ -683,7 +683,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -695,7 +695,7 @@ PowerRateAdaptationTest::TestRrpaa ()
*/
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -713,7 +713,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -722,7 +722,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -740,7 +740,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -752,7 +752,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -764,7 +764,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -776,7 +776,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -788,7 +788,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -800,7 +800,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -812,7 +812,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -832,7 +832,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -841,7 +841,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -860,7 +860,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -878,7 +878,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -896,7 +896,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -914,7 +914,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -930,7 +930,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -950,7 +950,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -962,7 +962,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -974,7 +974,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataFailed (mpdu);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -986,7 +986,7 @@ PowerRateAdaptationTest::TestRrpaa ()
manager->ReportDataOk (mpdu, 0, ackMode, 0, txVector);
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();
@@ -1012,7 +1012,7 @@ PowerRateAdaptationTest::TestRrpaa ()
}
}
txVector = manager->GetDataTxVector (packetHeader);
txVector = manager->GetDataTxVector (packetHeader, dev->GetPhy ()->GetChannelWidth ());
mode = txVector.GetMode ();
power = (int) txVector.GetTxPowerLevel ();

View File

@@ -196,7 +196,7 @@ AmpduAggregationTest::DoRun (void)
Ptr<const WifiMacQueueItem> peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
Ptr<WifiMacQueueItem> item = m_mac->GetBEQueue ()->GetNextMpdu (peeked, txParams, Time::Min (), true);
auto mpduList = mpduAggregator->GetNextAmpdu (item, txParams, Time::Min ());
@@ -278,7 +278,7 @@ AmpduAggregationTest::DoRun (void)
peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
txParams.Clear ();
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
item = m_mac->GetBEQueue ()->GetNextMpdu (peeked, txParams, Time::Min (), true);
mpduList = mpduAggregator->GetNextAmpdu (item, txParams, Time::Min ());
@@ -289,7 +289,7 @@ AmpduAggregationTest::DoRun (void)
peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
txParams.Clear ();
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
item = m_mac->GetBEQueue ()->GetNextMpdu (peeked, txParams, Time::Min (), true);
mpduList = mpduAggregator->GetNextAmpdu (item, txParams, Time::Min ());
@@ -427,7 +427,7 @@ TwoLevelAggregationTest::DoRun (void)
Ptr<const WifiMacQueueItem> peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
htFem->TryAddMpdu (peeked, txParams, Time::Min ());
Ptr<WifiMacQueueItem> item = msduAggregator->GetNextAmsdu (peeked, txParams, Time::Min ());
@@ -449,7 +449,7 @@ TwoLevelAggregationTest::DoRun (void)
peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
txParams.Clear ();
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
htFem->TryAddMpdu (peeked, txParams, Time::Min ());
item = msduAggregator->GetNextAmsdu (peeked, txParams, Time::Min ());
@@ -503,7 +503,7 @@ TwoLevelAggregationTest::DoRun (void)
peeked = m_mac->GetVIQueue ()->PeekNextMpdu ();
txParams.Clear ();
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
Time txopLimit = m_mac->GetVIQueue ()->GetTxopLimit (); // 3.008 ms
// Compute the first MPDU to be aggregated in an A-MPDU. It must contain an A-MSDU
@@ -691,7 +691,7 @@ HeAggregationTest::DoRunSubTest (uint16_t bufferSize)
Ptr<const WifiMacQueueItem> peeked = m_mac->GetBEQueue ()->PeekNextMpdu ();
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader ());
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peeked->GetHeader (), m_phy->GetChannelWidth ());
Ptr<WifiMacQueueItem> item = m_mac->GetBEQueue ()->GetNextMpdu (peeked, txParams, Time::Min (), true);
auto mpduList = mpduAggregator->GetNextAmpdu (item, txParams, Time::Min ());