# HG changeset patch # User Tom Henderson # Date 1437770097 25200 # Node ID 14bdca6b98827ba7acb2b9da3689e824d4997457 # Parent 078922fe76ab1310285fcd26f757ee0e74eca6ff bug 1901: set missing Mesh Control Present bit diff -r 078922fe76ab -r 14bdca6b9882 src/mesh/model/dot11s/hwmp-protocol-mac.cc --- a/src/mesh/model/dot11s/hwmp-protocol-mac.cc Fri Jul 24 11:13:14 2015 -0700 +++ b/src/mesh/model/dot11s/hwmp-protocol-mac.cc Fri Jul 24 13:34:57 2015 -0700 @@ -203,6 +203,7 @@ meshHdr.SetMeshTtl (tag.GetTtl ()); packet->AddHeader (meshHdr); header.SetAddr1 (tag.GetAddress ()); + header.SetQosMeshControlPresent (); return true; } WifiActionHeader diff -r 078922fe76ab -r 14bdca6b9882 src/wifi/model/wifi-mac-header.cc --- a/src/wifi/model/wifi-mac-header.cc Fri Jul 24 11:13:14 2015 -0700 +++ b/src/wifi/model/wifi-mac-header.cc Fri Jul 24 13:34:57 2015 -0700 @@ -447,6 +447,21 @@ m_qosStuff = 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 +} + +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 +} + + Mac48Address WifiMacHeader::GetAddr1 (void) const { diff -r 078922fe76ab -r 14bdca6b9882 src/wifi/model/wifi-mac-header.h --- a/src/wifi/model/wifi-mac-header.h Fri Jul 24 11:13:14 2015 -0700 +++ b/src/wifi/model/wifi-mac-header.h Fri Jul 24 13:34:57 2015 -0700 @@ -294,6 +294,14 @@ */ void SetQosTxopLimit (uint8_t txop); /** + * Set the Mesh Control Present flag for the QoS header. + */ + void SetQosMeshControlPresent (); + /** + * Clear the Mesh Control Present flag for the QoS header. + */ + void SetQosNoMeshControlPresent (); + /** * Set order bit in the frame control field. */ void SetOrder (void);