From 8650201f10afe83387fd6cde00b08172172eeba3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 19 Jun 2019 12:32:20 +0200 Subject: [PATCH] mac80211: add config tweak for tx bursting when using VHT By default, set BE tx queue TXOP limit to 1.0 in the hostapd config Many vendor drivers are doing similar things to boost throughput. On MT7612 under ideal conditions, it improves tx throughput from 470 Mbit/s to about 570 Mbit/s. Signed-off-by: Felix Fietkau --- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 0426cb60f7..6dc4e5bf5f 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -23,6 +23,7 @@ drv_mac80211_init_device_config() { config_add_string path phy 'macaddr:macaddr' config_add_string hwmode + config_add_string tx_burst config_add_int beacon_int chanbw frag rts config_add_int rxantenna txantenna antenna_gain txpower distance config_add_boolean noscan ht_coex @@ -97,9 +98,10 @@ mac80211_hostapd_setup_base() { [ "$auto_channel" -gt 0 ] && json_get_values channel_list channels json_get_vars noscan ht_coex - json_get_values ht_capab_list ht_capab + json_get_values ht_capab_list ht_capab tx_burst [ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1 + [ "$tx_burst" = 0 ] && tx_burst= ieee80211n=1 ht_capab= @@ -229,6 +231,7 @@ mac80211_hostapd_setup_base() { vht_link_adapt:3 \ vht160:2 + set_default tx_burst 2.0 append base_cfg "ieee80211ac=1" "$N" vht_cap=0 for cap in $(iw phy "$phy" info | awk -F "[()]" '/VHT Capabilities/ { print $2 }'); do @@ -310,6 +313,7 @@ mac80211_hostapd_setup_base() { ${channel:+channel=$channel} ${channel_list:+chanlist=$channel_list} ${hostapd_noscan:+noscan=1} +${tx_burst:+tx_queue_data2_burst=$tx_burst} $base_cfg EOF -- 2.30.2