|
220 |
// copy packet to allow modifications |
220 |
// copy packet to allow modifications |
221 |
Ptr<Packet> packet = const_packet->Copy (); |
221 |
Ptr<Packet> packet = const_packet->Copy (); |
222 |
WifiMacHeader hdr; |
222 |
WifiMacHeader hdr; |
223 |
hdr.SetTypeData (); |
223 |
hdr.SetType (WIFI_MAC_QOSDATA); |
224 |
hdr.SetAddr2 (GetAddress ()); |
224 |
hdr.SetAddr2 (GetAddress ()); |
225 |
hdr.SetAddr3 (to); |
225 |
hdr.SetAddr3 (to); |
226 |
hdr.SetAddr4 (from); |
226 |
hdr.SetAddr4 (from); |
|
255 |
} |
255 |
} |
256 |
m_stationManager->RecordDisassociated (hdr.GetAddr1 ()); |
256 |
m_stationManager->RecordDisassociated (hdr.GetAddr1 ()); |
257 |
} |
257 |
} |
258 |
//Classify: application sets a tag, which is removed here |
258 |
// Classify: application may have set a tag, which is removed here |
259 |
// Get Qos tag: |
259 |
AcIndex ac; |
260 |
AcIndex ac = AC_BE; |
|
|
261 |
QosTag tag; |
260 |
QosTag tag; |
262 |
if (packet->RemovePacketTag (tag)) |
261 |
if (packet->RemovePacketTag (tag)) |
263 |
{ |
262 |
{ |
264 |
hdr.SetType (WIFI_MAC_QOSDATA); |
|
|
265 |
hdr.SetQosTid (tag.GetTid ()); |
263 |
hdr.SetQosTid (tag.GetTid ()); |
266 |
//Aftre setting type DsFrom and DsTo fields are reset. |
|
|
267 |
hdr.SetDsFrom (); |
268 |
hdr.SetDsTo (); |
269 |
ac = QosUtilsMapTidToAc (tag.GetTid ()); |
264 |
ac = QosUtilsMapTidToAc (tag.GetTid ()); |
270 |
} |
265 |
} |
|
|
266 |
else |
267 |
{ |
268 |
// No tag found; set to best effort |
269 |
ac = AC_BE; |
270 |
hdr.SetQosTid (0); |
271 |
} |
271 |
m_stats.sentFrames++; |
272 |
m_stats.sentFrames++; |
272 |
m_stats.sentBytes += packet->GetSize (); |
273 |
m_stats.sentBytes += packet->GetSize (); |
273 |
NS_ASSERT (m_edca.find (ac) != m_edca.end ()); |
274 |
NS_ASSERT (m_edca.find (ac) != m_edca.end ()); |