correct a minor bug when A-MPDU is used at legacy rates; code cleanup

This commit is contained in:
Sébastien Deronne
2015-01-31 17:30:30 -08:00
parent 68c826b445
commit ad6c64aec9
3 changed files with 11 additions and 13 deletions

View File

@@ -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)

View File

@@ -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);

View File

@@ -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;