diff --git a/src/wifi/model/mgt-headers.h b/src/wifi/model/mgt-headers.h index b51cf1bfd..3cf74f9a7 100644 --- a/src/wifi/model/mgt-headers.h +++ b/src/wifi/model/mgt-headers.h @@ -76,10 +76,10 @@ public: */ void SetHtCapabilities (HtCapabilities htcapabilities); /** - * Set the VHT capabilities. - * - * \param vhtcapabilities VHT capabilities - */ + * Set the VHT capabilities. + * + * \param vhtcapabilities VHT capabilities + */ void SetVhtCapabilities (VhtCapabilities vhtcapabilities); /** * Return the Capability information. @@ -94,12 +94,11 @@ public: */ HtCapabilities GetHtCapabilities (void) const; /** - * Return the VHT capabilities. - * - * \return VHT capabilities - */ + * Return the VHT capabilities. + * + * \return VHT capabilities + */ VhtCapabilities GetVhtCapabilities (void) const; - /** * Return the Service Set Identifier (SSID). * @@ -136,8 +135,8 @@ private: SupportedRates m_rates; //!< List of supported rates CapabilityInformation m_capability; //!< Capability information HtCapabilities m_htCapability; //!< HT capabilities - uint16_t m_listenInterval; VhtCapabilities m_vhtCapability; //!< VHT capabilities + uint16_t m_listenInterval; }; diff --git a/src/wifi/model/regular-wifi-mac.h b/src/wifi/model/regular-wifi-mac.h index 6660c480d..a1724e601 100644 --- a/src/wifi/model/regular-wifi-mac.h +++ b/src/wifi/model/regular-wifi-mac.h @@ -439,12 +439,12 @@ protected: bool GetHtSupported () const; /** - * This Boolean is set \c true iff this WifiMac is to model - * 802.11ac. It is exposed through the attribute system. - */ + * This Boolean is set \c true iff this WifiMac is to model + * 802.11ac. It is exposed through the attribute system. + */ bool m_vhtSupported; /** - * Enable or disable HT support for the device. + * Enable or disable VHT support for the device. * * \param enable whether VHT is supported */ diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index ccf0a304e..ae3080aec 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -19,6 +19,7 @@ * Author: Mathieu Lacage * Author: Mirko Banchi */ + #include "ns3/assert.h" #include "ns3/address-utils.h" #include "wifi-mac-header.h" @@ -36,13 +37,13 @@ enum enum { + //Reserved: 0 - 6 + SUBTYPE_CTL_CTLWRAPPER = 7, SUBTYPE_CTL_BACKREQ = 8, SUBTYPE_CTL_BACKRESP = 9, SUBTYPE_CTL_RTS = 11, SUBTYPE_CTL_CTS = 12, - SUBTYPE_CTL_ACK = 13, - SUBTYPE_CTL_CTLWRAPPER = 7 - + SUBTYPE_CTL_ACK = 13 }; WifiMacHeader::WifiMacHeader () @@ -52,6 +53,7 @@ WifiMacHeader::WifiMacHeader () m_amsduPresent (0) { } + WifiMacHeader::~WifiMacHeader () { } @@ -179,6 +181,10 @@ WifiMacHeader::SetType (enum WifiMacType type) { switch (type) { + case WIFI_MAC_CTL_CTLWRAPPER: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_CTLWRAPPER; + break; case WIFI_MAC_CTL_BACKREQ: m_ctrlType = TYPE_CTL; m_ctrlSubtype = SUBTYPE_CTL_BACKREQ; @@ -199,10 +205,6 @@ WifiMacHeader::SetType (enum WifiMacType type) m_ctrlType = TYPE_CTL; m_ctrlSubtype = SUBTYPE_CTL_ACK; break; - case WIFI_MAC_CTL_CTLWRAPPER: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_CTLWRAPPER; - break; case WIFI_MAC_MGT_ASSOCIATION_REQUEST: m_ctrlType = TYPE_MGT; m_ctrlSubtype = 0; @@ -255,7 +257,6 @@ WifiMacHeader::SetType (enum WifiMacType type) m_ctrlType = TYPE_MGT; m_ctrlSubtype = 15; break; - case WIFI_MAC_DATA: m_ctrlType = TYPE_DATA; m_ctrlSubtype = 0; @@ -449,16 +450,16 @@ void WifiMacHeader::SetQosTxopLimit (uint8_t txop) void WifiMacHeader::SetQosMeshControlPresent (void) { - // mark bit 0 of this variable instead of bit 8, since m_qosStuff is - // shifted by one byte when serialized - m_qosStuff = m_qosStuff | 0x01; // bit 8 of QoS Control Field + //Mark bit 0 of this variable instead of bit 8, since m_qosStuff is + //shifted by one byte when serialized + m_qosStuff = m_qosStuff | 0x01; //bit 8 of QoS Control Field } void WifiMacHeader::SetQosNoMeshControlPresent () { - // clear bit 0 of this variable instead of bit 8, since m_qosStuff is - // shifted by one byte when serialized - m_qosStuff = m_qosStuff & 0xfe; // bit 8 of QoS Control Field + //Clear bit 0 of this variable instead of bit 8, since m_qosStuff is + //shifted by one byte when serialized + m_qosStuff = m_qosStuff & 0xfe; //bit 8 of QoS Control Field } @@ -1085,7 +1086,6 @@ WifiMacHeader::Print (std::ostream &os) const break; case WIFI_MAC_CTL_CTLWRAPPER: break; - case WIFI_MAC_MGT_BEACON: case WIFI_MAC_MGT_ASSOCIATION_REQUEST: case WIFI_MAC_MGT_ASSOCIATION_RESPONSE: diff --git a/src/wifi/model/wifi-mac-header.h b/src/wifi/model/wifi-mac-header.h index b99f27ff3..765eb98a8 100644 --- a/src/wifi/model/wifi-mac-header.h +++ b/src/wifi/model/wifi-mac-header.h @@ -19,6 +19,7 @@ * Author: Mathieu Lacage * Author: Mirko Banchi */ + #ifndef WIFI_MAC_HEADER_H #define WIFI_MAC_HEADER_H @@ -34,12 +35,12 @@ namespace ns3 { */ enum WifiMacType { - WIFI_MAC_CTL_RTS = 0, + WIFI_MAC_CTL_CTLWRAPPER = 0, + WIFI_MAC_CTL_RTS, WIFI_MAC_CTL_CTS, WIFI_MAC_CTL_ACK, WIFI_MAC_CTL_BACKREQ, WIFI_MAC_CTL_BACKRESP, - WIFI_MAC_CTL_CTLWRAPPER, WIFI_MAC_MGT_BEACON, WIFI_MAC_MGT_ASSOCIATION_REQUEST,