Possibility to customize CSMA/CA contention window size using OpenWrt


I am new to OpenWrt.
I would like to test the impact of changing the contention window size in CSMA/CA using OpenWrt.
Based on my current understanding, it is possible to change the maximum and minimum of contention window size (e.g. with related parameter ieee80211_tx_queue_params) in mac80211 by creating a patch for mac80211 based on this topic - How to create and apply a kernel patch for OpenWrt 18?.

If I would like to change the backoff number in CSMA/CA for each packet transmission, it seems that I need to change the wireless driver instead of mac80211. I got two questions:

  1. Is it possible for me to change backoff number for each packet transmission using OpenWrt? If so, how to do this?
  2. If I need to change wireless driver using OpenWrt, how to identify which driver I need to change (e.g., for the source file in the build_dir directory of Netgear R7500, there are many drivers in the directory - driver/net/wireless)?

Appreciate any feedback.

Thanks a lot!

@Yubing19, welcome to the community!

Why would you do this instead of simply altering CTS/RTS parameters?

This one is quite simple. Pick the driver installed by default on your device. If this is a custom box, please provide us the make/model of the WiFi chip.

Thanks for your feedback!

In my case, I need to give different WiFi links with different priority by altering the CSMA/CA backoff number of various links. In this way, the QoS performance of various links can be differentiated.

For example, for Netgear R7500, how to identify the default driver on the device? I did a little search but I did not find related information.

have a look at the output of


or look (for example)

ls /sys/class/net/wlan0/device/driver/module/drivers/

Thanks! That works.

1 Like


I am still struggling with identifying the throughput performance impact by modifying the contention window related parameter (cw_min and cw_max).

I use the following process:
make package/kernel/mac80211/{clean,prepare} V=s QUILT=1
cd build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x/backports-2017-11-01/
quilt series
quilt push -a
quilt new 701-ath10k_cwchange.patch (link of the patch: https://drive.google.com/open?id=1UZBu1ymjRujAt0HXJ5cNe4aMSGZ2LbnX)
quilt edit drivers/net/wireless/ath/ath10k/mac.c (sample of edited file)
quilt refresh
cd ../../../../
make package/kernel/mac80211/update V=s
make package/kernel/mac80211/{clean,compile} package/index V=s (I can identify the patch file in package/kernel/mac80211 directory)
make -j8 V=s

Then, I imported the customized firmware to Netgear R7500 AP and use Iperf to test the throughput performance. The throughput does not change due to the contention window modification steps mentioned above.

I don't know how to collect logging information of mac80211 or ath10k when the AP is transmitting packets. It prevents me to further identify the bug for the patch.
Could anyone point out any mistake I did or any debugging method for my case?

Any help would be appreciated!

Acutally, it works. I can see the performance variantion from Iperf.
I can't see the performance variance due to: 1) there are contention links; 2) UDP performance test should be performed instead of TCP performance

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.