wifi: FEMs call the remote station manager on the same link

This commit is contained in:
Stefano Avallone
2022-07-20 17:13:57 +02:00
committed by Stefano Avallone
parent ed257745b7
commit 6abb42d1db
5 changed files with 64 additions and 53 deletions

View File

@@ -164,6 +164,12 @@ FrameExchangeManager::SetChannelAccessManager (const Ptr<ChannelAccessManager> c
m_channelAccessManager = channelAccessManager;
}
Ptr<WifiRemoteStationManager>
FrameExchangeManager::GetWifiRemoteStationManager (void) const
{
return m_mac->GetWifiRemoteStationManager (m_linkId);
}
void
FrameExchangeManager::SetWifiPhy (Ptr<WifiPhy> phy)
{
@@ -335,7 +341,7 @@ FrameExchangeManager::StartTransmission (Ptr<Txop> dcf, uint16_t allowedWidth)
NS_ASSERT (m_protectionManager);
NS_ASSERT (m_ackManager);
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_txVector = 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);
@@ -356,12 +362,12 @@ FrameExchangeManager::GetFirstFragmentIfNeeded (Ptr<WifiMpdu> mpdu)
// a fragment cannot be further fragmented
NS_ASSERT (m_fragmentedPacket);
}
else if (m_mac->GetWifiRemoteStationManager ()->NeedFragmentation (mpdu))
else if (GetWifiRemoteStationManager ()->NeedFragmentation (mpdu))
{
NS_LOG_DEBUG ("Fragmenting the MSDU");
m_fragmentedPacket = mpdu->GetPacket ()->Copy ();
// create the first fragment
Ptr<Packet> fragment = m_fragmentedPacket->CreateFragment (0, m_mac->GetWifiRemoteStationManager ()->GetFragmentSize (mpdu, 0));
Ptr<Packet> fragment = m_fragmentedPacket->CreateFragment (0, GetWifiRemoteStationManager ()->GetFragmentSize (mpdu, 0));
// enqueue the first fragment
Ptr<WifiMpdu> item = Create<WifiMpdu> (fragment, mpdu->GetHeader ());
item->GetHeader ().SetMoreFragments ();
@@ -575,7 +581,7 @@ FrameExchangeManager::GetFrameDurationId (const WifiMacHeader& header, uint32_t
uint32_t nextFragmentOffset = (header.GetFragmentNumber () + 1) * payloadSize;
uint32_t nextFragmentSize = std::min (fragmentedPacket->GetSize () - nextFragmentOffset,
payloadSize);
WifiTxVector ackTxVector = m_mac->GetWifiRemoteStationManager ()->GetAckTxVector (header.GetAddr1 (),
WifiTxVector ackTxVector = GetWifiRemoteStationManager ()->GetAckTxVector (header.GetAddr1 (),
txParams.m_txVector);
durationId += 2 * m_phy->GetSifs ()
@@ -591,7 +597,7 @@ FrameExchangeManager::GetRtsDurationId (const WifiTxVector& rtsTxVector, Time tx
NS_LOG_FUNCTION (this << rtsTxVector << txDuration << response);
WifiTxVector ctsTxVector;
ctsTxVector = m_mac->GetWifiRemoteStationManager ()->GetCtsTxVector (m_self, rtsTxVector.GetMode ());
ctsTxVector = GetWifiRemoteStationManager ()->GetCtsTxVector (m_self, rtsTxVector.GetMode ());
return m_phy->GetSifs ()
+ m_phy->CalculateTxDuration (GetCtsSize (), ctsTxVector, m_phy->GetPhyBand ()) /* CTS */
@@ -675,7 +681,7 @@ FrameExchangeManager::SendCtsAfterRts (const WifiMacHeader& rtsHdr, WifiMode rts
{
NS_LOG_FUNCTION (this << rtsHdr << rtsTxMode << rtsSnr);
WifiTxVector ctsTxVector = m_mac->GetWifiRemoteStationManager ()->GetCtsTxVector (rtsHdr.GetAddr2 (), rtsTxMode);
WifiTxVector ctsTxVector = GetWifiRemoteStationManager ()->GetCtsTxVector (rtsHdr.GetAddr2 (), rtsTxMode);
DoSendCtsAfterRts (rtsHdr, ctsTxVector, rtsSnr);
}
@@ -721,7 +727,7 @@ FrameExchangeManager::SendNormalAck (const WifiMacHeader& hdr, const WifiTxVecto
{
NS_LOG_FUNCTION (this << hdr << dataTxVector << dataSnr);
WifiTxVector ackTxVector = m_mac->GetWifiRemoteStationManager ()->GetAckTxVector (hdr.GetAddr2 (), dataTxVector);
WifiTxVector ackTxVector = GetWifiRemoteStationManager ()->GetAckTxVector (hdr.GetAddr2 (), dataTxVector);
WifiMacHeader ack;
ack.SetType (WIFI_MAC_CTL_ACK);
ack.SetDsNotFrom ();
@@ -810,15 +816,15 @@ FrameExchangeManager::NormalAckTimeout (Ptr<WifiMpdu> mpdu, const WifiTxVector&
{
NS_LOG_FUNCTION (this << *mpdu << txVector);
m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (mpdu);
GetWifiRemoteStationManager ()->ReportDataFailed (mpdu);
if (!m_mac->GetWifiRemoteStationManager ()->NeedRetransmission (mpdu))
if (!GetWifiRemoteStationManager ()->NeedRetransmission (mpdu))
{
NS_LOG_DEBUG ("Missed Ack, discard MPDU");
NotifyPacketDiscarded (mpdu);
// Dequeue the MPDU if it is stored in a queue
DequeueMpdu (mpdu);
m_mac->GetWifiRemoteStationManager ()->ReportFinalDataFailed (mpdu);
GetWifiRemoteStationManager ()->ReportFinalDataFailed (mpdu);
m_dcf->ResetCw (m_linkId);
}
else
@@ -853,12 +859,12 @@ FrameExchangeManager::DoCtsTimeout (Ptr<WifiPsdu> psdu)
{
NS_LOG_FUNCTION (this << *psdu);
m_mac->GetWifiRemoteStationManager ()->ReportRtsFailed (psdu->GetHeader (0));
GetWifiRemoteStationManager ()->ReportRtsFailed (psdu->GetHeader (0));
if (!m_mac->GetWifiRemoteStationManager ()->NeedRetransmission (*psdu->begin ()))
if (!GetWifiRemoteStationManager ()->NeedRetransmission (*psdu->begin ()))
{
NS_LOG_DEBUG ("Missed CTS, discard MPDU(s)");
m_mac->GetWifiRemoteStationManager ()->ReportFinalRtsFailed (psdu->GetHeader (0));
GetWifiRemoteStationManager ()->ReportFinalRtsFailed (psdu->GetHeader (0));
for (const auto& mpdu : *PeekPointer (psdu))
{
// Dequeue the MPDU if it is stored in a queue
@@ -919,14 +925,14 @@ FrameExchangeManager::NotifyInternalCollision (Ptr<Txop> txop)
if (mpdu->GetHeader ().HasData ()
&& !mpdu->GetHeader ().GetAddr1 ().IsGroup ())
{
m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (mpdu);
GetWifiRemoteStationManager ()->ReportDataFailed (mpdu);
}
if (!mpdu->GetHeader ().GetAddr1 ().IsGroup ()
&& !m_mac->GetWifiRemoteStationManager ()->NeedRetransmission (mpdu))
&& !GetWifiRemoteStationManager ()->NeedRetransmission (mpdu))
{
NS_LOG_DEBUG ("reset DCF");
m_mac->GetWifiRemoteStationManager ()->ReportFinalDataFailed (mpdu);
GetWifiRemoteStationManager ()->ReportFinalDataFailed (mpdu);
DequeueMpdu (mpdu);
NotifyPacketDiscarded (mpdu);
txop->ResetCw (m_linkId);
@@ -1003,7 +1009,7 @@ FrameExchangeManager::Receive (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
// Ack and CTS do not carry Addr2
if (!psdu->GetHeader (0).IsAck () && !psdu->GetHeader (0).IsCts ())
{
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (psdu->GetHeader (0).GetAddr2 (),
GetWifiRemoteStationManager ()->ReportRxOk (psdu->GetHeader (0).GetAddr2 (),
rxSignalInfo, txVector);
}
ReceiveMpdu (*(psdu->begin ()), rxSignalInfo, txVector, perMpduStatus.empty ());
@@ -1131,8 +1137,8 @@ FrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalInfo
SnrTag tag;
mpdu->GetPacket ()->PeekPacketTag (tag);
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
m_mac->GetWifiRemoteStationManager ()->ReportRtsOk (m_mpdu->GetHeader (),
GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
GetWifiRemoteStationManager ()->ReportRtsOk (m_mpdu->GetHeader (),
rxSnr, txVector.GetMode (), tag.Get ());
m_txTimer.Cancel ();
@@ -1198,8 +1204,8 @@ FrameExchangeManager::ReceivedNormalAck (Ptr<WifiMpdu> mpdu, const WifiTxVector&
// When fragmentation is used, only update manager when the last fragment is acknowledged
if (!mpdu->GetHeader ().IsMoreFragments ())
{
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (sender, rxInfo, ackTxVector);
m_mac->GetWifiRemoteStationManager ()->ReportDataOk (mpdu, rxInfo.snr, ackTxVector.GetMode (),
GetWifiRemoteStationManager ()->ReportRxOk (sender, rxInfo, ackTxVector);
GetWifiRemoteStationManager ()->ReportDataOk (mpdu, rxInfo.snr, ackTxVector.GetMode (),
snr, txVector);
}
// cancel the timer

View File

@@ -264,6 +264,11 @@ public:
protected:
void DoDispose () override;
/**
* \return the remote station manager operating on our link
*/
Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager (void) const;
/**
* Fragment the given MPDU if needed. If fragmentation is needed, return the
* first fragment; otherwise, return the given MPDU. Note that, if fragmentation

View File

@@ -521,7 +521,7 @@ HeFrameExchangeManager::SendPsduMap (void)
NS_ASSERT (m_psduMap.size () == 1);
timerType = WifiTxTimer::WAIT_BLOCK_ACK_AFTER_TB_PPDU;
NS_ASSERT (m_staMac && m_staMac->IsAssociated ());
txVector = m_mac->GetWifiRemoteStationManager ()->GetBlockAckTxVector (m_psduMap.begin ()->second->GetAddr1 (),
txVector = GetWifiRemoteStationManager ()->GetBlockAckTxVector (m_psduMap.begin ()->second->GetAddr1 (),
m_txParams.m_txVector);
responseTxVector = &txVector;
}
@@ -938,7 +938,7 @@ HeFrameExchangeManager::BlockAcksInTbPpduTimeout (WifiPsduMap* psduMap,
{
// no station replied, the transmission failed
// call ReportDataFailed to increase SRC/LRC
m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (*psduMap->begin ()->second->begin ());
GetWifiRemoteStationManager ()->ReportDataFailed (*psduMap->begin ()->second->begin ());
resetCw = false;
}
else
@@ -993,7 +993,7 @@ HeFrameExchangeManager::BlockAckAfterTbPpduTimeout (Ptr<WifiPsdu> psdu, const Wi
bool resetCw;
// call ReportDataFailed to increase SRC/LRC
m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (*psdu->begin ());
GetWifiRemoteStationManager ()->ReportDataFailed (*psdu->begin ());
MissedBlockAck (psdu, m_txParams.m_txVector, resetCw);
@@ -1091,7 +1091,7 @@ HeFrameExchangeManager::GetHeTbTxVector (CtrlTriggerHeader trigger, Mac48Address
return v;
}
uint8_t powerLevel = m_mac->GetWifiRemoteStationManager ()->GetDefaultTxPowerLevel ();
uint8_t powerLevel = GetWifiRemoteStationManager ()->GetDefaultTxPowerLevel ();
/**
* Get the transmit power to use for an HE TB PPDU
* considering:
@@ -1109,7 +1109,7 @@ HeFrameExchangeManager::GetHeTbTxVector (CtrlTriggerHeader trigger, Mac48Address
*
* Refer to section 27.3.14.2 (Power pre-correction) of 802.11ax Draft 4.0 for more details.
*/
int8_t pathLossDb = trigger.GetApTxPower () - static_cast<int8_t> (m_mac->GetWifiRemoteStationManager ()->GetMostRecentRssi (triggerSender)); //cast RSSI to be on equal footing with AP Tx power information
int8_t pathLossDb = trigger.GetApTxPower () - static_cast<int8_t> (GetWifiRemoteStationManager ()->GetMostRecentRssi (triggerSender)); //cast RSSI to be on equal footing with AP Tx power information
double reqTxPowerDbm = static_cast<double> (userInfoIt->GetUlTargetRssi () + pathLossDb);
//Convert the transmit power to a power level
@@ -1142,13 +1142,13 @@ HeFrameExchangeManager::SetTargetRssi (CtrlTriggerHeader& trigger) const
NS_LOG_FUNCTION (this);
NS_ASSERT (m_apMac);
trigger.SetApTxPower (static_cast<int8_t> (m_phy->GetPowerDbm (m_mac->GetWifiRemoteStationManager ()->GetDefaultTxPowerLevel ())));
trigger.SetApTxPower (static_cast<int8_t> (m_phy->GetPowerDbm (GetWifiRemoteStationManager ()->GetDefaultTxPowerLevel ())));
for (auto& userInfo : trigger)
{
const auto staList = m_apMac->GetStaList ();
auto itAidAddr = staList.find (userInfo.GetAid12 ());
NS_ASSERT (itAidAddr != staList.end ());
int8_t rssi = static_cast<int8_t> (m_mac->GetWifiRemoteStationManager ()->GetMostRecentRssi (itAidAddr->second));
int8_t rssi = static_cast<int8_t> (GetWifiRemoteStationManager ()->GetMostRecentRssi (itAidAddr->second));
rssi = (rssi >= -20) ? -20 : ((rssi <= -110) ? -110 : rssi); //cap so as to keep within [-110; -20] dBm
userInfo.SetUlTargetRssi (rssi);
}
@@ -1589,8 +1589,8 @@ HeFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
SnrTag tag;
mpdu->GetPacket ()->PeekPacketTag (tag);
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
m_mac->GetWifiRemoteStationManager ()->ReportRtsOk (m_psduMap.begin ()->second->GetHeader (0),
GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
GetWifiRemoteStationManager ()->ReportRtsOk (m_psduMap.begin ()->second->GetHeader (0),
rxSignalInfo.snr, txVector.GetMode (), tag.Get ());
m_txTimer.Cancel ();
@@ -1637,7 +1637,7 @@ HeFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
uint8_t tid = blockAck.GetTidInfo ();
std::pair<uint16_t,uint16_t> ret = GetBaManager (tid)->NotifyGotBlockAck (blockAck, hdr.GetAddr2 (),
{tid});
m_mac->GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first, ret.second,
GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first, ret.second,
rxSignalInfo.snr, tag.Get (), m_txParams.m_txVector);
// remove the sender from the set of stations that are expected to send a BlockAck
@@ -1715,7 +1715,7 @@ HeFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
std::pair<uint16_t,uint16_t> ret = GetBaManager (tid)->NotifyGotBlockAck (blockAck,
hdr.GetAddr2 (),
{tid}, index);
m_mac->GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first,
GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first,
ret.second, rxSignalInfo.snr,
tag.Get (staId), m_txParams.m_txVector);
}
@@ -1784,7 +1784,7 @@ HeFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
{
Mac48Address sender = hdr.GetAddr2 ();
NS_LOG_DEBUG ("Received MU-BAR Trigger Frame from=" << sender);
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
auto userInfoIt = trigger.FindUserInfoWithAid (staId);
NS_ASSERT (userInfoIt != trigger.end ());

View File

@@ -108,7 +108,7 @@ HtFrameExchangeManager::NeedSetupBlockAck (Mac48Address recipient, uint8_t tid)
Ptr<QosTxop> qosTxop = m_mac->GetQosTxop (tid);
bool establish;
if (!m_mac->GetWifiRemoteStationManager ()->GetHtSupported (recipient))
if (!GetWifiRemoteStationManager ()->GetHtSupported (recipient))
{
establish = false;
}
@@ -123,7 +123,7 @@ HtFrameExchangeManager::NeedSetupBlockAck (Mac48Address recipient, uint8_t tid)
uint32_t packets = qosTxop->GetWifiMacQueue ()->GetNPackets (queueId);
establish = ((qosTxop->GetBlockAckThreshold () > 0 && packets >= qosTxop->GetBlockAckThreshold ())
|| (m_mpduAggregator->GetMaxAmpduSize (recipient, tid, WIFI_MOD_CLASS_HT) > 0 && packets > 1)
|| m_mac->GetWifiRemoteStationManager ()->GetVhtSupported ());
|| GetWifiRemoteStationManager ()->GetVhtSupported ());
}
NS_LOG_FUNCTION (this << recipient << +tid << establish);
@@ -183,7 +183,7 @@ HtFrameExchangeManager::SendAddBaRequest (Mac48Address dest, uint8_t tid, uint16
mpdu->GetHeader ().SetSequenceNumber (sequence);
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_txVector = GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_protection = std::unique_ptr<WifiProtection> (new WifiNoProtection);
txParams.m_acknowledgment = GetAckManager ()->TryAddMpdu (mpdu, txParams);
@@ -323,8 +323,8 @@ HtFrameExchangeManager::CreateBlockAckAgreement (const MgtAddBaResponseHeader *r
RecipientBlockAckAgreement agreement (originator, respHdr->IsAmsduSupported (), tid,
respHdr->GetBufferSize (), respHdr->GetTimeout (),
startingSeq,
m_mac->GetWifiRemoteStationManager ()->GetHtSupported ()
&& m_mac->GetWifiRemoteStationManager ()->GetHtSupported (originator));
GetWifiRemoteStationManager ()->GetHtSupported ()
&& GetWifiRemoteStationManager ()->GetHtSupported (originator));
agreement.SetMacRxMiddle (m_rxMiddle);
if (respHdr->IsImmediateBlockAck ())
{
@@ -400,7 +400,7 @@ HtFrameExchangeManager::StartFrameExchange (Ptr<QosTxop> edca, Time availableTim
// Use SendDataFrame if we can try aggregation
if (hdr.IsQosData () && !hdr.GetAddr1 ().IsGroup () && !peekedItem->IsFragment ()
&& !m_mac->GetWifiRemoteStationManager ()->NeedFragmentation (peekedItem))
&& !GetWifiRemoteStationManager ()->NeedFragmentation (peekedItem))
{
return SendDataFrame (peekedItem, availableTime, initialFrame);
}
@@ -434,7 +434,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 (), m_allowedWidth);
txParams.m_txVector = GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader (), m_allowedWidth);
txParams.m_protection = std::unique_ptr<WifiProtection> (new WifiNoProtection);
txParams.m_acknowledgment = GetAckManager ()->TryAddMpdu (peekedItem, txParams);
@@ -476,7 +476,7 @@ HtFrameExchangeManager::SendDataFrame (Ptr<WifiMpdu> peekedItem,
Ptr<QosTxop> edca = m_mac->GetQosTxop (peekedItem->GetHeader ().GetQosTid ());
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader (), m_allowedWidth);
txParams.m_txVector = GetWifiRemoteStationManager ()->GetDataTxVector (peekedItem->GetHeader (), m_allowedWidth);
Ptr<WifiMpdu> mpdu = edca->GetNextMpdu (peekedItem, txParams, availableTime, initialFrame);
if (!mpdu)
@@ -1145,7 +1145,7 @@ HtFrameExchangeManager::BlockAckTimeout (Ptr<WifiPsdu> psdu, const WifiTxVector&
{
NS_LOG_FUNCTION (this << *psdu << txVector);
m_mac->GetWifiRemoteStationManager ()->ReportDataFailed (*psdu->begin ());
GetWifiRemoteStationManager ()->ReportDataFailed (*psdu->begin ());
bool resetCw;
MissedBlockAck (psdu, txVector, resetCw);
@@ -1184,7 +1184,7 @@ HtFrameExchangeManager::MissedBlockAck (Ptr<WifiPsdu> psdu, const WifiTxVector&
else
{
isBar = false;
m_mac->GetWifiRemoteStationManager ()->ReportAmpduTxStatus (recipient, 0, psdu->GetNMpdus (),
GetWifiRemoteStationManager ()->ReportAmpduTxStatus (recipient, 0, psdu->GetNMpdus (),
0, 0, txVector);
std::set<uint8_t> tids = psdu->GetTids ();
NS_ABORT_MSG_IF (tids.size () > 1, "Multi-TID A-MPDUs not handled here");
@@ -1217,7 +1217,7 @@ HtFrameExchangeManager::MissedBlockAck (Ptr<WifiPsdu> psdu, const WifiTxVector&
NS_LOG_DEBUG ("Missed Block Ack, do not transmit a BlockAckReq");
// if a BA agreement exists, we can get here if there is no outstanding
// MPDU whose lifetime has not expired yet.
m_mac->GetWifiRemoteStationManager ()->ReportFinalDataFailed (*psdu->begin ());
GetWifiRemoteStationManager ()->ReportFinalDataFailed (*psdu->begin ());
if (GetBaManager (tid)->ExistsAgreementInState (recipient, tid,
OriginatorBlockAckAgreement::ESTABLISHED))
{
@@ -1231,10 +1231,10 @@ HtFrameExchangeManager::MissedBlockAck (Ptr<WifiPsdu> psdu, const WifiTxVector&
else
{
// we have to retransmit the data frames, if needed
if (!m_mac->GetWifiRemoteStationManager ()->NeedRetransmission (*psdu->begin ()))
if (!GetWifiRemoteStationManager ()->NeedRetransmission (*psdu->begin ()))
{
NS_LOG_DEBUG ("Missed Block Ack, do not retransmit the data frames");
m_mac->GetWifiRemoteStationManager ()->ReportFinalDataFailed (*psdu->begin ());
GetWifiRemoteStationManager ()->ReportFinalDataFailed (*psdu->begin ());
for (const auto& mpdu : *PeekPointer (psdu))
{
NotifyPacketDiscarded (mpdu);
@@ -1333,8 +1333,8 @@ HtFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
SnrTag tag;
mpdu->GetPacket ()->PeekPacketTag (tag);
m_mac->GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
m_mac->GetWifiRemoteStationManager ()->ReportRtsOk (m_psdu->GetHeader (0),
GetWifiRemoteStationManager ()->ReportRxOk (sender, rxSignalInfo, txVector);
GetWifiRemoteStationManager ()->ReportRtsOk (m_psdu->GetHeader (0),
rxSnr, txVector.GetMode (), tag.Get ());
m_txTimer.Cancel ();
@@ -1356,7 +1356,7 @@ HtFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
mpdu->GetPacket ()->PeekHeader (blockAck);
uint8_t tid = blockAck.GetTidInfo ();
std::pair<uint16_t,uint16_t> ret = GetBaManager (tid)->NotifyGotBlockAck (blockAck, hdr.GetAddr2 (), {tid});
m_mac->GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first, ret.second,
GetWifiRemoteStationManager ()->ReportAmpduTxStatus (hdr.GetAddr2 (), ret.first, ret.second,
rxSnr, tag.Get (), m_txParams.m_txVector);
// cancel the timer
@@ -1395,7 +1395,7 @@ HtFrameExchangeManager::ReceiveMpdu (Ptr<WifiMpdu> mpdu, RxSignalInfo rxSignalIn
NS_LOG_DEBUG ("Schedule Block Ack");
Simulator::Schedule (m_phy->GetSifs (), &HtFrameExchangeManager::SendBlockAck, this,
agreementIt->second, hdr.GetDuration (),
m_mac->GetWifiRemoteStationManager ()->GetBlockAckTxVector (sender, txVector),
GetWifiRemoteStationManager ()->GetBlockAckTxVector (sender, txVector),
rxSnr);
}
else
@@ -1456,7 +1456,7 @@ HtFrameExchangeManager::EndReceiveAmpdu (Ptr<const WifiPsdu> psdu, const RxSigna
Simulator::Schedule (m_phy->GetSifs (), &HtFrameExchangeManager::SendBlockAck, this,
agreementIt->second, psdu->GetDuration (),
m_mac->GetWifiRemoteStationManager ()->GetBlockAckTxVector (psdu->GetAddr2 (), txVector),
GetWifiRemoteStationManager ()->GetBlockAckTxVector (psdu->GetAddr2 (), txVector),
rxSignalInfo.snr);
}
}

View File

@@ -95,7 +95,7 @@ QosFrameExchangeManager::SendCfEndIfNeeded (void)
cfEnd.SetAddr1 (Mac48Address::GetBroadcast ());
cfEnd.SetAddr2 (m_self);
WifiTxVector cfEndTxVector = m_mac->GetWifiRemoteStationManager ()->GetRtsTxVector (cfEnd.GetAddr1 ());
WifiTxVector cfEndTxVector = GetWifiRemoteStationManager ()->GetRtsTxVector (cfEnd.GetAddr1 ());
Time txDuration = m_phy->CalculateTxDuration (cfEnd.GetSize () + WIFI_MAC_FCS_LENGTH,
cfEndTxVector, m_phy->GetPhyBand ());
@@ -276,7 +276,7 @@ QosFrameExchangeManager::StartFrameExchange (Ptr<QosTxop> edca, Time availableTi
}
WifiTxParameters txParams;
txParams.m_txVector = m_mac->GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
txParams.m_txVector = GetWifiRemoteStationManager ()->GetDataTxVector (mpdu->GetHeader (), m_allowedWidth);
Ptr<WifiMpdu> item = edca->GetNextMpdu (mpdu, txParams, availableTime, initialFrame);