src/wifi/model/arf-wifi-manager.cc
changeset 11644 527ed7692b84
parent 11628 243b71de25a0
equal deleted inserted replaced
11643:eb0fc97dfd5b 11644:527ed7692b84
   207 ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
   207 ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
   208 {
   208 {
   209   NS_LOG_FUNCTION (this << st << size);
   209   NS_LOG_FUNCTION (this << st << size);
   210   ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
   210   ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
   211   uint32_t channelWidth = GetChannelWidth (station);
   211   uint32_t channelWidth = GetChannelWidth (station);
   212   if (channelWidth >= 40)
   212   if (channelWidth > 20 && channelWidth != 22)
   213     {
   213     {
   214       //avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
   214       //avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
   215       channelWidth = 20;
   215       channelWidth = 20;
   216     }
   216     }
   217   return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), false, 1, 1, channelWidth, GetAggregation (station), false);
   217   return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), false, 1, 1, channelWidth, GetAggregation (station), false);
   223   NS_LOG_FUNCTION (this << st);
   223   NS_LOG_FUNCTION (this << st);
   224   /// \todo we could/should implement the Arf algorithm for
   224   /// \todo we could/should implement the Arf algorithm for
   225   /// RTS only by picking a single rate within the BasicRateSet.
   225   /// RTS only by picking a single rate within the BasicRateSet.
   226   ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
   226   ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
   227   uint32_t channelWidth = GetChannelWidth (station);
   227   uint32_t channelWidth = GetChannelWidth (station);
   228   if (channelWidth >= 40)
   228   if (channelWidth > 20 && channelWidth != 22)
   229     {
   229     {
   230       //avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
   230       //avoid to use legacy rate adaptation algorithms for IEEE 802.11n/ac
   231       channelWidth = 20;
   231       channelWidth = 20;
   232     }
   232     }
   233   return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), false, 1, 0, channelWidth, GetAggregation (station), false);
   233   return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), false, 1, 0, channelWidth, GetAggregation (station), false);