wifi: Pass TXVECTOR to ReportAmpduTxStatus
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "wifi-mac-queue.h"
|
||||
#include "mac-tx-middle.h"
|
||||
#include "qos-utils.h"
|
||||
#include "wifi-tx-vector.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -460,9 +461,9 @@ BlockAckManager::NotifyMissedAck (Ptr<WifiMacQueueItem> mpdu)
|
||||
}
|
||||
|
||||
void
|
||||
BlockAckManager::NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
BlockAckManager::NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, WifiTxVector dataTxVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << blockAck << recipient << rxSnr << dataSnr << dataChannelWidth);
|
||||
NS_LOG_FUNCTION (this << blockAck << recipient << rxSnr << dataSnr << dataTxVector);
|
||||
if (!blockAck->IsMultiTid ())
|
||||
{
|
||||
uint8_t tid = blockAck->GetTidInfo ();
|
||||
@@ -546,7 +547,7 @@ BlockAckManager::NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac4
|
||||
queueIt = it->second.second.erase (queueIt);
|
||||
}
|
||||
}
|
||||
m_stationManager->ReportAmpduTxStatus (recipient, nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr, dataChannelWidth);
|
||||
m_stationManager->ReportAmpduTxStatus (recipient, nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr, dataTxVector);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
* \param recipient Sender of BlockAck frame.
|
||||
* \param rxSnr received SNR of the BlockAck frame itself
|
||||
* \param dataSnr data SNR reported by remote station
|
||||
* \param dataChannelWidth channel width (in MHz) used to send the Data
|
||||
* \param dataTxVector the TXVECTOR used to send the Data
|
||||
*
|
||||
* Invoked upon receipt of a BlockAck frame. Typically, this function, is called
|
||||
* by ns3::QosTxop object. Performs a check on which MPDUs, previously sent
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
* An acknowledged MPDU is removed from the buffer, retransmitted otherwise.
|
||||
*/
|
||||
void NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
double rxSnr, double dataSnr, WifiTxVector dataTxVector);
|
||||
/**
|
||||
* \param recipient Sender of the expected BlockAck frame.
|
||||
* \param tid Traffic ID.
|
||||
|
||||
@@ -282,9 +282,9 @@ IdealWifiManager::DoReportDataOk (WifiRemoteStation *st, double ackSnr, WifiMode
|
||||
|
||||
void
|
||||
IdealWifiManager::DoReportAmpduTxStatus (WifiRemoteStation *st, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << st << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataChannelWidth);
|
||||
NS_LOG_FUNCTION (this << st << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataChannelWidth << +dataNss);
|
||||
IdealWifiRemoteStation *station = static_cast<IdealWifiRemoteStation*> (st);
|
||||
if (dataSnr == 0)
|
||||
{
|
||||
|
||||
@@ -69,9 +69,8 @@ private:
|
||||
double ctsSnr, WifiMode ctsMode, double rtsSnr);
|
||||
void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode,
|
||||
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
|
||||
void DoReportAmpduTxStatus (WifiRemoteStation *station,
|
||||
uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
void DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
|
||||
void DoReportFinalRtsFailed (WifiRemoteStation *station);
|
||||
void DoReportFinalDataFailed (WifiRemoteStation *station);
|
||||
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station);
|
||||
|
||||
@@ -955,7 +955,7 @@ MacLow::ReceiveOk (Ptr<WifiMacQueueItem> mpdu, double rxSnr, WifiTxVector txVect
|
||||
packet->RemoveHeader (blockAck);
|
||||
m_blockAckTimeoutEvent.Cancel ();
|
||||
NotifyAckTimeoutResetNow ();
|
||||
m_currentTxop->GotBlockAck (&blockAck, hdr.GetAddr2 (), rxSnr, tag.Get (), m_currentTxVector.GetChannelWidth ());
|
||||
m_currentTxop->GotBlockAck (&blockAck, hdr.GetAddr2 (), rxSnr, tag.Get (), m_currentTxVector);
|
||||
// start next packet if TXOP remains, otherwise contend for accessing the channel again
|
||||
if (m_currentTxop->IsQosTxop () && m_currentTxop->GetTxopLimit ().IsStrictlyPositive ()
|
||||
&& m_currentTxop->GetTxopRemaining () > GetSifs ())
|
||||
|
||||
@@ -628,9 +628,9 @@ MinstrelHtWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st)
|
||||
|
||||
void
|
||||
MinstrelHtWifiManager::DoReportAmpduTxStatus (WifiRemoteStation *st, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << st << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataChannelWidth);
|
||||
NS_LOG_FUNCTION (this << st << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataChannelWidth << +dataNss);
|
||||
MinstrelHtWifiRemoteStation *station = static_cast<MinstrelHtWifiRemoteStation*> (st);
|
||||
|
||||
CheckInit (station);
|
||||
|
||||
@@ -235,9 +235,8 @@ private:
|
||||
void DoReportFinalDataFailed (WifiRemoteStation *station);
|
||||
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station);
|
||||
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
|
||||
void DoReportAmpduTxStatus (WifiRemoteStation *station,
|
||||
uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
void DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
|
||||
bool DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally);
|
||||
|
||||
/**
|
||||
|
||||
@@ -936,7 +936,7 @@ QosTxop::MissedBlockAck (uint8_t nMpdus)
|
||||
{
|
||||
if (GetAmpduExist (m_currentHdr.GetAddr1 ()))
|
||||
{
|
||||
m_stationManager->ReportAmpduTxStatus (m_currentHdr.GetAddr1 (), 0, nMpdus, 0, 0, 0);
|
||||
m_stationManager->ReportAmpduTxStatus (m_currentHdr.GetAddr1 (), 0, nMpdus, 0, 0, WifiTxVector ());
|
||||
}
|
||||
// implicit BAR and do not use BAR after missed BlockAck, hence try to retransmit data frames
|
||||
if (!NeedDataRetransmission (m_currentPacket, m_currentHdr))
|
||||
@@ -1485,11 +1485,11 @@ QosTxop::GotDelBaFrame (const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
|
||||
}
|
||||
|
||||
void
|
||||
QosTxop::GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
QosTxop::GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, WifiTxVector dataTxVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << blockAck << recipient << rxSnr << dataSnr << dataChannelWidth);
|
||||
NS_LOG_FUNCTION (this << blockAck << recipient << rxSnr << dataSnr << dataTxVector);
|
||||
NS_LOG_DEBUG ("got block ack from=" << recipient);
|
||||
m_baManager->NotifyGotBlockAck (blockAck, recipient, rxSnr, dataSnr, dataChannelWidth);
|
||||
m_baManager->NotifyGotBlockAck (blockAck, recipient, rxSnr, dataSnr, dataTxVector);
|
||||
if (!m_txOkCallback.IsNull ())
|
||||
{
|
||||
m_txOkCallback (m_currentHdr);
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
void NotifyInternalCollision (void);
|
||||
void GotAck (void);
|
||||
void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
double rxSnr, double dataSnr, WifiTxVector dataTxVector);
|
||||
void MissedBlockAck (uint8_t nMpdus);
|
||||
void MissedAck (void);
|
||||
void StartNextPacket (void);
|
||||
|
||||
@@ -870,7 +870,7 @@ Txop::StartNextPacket (void)
|
||||
}
|
||||
|
||||
void
|
||||
Txop::GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
Txop::GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, double dataSnr, WifiTxVector dataTxVector)
|
||||
{
|
||||
NS_LOG_WARN ("GotBlockAck should not be called for non QoS!");
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ class WifiMacQueueItem;
|
||||
class UniformRandomVariable;
|
||||
class CtrlBAckResponseHeader;
|
||||
class WifiRemoteStationManager;
|
||||
class WifiTxVector;
|
||||
|
||||
/**
|
||||
* \brief Handle packet fragmentation and retransmissions
|
||||
@@ -275,10 +276,10 @@ public:
|
||||
* \param recipient address of the recipient.
|
||||
* \param rxSnr SNR of the BlockAck itself in linear scale.
|
||||
* \param dataSnr reported data SNR from the peer in linear scale.
|
||||
* \param dataChannelWidth channel width (in MHz) used to send the Data.
|
||||
* \param dataTxVector TXVECTOR used to send the Data.
|
||||
*/
|
||||
virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
double rxSnr, double dataSnr, WifiTxVector dataTxVector);
|
||||
/**
|
||||
* Event handler when a BlockAck timeout has occurred.
|
||||
* \param nMpdus the number of MPDUs sent in the A-MPDU transmission that results in a BlockAck timeout.
|
||||
|
||||
@@ -728,15 +728,15 @@ WifiRemoteStationManager::ReportRxOk (Mac48Address address, double rxSnr, WifiMo
|
||||
void
|
||||
WifiRemoteStationManager::ReportAmpduTxStatus (Mac48Address address,
|
||||
uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
double rxSnr, double dataSnr, WifiTxVector dataTxVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << address << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataChannelWidth);
|
||||
NS_LOG_FUNCTION (this << address << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataTxVector);
|
||||
NS_ASSERT (!address.IsGroup ());
|
||||
for (uint8_t i = 0; i < nFailedMpdus; i++)
|
||||
{
|
||||
m_macTxDataFailed (address);
|
||||
}
|
||||
DoReportAmpduTxStatus (Lookup (address), nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr, dataChannelWidth);
|
||||
DoReportAmpduTxStatus (Lookup (address), nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr, dataTxVector.GetChannelWidth (), dataTxVector.GetNss ());
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1406,7 +1406,7 @@ WifiRemoteStationManager::DoNeedFragmentation (WifiRemoteStation *station,
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth)
|
||||
WifiRemoteStationManager::DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
|
||||
{
|
||||
NS_LOG_DEBUG ("DoReportAmpduTxStatus received but the manager does not handle A-MPDUs!");
|
||||
}
|
||||
|
||||
@@ -750,10 +750,10 @@ public:
|
||||
* \param nFailedMpdus number of unsuccessfully transmitted MPDUs
|
||||
* \param rxSnr received SNR of the block ack frame itself
|
||||
* \param dataSnr data SNR reported by remote station
|
||||
* \param dataChannelWidth the channel width (in MHz) of the A-MPDU initially sent to the remote station
|
||||
* \param dataTxVector the TXVECTOR of the MPDUs we sent
|
||||
*/
|
||||
void ReportAmpduTxStatus (Mac48Address address, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
double rxSnr, double dataSnr, WifiTxVector dataTxVector);
|
||||
|
||||
/**
|
||||
* \param address remote address
|
||||
@@ -1196,9 +1196,10 @@ private:
|
||||
* \param rxSnr received SNR of the block ack frame itself
|
||||
* \param dataSnr data SNR reported by remote station
|
||||
* \param dataChannelWidth the channel width (in MHz) of the A-MPDU we sent
|
||||
* \param dataNss the number of spatial streams used to send the A-MPDU
|
||||
*/
|
||||
virtual void DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth);
|
||||
double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss);
|
||||
|
||||
/**
|
||||
* Return the state of the station associated with the given address.
|
||||
|
||||
Reference in New Issue
Block a user