From 017a08c44fac3ada914247cdee79799679402673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 26 Sep 2021 19:21:14 +0200 Subject: [PATCH] wifi: Cleanup some remaining references to MacLow --- src/wifi/doc/source/wifi-design.rst | 16 ++++++++-------- src/wifi/helper/wifi-mac-helper.h | 2 +- src/wifi/model/block-ack-agreement.h | 2 -- src/wifi/model/frame-exchange-manager.h | 8 ++++---- src/wifi/model/ht/ht-frame-exchange-manager.h | 6 +++--- src/wifi/model/qos-txop.h | 7 ++----- src/wifi/model/txop.h | 9 +++------ src/wifi/test/wifi-phy-ofdma-test.cc | 2 +- 8 files changed, 22 insertions(+), 30 deletions(-) diff --git a/src/wifi/doc/source/wifi-design.rst b/src/wifi/doc/source/wifi-design.rst index 0dff34965..cc91a05c1 100644 --- a/src/wifi/doc/source/wifi-design.rst +++ b/src/wifi/doc/source/wifi-design.rst @@ -243,7 +243,7 @@ and interference) whether the packet was successful or not. This class also provides a number of callbacks for notifications of physical layer events, exposes a notion of a state machine that can be monitored for MAC-level processes such as carrier sense, and handles sleep/wake/off models -and energy consumption. The ``ns3::WifiPhy`` hooks to the ``ns3::MacLow`` +and energy consumption. The ``ns3::WifiPhy`` hooks to the ``ns3::FrameExchangeManager`` object in the WifiNetDevice. There are currently two implementations of the ``WifiPhy``: the @@ -345,7 +345,7 @@ YansWifiPhy and WifiPhyStateHelper ################################## Class ``ns3::YansWifiPhy`` is responsible for taking packets passed to -it from the MAC (the ``ns3::MacLow`` object) and sending them onto the +it from the MAC (the ``ns3::FrameExchangeManager`` object) and sending them onto the ``ns3::YansWifiChannel`` to which it is attached. It is also responsible to receive packets from that channel, and, if reception is deemed to have been successful, to pass them up to the MAC. @@ -465,9 +465,9 @@ this threshold. The above describes the case in which the packet is a single MPDU. For more recent Wi-Fi standards using MPDU aggregation, ``StartReceivePayload`` schedules an event for reception of each individual MPDU (``ScheduleEndOfMpdus``), -which then forwards each MPDU as they arrive up to MacLow, if the reception -of the MPDU has been successful. Once the A-MPDU reception is finished, -MacLow is also notified about the amount of successfully received MPDUs. +which then forwards each MPDU as they arrive up to FrameExchangeManager, if the +reception of the MPDU has been successful. Once the A-MPDU reception is finished, +FrameExchangeManager is also notified about the amount of successfully received MPDUs. InterferenceHelper ################## @@ -1205,8 +1205,8 @@ Depending on your goal, the common tasks are (in no particular order): * Creating or modifying the default Wi-Fi frames/headers by making changes to ``wifi-mac-header.*``. * MAC low modification. For example, handling new/modified control frames (think RTS/CTS/ACK/Block ACK), making changes to two-way transaction/four-way transaction. Users usually make changes to - ``mac-low.*`` to accomplish this. Handling of control frames is performed in - ``MacLow::ReceiveOk``. + ``frame-exchange-manager.*`` or its subclasses to accomplish this. + Handling of control frames is performed in ``FrameExchangeManager::ReceiveMpdu``. * MAC high modification. For example, handling new management frames (think beacon/probe), beacon/probe generation. Users usually make changes to ``regular-wifi-mac.*``,``sta-wifi-mac.*``, ``ap-wifi-mac.*``, or ``adhoc-wifi-mac.*`` to accomplish this. * Wi-Fi queue management. The files ``txop.*`` and ``qos-txop.*`` are of interest for this task. @@ -1214,6 +1214,6 @@ Depending on your goal, the common tasks are (in no particular order): ``Txop`` and ``QosTxop``. * Fragmentation and RTS threholds are handled by Wi-Fi remote station manager. Note that Wi-Fi remote station manager simply indicates if fragmentation and RTS are needed. Fragmentation is handled by - ``Txop`` or ``QosTxop`` while RTS/CTS transaction is handled by ``MacLow``. + ``Txop`` or ``QosTxop`` while RTS/CTS transaction is handled by ``FrameExchangeManager``. * Modifying or creating new rate control algorithms can be done by creating a new child class of Wi-Fi remote station manager or modifying the existing ones. diff --git a/src/wifi/helper/wifi-mac-helper.h b/src/wifi/helper/wifi-mac-helper.h index 3eaa7bf8b..a6fcbb7d2 100644 --- a/src/wifi/helper/wifi-mac-helper.h +++ b/src/wifi/helper/wifi-mac-helper.h @@ -35,7 +35,7 @@ class NetDevice; * This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac and ns3::AdhocWifiMac. * Its purpose is to allow a WifiHelper to configure and install WifiMac objects on a collection * of nodes. The WifiMac objects themselves are mainly composed of TxMiddle, RxMiddle, ChannelAccessManager, - * MacLow, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper + * FrameExchangeManager, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper * offers the opportunity to configure attribute values away from their default values, on a * per-NodeContainer basis. By default, it creates an Adhoc MAC layer without QoS. Typically, * it is used to set type and attribute values, then hand this object over to the WifiHelper that diff --git a/src/wifi/model/block-ack-agreement.h b/src/wifi/model/block-ack-agreement.h index 224ab7a26..9dca7b195 100644 --- a/src/wifi/model/block-ack-agreement.h +++ b/src/wifi/model/block-ack-agreement.h @@ -32,8 +32,6 @@ namespace ns3 { */ class BlockAckAgreement { - /// Provide access to MacLow class - friend class MacLow; friend class HtFrameExchangeManager; public: diff --git a/src/wifi/model/frame-exchange-manager.h b/src/wifi/model/frame-exchange-manager.h index c95d7b13f..0a8ea8033 100644 --- a/src/wifi/model/frame-exchange-manager.h +++ b/src/wifi/model/frame-exchange-manager.h @@ -122,7 +122,7 @@ public: */ virtual void SetWifiPhy (const Ptr phy); /** - * Remove WifiPhy associated with this MacLow. + * Remove WifiPhy associated with this FrameExchangeManager. */ virtual void ResetPhy (void); /** @@ -222,21 +222,21 @@ public: /** * \param duration switching delay duration. * - * This method is typically invoked by the PhyMacLowListener to notify + * This method is typically invoked by the PhyListener to notify * the MAC layer that a channel switching occurred. When a channel switching * occurs, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled. */ void NotifySwitchingStartNow (Time duration); /** - * This method is typically invoked by the PhyMacLowListener to notify + * This method is typically invoked by the PhyListener to notify * the MAC layer that the device has been put into sleep mode. When the device is put * into sleep mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled. */ void NotifySleepNow (void); /** - * This method is typically invoked by the PhyMacLowListener to notify + * This method is typically invoked by the PhyListener to notify * the MAC layer that the device has been put into off mode. When the device is put * into off mode, pending MAC transmissions (RTS, CTS, Data and Ack) are cancelled. */ diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.h b/src/wifi/model/ht/ht-frame-exchange-manager.h index 650637dde..a8bc5e13e 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.h +++ b/src/wifi/model/ht/ht-frame-exchange-manager.h @@ -148,9 +148,9 @@ public: * This function is typically invoked only by ns3::RegularWifiMac * when the STA (which may be non-AP in ESS, or in an IBSS) has * received an ADDBA Request frame and is transmitting an ADDBA - * Response frame. At this point MacLow must allocate buffers to - * collect all correctly received packets belonging to the category - * for which block ack was negotiated. + * Response frame. At this point the frame exchange manager must + * allocate buffers to collect all correctly received packets belonging + * to the category for which block ack was negotiated. */ void CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq); diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index 3c9457664..dde43f90a 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -44,9 +44,8 @@ class WifiTxParameters; * \ingroup wifi * * This class implements the packet fragmentation and retransmission policy for - * QoS data frames. It uses the ns3::MacLow and ns3::ChannelAccessManager helper classes - * to respectively send packets and decide when to send them. Packets are stored - * in a ns3::WifiMacQueue until they can be sent. + * QoS data frames. It uses the ns3::ChannelAccessManager helper class to decide + * when to send a packet. Packets are stored in a ns3::WifiMacQueue until they can be sent. * * This queue contains packets for a particular access class. * Possibles access classes are: @@ -56,8 +55,6 @@ class WifiTxParameters; * - AC_BK : background, TID = 1,2 * * This class also implements block ack sessions and MSDU aggregation (A-MSDU). - * If A-MSDU is enabled for that access class, it picks several packets from the - * queue instead of a single one and sends the aggregated packet to ns3::MacLow. * * The fragmentation policy currently implemented uses a simple * threshold: any packet bigger than this threshold is fragmented diff --git a/src/wifi/model/txop.h b/src/wifi/model/txop.h index b61b8bd17..e9d67ef30 100644 --- a/src/wifi/model/txop.h +++ b/src/wifi/model/txop.h @@ -44,9 +44,9 @@ enum WifiMacDropReason : uint8_t; // opaque enum declaration * * This class implements the packet fragmentation and * retransmission policy for data and management frames. - * It uses the ns3::MacLow and ns3::ChannelAccessManager helper - * classes to respectively send packets and decide when - * to send them. Packets are stored in a ns3::WifiMacQueue + * It uses the ns3::ChannelAccessManager helper + * class to decide when to send a packet. + * Packets are stored in a ns3::WifiMacQueue * until they can be sent. * * The policy currently implemented uses a simple fragmentation @@ -64,9 +64,6 @@ enum WifiMacDropReason : uint8_t; // opaque enum declaration class Txop : public Object { public: - /// allow MacLowTransmissionListener class access - friend class MacLowTransmissionListener; - Txop (); /** diff --git a/src/wifi/test/wifi-phy-ofdma-test.cc b/src/wifi/test/wifi-phy-ofdma-test.cc index 45f8588c9..77d7523e7 100644 --- a/src/wifi/test/wifi-phy-ofdma-test.cc +++ b/src/wifi/test/wifi-phy-ofdma-test.cc @@ -3232,7 +3232,7 @@ private: void RunOne (bool setupBa); /** - * Replace the AP's MacLow callback on its PHY's ReceiveOkCallback + * Replace the AP's callback on its PHY's ReceiveOkCallback * by the ReceiveOkCallbackAtAp method. */ void ReplaceReceiveOkCallbackOfAp (void);