Index: src/wifi/model/wifi-net-device.cc |
=================================================================== |
--- a/src/wifi/model/wifi-net-device.cc |
+++ b/src/wifi/model/wifi-net-device.cc |
@@ -23,6 +23,7 @@ |
#include "wifi-phy.h" |
#include "wifi-remote-station-manager.h" |
#include "wifi-channel.h" |
+#include "qos-tag.h" |
#include "ns3/llc-snap-header.h" |
#include "ns3/packet.h" |
#include "ns3/uinteger.h" |
@@ -30,6 +31,7 @@ |
#include "ns3/node.h" |
#include "ns3/trace-source-accessor.h" |
#include "ns3/log.h" |
+#include "ns3/class-of-service-tag.h" |
namespace ns3 { |
@@ -277,6 +279,19 @@ |
{ |
NS_ASSERT (Mac48Address::IsMatchingType (dest)); |
+ // Convert to Wifi QosTag for later use by EDCA code |
+ ClassOfServiceTag cosTag; |
+ bool found = packet->RemovePacketTag (cosTag); |
+ if (!found) |
+ { |
+ NS_LOG_WARN ("No Class of Service tag found"); |
+ } |
+ else |
+ { |
+ QosTag qosTag = QosTag (cosTag.GetClassOfService ()); |
+ packet->AddPacketTag (qosTag); |
+ } |
+ |
Mac48Address realTo = Mac48Address::ConvertFrom (dest); |
LlcSnapHeader llc; |