correct a minor bug when A-MPDU is used at legacy rates; code cleanup
This commit is contained in:
@@ -2692,7 +2692,6 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
}
|
||||
|
||||
while (IsInWindow (currentSequenceNumber, startingSequenceNumber, 64) && !StopAggregation (peekedPacket, peekedHdr, currentAggregatedPacket, blockAckSize))
|
||||
//&& listenerIt->second->GetNOutstandingPackets (hdr.GetAddr1(), tid) < 63
|
||||
{
|
||||
//for now always send AMPDU with normal ACK
|
||||
if (retry == false)
|
||||
|
||||
@@ -261,6 +261,10 @@ WifiPhy::GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble)
|
||||
Time
|
||||
WifiPhy::GetPlcpHeaderDuration (WifiMode payloadMode, WifiPreamble preamble)
|
||||
{
|
||||
if (preamble == WIFI_PREAMBLE_NONE)
|
||||
{
|
||||
return MicroSeconds(0);
|
||||
}
|
||||
switch (payloadMode.GetModulationClass ())
|
||||
{
|
||||
case WIFI_MOD_CLASS_OFDM:
|
||||
@@ -292,7 +296,6 @@ WifiPhy::GetPlcpHeaderDuration (WifiMode payloadMode, WifiPreamble preamble)
|
||||
case WIFI_PREAMBLE_HT_MF:
|
||||
// L-SIG
|
||||
return MicroSeconds(4);
|
||||
case WIFI_PREAMBLE_NONE:
|
||||
case WIFI_PREAMBLE_HT_GF:
|
||||
//L-SIG
|
||||
return MicroSeconds(0);
|
||||
@@ -325,6 +328,10 @@ WifiPhy::GetPlcpHeaderDuration (WifiMode payloadMode, WifiPreamble preamble)
|
||||
Time
|
||||
WifiPhy::GetPlcpPreambleDuration (WifiMode payloadMode, WifiPreamble preamble)
|
||||
{
|
||||
if (preamble == WIFI_PREAMBLE_NONE)
|
||||
{
|
||||
return MicroSeconds(0);
|
||||
}
|
||||
switch (payloadMode.GetModulationClass ())
|
||||
{
|
||||
case WIFI_MOD_CLASS_OFDM:
|
||||
@@ -347,16 +354,9 @@ WifiPhy::GetPlcpPreambleDuration (WifiMode payloadMode, WifiPreamble preamble)
|
||||
}
|
||||
}
|
||||
case WIFI_MOD_CLASS_HT:
|
||||
{
|
||||
switch (preamble)
|
||||
{
|
||||
case WIFI_PREAMBLE_NONE:
|
||||
//A-MPDU support since MPDUs inside an A-MPDU are sent without a preamble
|
||||
return MicroSeconds(0);
|
||||
default:
|
||||
//IEEE 802.11n Figure 20.1 the training symbols before L_SIG or HT_SIG
|
||||
return MicroSeconds(16);
|
||||
}
|
||||
{
|
||||
//IEEE 802.11n Figure 20.1 the training symbols before L_SIG or HT_SIG
|
||||
return MicroSeconds(16);
|
||||
}
|
||||
case WIFI_MOD_CLASS_ERP_OFDM:
|
||||
return MicroSeconds(16);
|
||||
|
||||
@@ -524,7 +524,6 @@ YansWifiPhy::StartReceivePacket (Ptr<Packet> packet,
|
||||
AmpduTag ampduTag;
|
||||
rxPowerDbm += m_rxGainDb;
|
||||
double rxPowerW = DbmToW (rxPowerDbm);
|
||||
//Time rxDuration = CalculateTxDuration (packet->GetSize (), txVector, preamble, GetFrequency(), packetType, 1);
|
||||
WifiMode txMode = txVector.GetMode();
|
||||
Time endRx = Simulator::Now () + rxDuration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user