diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index 49afe53ee..96a3c3ce4 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -439,8 +439,7 @@ QosTxop::GetTransmissionParameters (Ptr frame) const // Enable/disable RTS if (!frame->GetHeader ().IsBlockAckReq () - && m_stationManager->NeedRts (recipient, &frame->GetHeader (), - frame->GetPacket (), m_low->GetDataTxVector (frame)) + && m_stationManager->NeedRts (&frame->GetHeader (), frame->GetPacket ()) && !m_low->IsCfPeriod ()) { params.EnableRts (); @@ -1010,8 +1009,7 @@ QosTxop::RestartAccessIfNeeded (void) } if (packet != 0) { - m_isAccessRequestedForRts = m_stationManager->NeedRts (hdr.GetAddr1 (), &hdr, packet, - m_low->GetDataTxVector (Create (packet, hdr))); + m_isAccessRequestedForRts = m_stationManager->NeedRts (&hdr, packet); } else { @@ -1042,8 +1040,7 @@ QosTxop::StartAccessIfNeeded (void) } if (packet != 0) { - m_isAccessRequestedForRts = m_stationManager->NeedRts (hdr.GetAddr1 (), &hdr, packet, - m_low->GetDataTxVector (Create (packet, hdr))); + m_isAccessRequestedForRts = m_stationManager->NeedRts (&hdr, packet); } else { diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index bf3d465fc..98fb648d4 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -533,12 +533,7 @@ Txop::NotifyAccessGranted (void) } else { - WifiTxVector dataTxVector = m_stationManager->GetDataTxVector (m_currentHdr.GetAddr1 (), - &m_currentHdr, m_currentPacket); - - if (m_stationManager->NeedRts (m_currentHdr.GetAddr1 (), &m_currentHdr, - m_currentPacket, dataTxVector) - && !m_low->IsCfPeriod ()) + if (m_stationManager->NeedRts (&m_currentHdr, m_currentPacket) && !m_low->IsCfPeriod ()) { m_currentParams.EnableRts (); } diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 4ff6437b1..e8ae1b49b 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -807,11 +807,12 @@ WifiRemoteStationManager::ReportAmpduTxStatus (Mac48Address address, uint8_t tid } bool -WifiRemoteStationManager::NeedRts (Mac48Address address, const WifiMacHeader *header, - Ptr packet, WifiTxVector txVector) +WifiRemoteStationManager::NeedRts (const WifiMacHeader *header, Ptr packet) { + NS_LOG_FUNCTION (this << *header << packet); + Mac48Address address = header->GetAddr1 (); + WifiTxVector txVector = GetDataTxVector (address, header, packet); WifiMode mode = txVector.GetMode (); - NS_LOG_FUNCTION (this << address << *header << packet << mode); if (address.IsGroup ()) { return false; diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index baaf5c289..881ac9d32 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -793,16 +793,13 @@ public: double rxSnr, WifiMode txMode); /** - * \param address remote address * \param header MAC header * \param packet the packet to send - * \param txVector the TXVECTOR of the packet to send * * \return true if we want to use an RTS/CTS handshake for this * packet before sending it, false otherwise. */ - bool NeedRts (Mac48Address address, const WifiMacHeader *header, - Ptr packet, WifiTxVector txVector); + bool NeedRts (const WifiMacHeader *header, Ptr packet); /** * Return if we need to do CTS-to-self before sending a DATA. *