# HG changeset patch # User Tom Henderson # Date 1437761594 25200 # Node ID 078922fe76ab1310285fcd26f757ee0e74eca6ff # Parent 053ab84aee542f89eb51c8e4d12f0adbb2949f25 set mesh frames to type QOSDATA diff -r 053ab84aee54 -r 078922fe76ab src/mesh/model/mesh-wifi-interface-mac.cc --- a/src/mesh/model/mesh-wifi-interface-mac.cc Wed Jul 22 22:15:56 2015 -0700 +++ b/src/mesh/model/mesh-wifi-interface-mac.cc Fri Jul 24 11:13:14 2015 -0700 @@ -220,7 +220,7 @@ // copy packet to allow modifications Ptr packet = const_packet->Copy (); WifiMacHeader hdr; - hdr.SetTypeData (); + hdr.SetType (WIFI_MAC_QOSDATA); hdr.SetAddr2 (GetAddress ()); hdr.SetAddr3 (to); hdr.SetAddr4 (from); @@ -255,19 +255,20 @@ } m_stationManager->RecordDisassociated (hdr.GetAddr1 ()); } - //Classify: application sets a tag, which is removed here - // Get Qos tag: - AcIndex ac = AC_BE; + // Classify: application may have set a tag, which is removed here + AcIndex ac; QosTag tag; if (packet->RemovePacketTag (tag)) { - hdr.SetType (WIFI_MAC_QOSDATA); hdr.SetQosTid (tag.GetTid ()); - //Aftre setting type DsFrom and DsTo fields are reset. - hdr.SetDsFrom (); - hdr.SetDsTo (); ac = QosUtilsMapTidToAc (tag.GetTid ()); } + else + { + // No tag found; set to best effort + ac = AC_BE; + hdr.SetQosTid (0); + } m_stats.sentFrames++; m_stats.sentBytes += packet->GetSize (); NS_ASSERT (m_edca.find (ac) != m_edca.end ()); diff -r 053ab84aee54 -r 078922fe76ab src/wifi/model/qos-utils.cc --- a/src/wifi/model/qos-utils.cc Wed Jul 22 22:15:56 2015 -0700 +++ b/src/wifi/model/qos-utils.cc Fri Jul 24 11:13:14 2015 -0700 @@ -27,6 +27,7 @@ AcIndex QosUtilsMapTidToAc (uint8_t tid) { + NS_ASSERT_MSG (tid < 8, "Tid " << (uint16_t) tid << " out of range"); switch (tid) { case 0: