|
1039 |
MacLow::GetRtsTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
1039 |
MacLow::GetRtsTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
1040 |
{ |
1040 |
{ |
1041 |
Mac48Address to = hdr->GetAddr1 (); |
1041 |
Mac48Address to = hdr->GetAddr1 (); |
1042 |
return m_stationManager->GetRtsTxVector (to, hdr, packet); |
1042 |
WifiTxVector txVector = m_stationManager->GetRtsTxVector (to, hdr, packet); |
|
|
1043 |
return AdjustChannelWidthToMode (txVector); |
1043 |
} |
1044 |
} |
1044 |
|
1045 |
|
1045 |
WifiTxVector |
1046 |
WifiTxVector |
1046 |
MacLow::GetDataTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
1047 |
MacLow::GetDataTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
1047 |
{ |
1048 |
{ |
1048 |
Mac48Address to = hdr->GetAddr1 (); |
1049 |
Mac48Address to = hdr->GetAddr1 (); |
1049 |
return m_stationManager->GetDataTxVector (to, hdr, packet); |
1050 |
WifiTxVector txVector = m_stationManager->GetDataTxVector (to, hdr, packet); |
|
|
1051 |
return AdjustChannelWidthToMode (txVector); |
1050 |
} |
1052 |
} |
1051 |
|
1053 |
|
1052 |
WifiTxVector |
1054 |
WifiTxVector |
1053 |
MacLow::GetCtsTxVector (Mac48Address to, WifiMode rtsTxMode) const |
1055 |
MacLow::GetCtsTxVector (Mac48Address to, WifiMode rtsTxMode) const |
1054 |
{ |
1056 |
{ |
1055 |
return m_stationManager->GetCtsTxVector (to, rtsTxMode); |
1057 |
WifiTxVector txVector = m_stationManager->GetCtsTxVector (to, rtsTxMode); |
|
|
1058 |
return AdjustChannelWidthToMode (txVector); |
1056 |
} |
1059 |
} |
1057 |
|
1060 |
|
1058 |
WifiTxVector |
1061 |
WifiTxVector |
1059 |
MacLow::GetAckTxVector (Mac48Address to, WifiMode dataTxMode) const |
1062 |
MacLow::GetAckTxVector (Mac48Address to, WifiMode dataTxMode) const |
1060 |
{ |
1063 |
{ |
1061 |
return m_stationManager->GetAckTxVector (to, dataTxMode); |
1064 |
WifiTxVector txVector = m_stationManager->GetAckTxVector (to, dataTxMode); |
|
|
1065 |
return AdjustChannelWidthToMode (txVector); |
1062 |
} |
1066 |
} |
1063 |
|
1067 |
|
1064 |
WifiTxVector |
1068 |
WifiTxVector |
1065 |
MacLow::GetBlockAckTxVector (Mac48Address to, WifiMode dataTxMode) const |
1069 |
MacLow::GetBlockAckTxVector (Mac48Address to, WifiMode dataTxMode) const |
1066 |
{ |
1070 |
{ |
1067 |
return m_stationManager->GetBlockAckTxVector (to, dataTxMode); |
1071 |
WifiTxVector txVector = m_stationManager->GetBlockAckTxVector (to, dataTxMode); |
|
|
1072 |
return AdjustChannelWidthToMode (txVector); |
1068 |
} |
1073 |
} |
1069 |
|
1074 |
|
1070 |
WifiTxVector |
1075 |
WifiTxVector |
Lines 1079-1084
MacLow::GetAckTxVectorForData (Mac48Address to, WifiMode dataTxMode) const
|
Link Here
|
---|
|
1079 |
return GetAckTxVector (to, dataTxMode); |
1084 |
return GetAckTxVector (to, dataTxMode); |
1080 |
} |
1085 |
} |
1081 |
|
1086 |
|
|
|
1087 |
WifiTxVector |
1088 |
MacLow::AdjustChannelWidthToMode (WifiTxVector initialTxVector) const |
1089 |
{ |
1090 |
NS_LOG_FUNCTION (this << initialTxVector); |
1091 |
WifiModulationClass modulationClass = initialTxVector.GetMode ().GetModulationClass (); |
1092 |
uint8_t defaultChannelWidth = initialTxVector.GetChannelWidth (); |
1093 |
if (defaultChannelWidth > 20 && |
1094 |
(modulationClass == WifiModulationClass::WIFI_MOD_CLASS_OFDM || // all non-HT OFDM control and management frames |
1095 |
modulationClass == WifiModulationClass::WIFI_MOD_CLASS_ERP_OFDM)) // special case of beacons at 2.4 GHz |
1096 |
{ |
1097 |
WifiTxVector updatedTxVector = initialTxVector; |
1098 |
updatedTxVector.SetChannelWidth (20); |
1099 |
NS_LOG_LOGIC ("Channel width in TXVECTOR has been updated to 20 MHz channel"); |
1100 |
return updatedTxVector; |
1101 |
} |
1102 |
return initialTxVector; |
1103 |
} |
1104 |
|
1082 |
Time |
1105 |
Time |
1083 |
MacLow::CalculateOverallTxTime (Ptr<const Packet> packet, |
1106 |
MacLow::CalculateOverallTxTime (Ptr<const Packet> packet, |
1084 |
const WifiMacHeader* hdr, |
1107 |
const WifiMacHeader* hdr, |