summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-06-02 12:44:54 +0000
committerJohn Crispin <john@openwrt.org>2014-06-02 12:44:54 +0000
commit43de2d08de98eac58114caec3ec07f3c683233b1 (patch)
treeccc1b913118cb5ca3004cbf457e19640c12ee975 /package
parent40218343cd370e32f1f62ee0c0c57e7cb9b359b9 (diff)
downloadmtk-20170518-43de2d08de98eac58114caec3ec07f3c683233b1.zip
mtk-20170518-43de2d08de98eac58114caec3ec07f3c683233b1.tar.gz
mtk-20170518-43de2d08de98eac58114caec3ec07f3c683233b1.tar.bz2
mac80211: query driver for max A-MPDU length exponent
This patch enables netifd to query 802.11ac-driver for the maximum supported A-MPDU length exponent, possibly increasing VHT throughput by more aggressive frame aggregation. v2: refreshed patch Signed-off-by: Matti Laakso <malaakso at elisanet.fi> SVN-Revision: 40938
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 3bd912d..b19b928 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -36,7 +36,7 @@ drv_mac80211_init_device_config() {
htc_vht \
rx_antenna_pattern \
tx_antenna_pattern
- config_add_int vht_max_mpdu vht_link_adapt vht160 rx_stbc tx_stbc
+ config_add_int vht_max_a_mpdu_len_exp vht_max_mpdu vht_link_adapt vht160 rx_stbc tx_stbc
}
drv_mac80211_init_iface_config() {
@@ -202,6 +202,7 @@ mac80211_hostapd_setup_base() {
htc_vht:1 \
rx_antenna_pattern:1 \
tx_antenna_pattern:1 \
+ vht_max_a_mpdu_len_exp:7 \
vht_max_mpdu:11454 \
rx_stbc:4 \
tx_stbc:4 \
@@ -253,6 +254,24 @@ mac80211_hostapd_setup_base() {
vht_max_mpdu_hw=11454
[ "$vht_max_mpdu_hw" != 3895 ] && \
vht_capab="$vht_capab[MAX-MPDU-$vht_max_mpdu_hw]"
+
+ # maximum A-MPDU length exponent
+ vht_max_a_mpdu_len_exp_hw=0
+ [ "$(($vht_cap & 58720256))" -ge 8388608 -a 1 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=1
+ [ "$(($vht_cap & 58720256))" -ge 16777216 -a 2 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=2
+ [ "$(($vht_cap & 58720256))" -ge 25165824 -a 3 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=3
+ [ "$(($vht_cap & 58720256))" -ge 33554432 -a 4 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=4
+ [ "$(($vht_cap & 58720256))" -ge 41943040 -a 5 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=5
+ [ "$(($vht_cap & 58720256))" -ge 50331648 -a 6 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=6
+ [ "$(($vht_cap & 58720256))" -ge 58720256 -a 7 -le "$vht_max_a_mpdu_len_exp" ] && \
+ vht_max_a_mpdu_len_exp_hw=7
+ vht_capab="$vht_capab[MAX-A-MPDU-LEN-EXP$vht_max_a_mpdu_len_exp_hw]"
# whether or not the STA supports link adaptation using VHT variant
vht_link_adapt_hw=0