Skip to content

wifi: [BUG] Corect uint32_t division to double

Robert requested to merge Robert-ML/ns-3-dev:wifi_RRAA_rate-control_bug into master

Inside the wifi module, for the rate control algorithm RRAA, a variable of type double that decided if the bit rate should be changed was calculated from 2 uint32_t and always was computed to 0.

NS3 was built like this:

./ns3 configure --enable-examples --build-profile=debug

./ns3 build

To replicate the behavior before the commit:

./build/src/wifi/examples/ns3-dev-wifi-manager-example-debug --wifiManager=Rraa --standard=802.11a --stepTime=0.1

gnuplot ./wifi-manager-example-Rraa-802.11a.plt

and inside this plot (wifi-manager-example-Rraa-802.11a_old.eps ) that was generated can be seen that the rate is always set to maximum.

After the commit is applied, the plot is obtained using the same commands and is looking as the RRAA algorithm would expect: wifi-manager-example-Rraa-802.11a_fixed.eps

Merge request reports

Loading