wifi: move AddWifiMacTrailer to wifi-utils
This commit is contained in:
@@ -145,9 +145,9 @@ uint16_t EdcaTxopN::PeekNextSequenceNumberFor (WifiMacHeader *hdr)
|
||||
}
|
||||
|
||||
Ptr<const Packet>
|
||||
EdcaTxopN::PeekNextRetransmitPacket (WifiMacHeader &header,Mac48Address recipient, uint8_t tid, Time *timestamp)
|
||||
EdcaTxopN::PeekNextRetransmitPacket (WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp)
|
||||
{
|
||||
return m_baManager->PeekNextPacketByTidAndAddress (header,recipient,tid, timestamp);
|
||||
return m_baManager->PeekNextPacketByTidAndAddress (header, recipient, tid, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -2810,11 +2810,4 @@ MacLow::PerformMsduAggregation (Ptr<const Packet> packet, WifiMacHeader *hdr, Ti
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MacLow::AddWifiMacTrailer (Ptr<Packet> packet)
|
||||
{
|
||||
WifiMacTrailer fcs;
|
||||
packet->AddTrailer (fcs);
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -419,12 +419,6 @@ private:
|
||||
* \return the total packet size
|
||||
*/
|
||||
static uint32_t GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr, bool isAmpdu);
|
||||
/**
|
||||
* Add FCS trailer to a packet.
|
||||
*
|
||||
* \param packet
|
||||
*/
|
||||
static void AddWifiMacTrailer (Ptr<Packet> packet);
|
||||
/**
|
||||
* Forward the packet down to WifiPhy for transmission. This is called for the entire A-MPDu when MPDU aggregation is used.
|
||||
*
|
||||
|
||||
@@ -128,4 +128,11 @@ IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize)
|
||||
return ((seq - winstart + 4096) % 4096) < winsize;
|
||||
}
|
||||
|
||||
void
|
||||
AddWifiMacTrailer (Ptr<Packet> packet)
|
||||
{
|
||||
WifiMacTrailer fcs;
|
||||
packet->AddTrailer (fcs);
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ctrl-headers.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/packet.h"
|
||||
#include "wifi-mac-trailer.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -112,6 +114,12 @@ uint32_t GetCtsSize (void);
|
||||
* This method checks if the MPDU's sequence number is inside the scoreboard boundaries or not
|
||||
*/
|
||||
bool IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize);
|
||||
/**
|
||||
* Add FCS trailer to a packet.
|
||||
*
|
||||
* \param packet
|
||||
*/
|
||||
void AddWifiMacTrailer (Ptr<Packet> packet);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user