1051 const WifiMacHeader* hdr, |
1051 const WifiMacHeader* hdr, |
1052 const MacLowTransmissionParameters& params) const |
1052 const MacLowTransmissionParameters& params) const |
1053 { |
1053 { |
1054 WifiPreamble preamble; |
1054 WifiPreamble preamble; |
1055 Time txTime = Seconds (0); |
1055 Time txTime = Seconds (0); |
1056 WifiTxVector rtsTxVector = GetRtsTxVector (packet, hdr); |
|
1057 WifiTxVector dataTxVector = GetDataTxVector (packet, hdr); |
|
1058 //standard says RTS packets can have GF format sec 9.6.0e.1 page 110 bullet b 2 |
|
1059 if ( m_phy->GetGreenfield()&& m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ())) |
|
1060 preamble= WIFI_PREAMBLE_HT_GF; |
|
1061 else if (rtsTxVector.GetMode().GetModulationClass () == WIFI_MOD_CLASS_HT) |
|
1062 preamble= WIFI_PREAMBLE_HT_MF; |
|
1063 else |
|
1064 preamble=WIFI_PREAMBLE_LONG; |
|
1065 if (params.MustSendRts ()) |
1056 if (params.MustSendRts ()) |
1066 { |
1057 { |
|
1058 WifiTxVector rtsTxVector = GetRtsTxVector (packet, hdr); |
|
1059 //standard says RTS packets can have GF format sec 9.6.0e.1 page 110 bullet b 2 |
|
1060 if (m_phy->GetGreenfield () && m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ())) |
|
1061 { |
|
1062 preamble = WIFI_PREAMBLE_HT_GF; |
|
1063 } |
|
1064 else if (rtsTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_HT) |
|
1065 { |
|
1066 preamble = WIFI_PREAMBLE_HT_MF; |
|
1067 } |
|
1068 else |
|
1069 { |
|
1070 preamble = WIFI_PREAMBLE_LONG; |
|
1071 } |
1067 txTime += m_phy->CalculateTxDuration (GetRtsSize (), rtsTxVector, preamble); |
1072 txTime += m_phy->CalculateTxDuration (GetRtsSize (), rtsTxVector, preamble); |
1068 txTime += GetCtsDuration (hdr->GetAddr1 (), rtsTxVector); |
1073 txTime += GetCtsDuration (hdr->GetAddr1 (), rtsTxVector); |
1069 txTime += Time (GetSifs () * 2); |
1074 txTime += Time (GetSifs () * 2); |
1070 } |
1075 } |
|
1076 WifiTxVector dataTxVector = GetDataTxVector (packet, hdr); |
1071 //standard says RTS packets can have GF format sec 9.6.0e.1 page 110 bullet b 2 |
1077 //standard says RTS packets can have GF format sec 9.6.0e.1 page 110 bullet b 2 |
1072 if ( m_phy->GetGreenfield()&& m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ())) |
1078 if ( m_phy->GetGreenfield()&& m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ())) |
1073 preamble= WIFI_PREAMBLE_HT_GF; |
1079 preamble= WIFI_PREAMBLE_HT_GF; |
1074 else if (dataTxVector.GetMode().GetModulationClass () == WIFI_MOD_CLASS_HT) |
1080 else if (dataTxVector.GetMode().GetModulationClass () == WIFI_MOD_CLASS_HT) |
1075 preamble= WIFI_PREAMBLE_HT_MF; |
1081 preamble= WIFI_PREAMBLE_HT_MF; |