View | Details | Raw Unified | Return to bug 2514
Collapse All | Expand All

(-)a/src/wifi/model/mac-low.cc (-2 / +6 lines)
 Lines 2914-2919    Link Here 
2914
    }
2914
    }
2915
2915
2916
  WifiPreamble preamble;
2916
  WifiPreamble preamble;
2917
  Time aPPDUMaxTime = Seconds (0);
2917
2918
2918
  uint8_t tid = GetTid (peekedPacket, peekedHdr);
2919
  uint8_t tid = GetTid (peekedPacket, peekedHdr);
2919
  AcIndex ac = QosUtilsMapTidToAc (tid);
2920
  AcIndex ac = QosUtilsMapTidToAc (tid);
 Lines 2922-2935    Link Here 
2922
  if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT)
2923
  if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT)
2923
    {
2924
    {
2924
      preamble = WIFI_PREAMBLE_VHT;
2925
      preamble = WIFI_PREAMBLE_VHT;
2926
      aPPDUMaxTime = MicroSeconds (5484);
2925
    }
2927
    }
2926
  else if (m_phy->GetGreenfield () && m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ()))
2928
  else if (m_phy->GetGreenfield () && m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ()))
2927
    {
2929
    {
2928
      preamble = WIFI_PREAMBLE_HT_GF;
2930
      preamble = WIFI_PREAMBLE_HT_GF;
2931
      aPPDUMaxTime = MilliSeconds (10);
2929
    }
2932
    }
2930
  else if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT)
2933
  else if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT)
2931
    {
2934
    {
2932
      preamble = WIFI_PREAMBLE_HT_MF;
2935
      preamble = WIFI_PREAMBLE_HT_MF;
2936
      aPPDUMaxTime = MilliSeconds (10);
2933
    }
2937
    }
2934
  else if (m_stationManager->GetShortPreambleEnabled ())
2938
  else if (m_stationManager->GetShortPreambleEnabled ())
2935
    {
2939
    {
 Lines 2940-2947    Link Here 
2940
      preamble = WIFI_PREAMBLE_LONG;
2944
      preamble = WIFI_PREAMBLE_LONG;
2941
    }
2945
    }
2942
2946
2943
  //An HT STA shall not transmit a PPDU that has a duration that is greater than aPPDUMaxTime (10 milliseconds)
2947
  //A STA shall not transmit a PPDU that has a duration that is greater than aPPDUMaxTime
2944
  if (m_phy->CalculateTxDuration (aggregatedPacket->GetSize () + peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, m_currentTxVector, preamble, m_phy->GetFrequency ()) > MilliSeconds (10))
2948
  if ((aPPDUMaxTime > Seconds (0)) && (m_phy->CalculateTxDuration (aggregatedPacket->GetSize () + peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, m_currentTxVector, preamble, m_phy->GetFrequency ()) > aPPDUMaxTime))
2945
    {
2949
    {
2946
      NS_LOG_DEBUG ("no more packets can be aggregated to satisfy PPDU <= aPPDUMaxTime");
2950
      NS_LOG_DEBUG ("no more packets can be aggregated to satisfy PPDU <= aPPDUMaxTime");
2947
      return true;
2951
      return true;

Return to bug 2514