aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-02 12:44:54 +0000
committerJohn Crispin <blogic@openwrt.org>2014-06-02 12:44:54 +0000
commit1ec9a71c225b9b3fd1f8c68281b6bc0c99d59ce4 (patch)
treee45bf829190388c70c70a7951793e8fb1eb1a5af /package/kernel
parent0554a8581258e0cd72a1ae97b5a7336c647c0238 (diff)
downloadupstream-1ec9a71c225b9b3fd1f8c68281b6bc0c99d59ce4.tar.gz
upstream-1ec9a71c225b9b3fd1f8c68281b6bc0c99d59ce4.tar.bz2
upstream-1ec9a71c225b9b3fd1f8c68281b6bc0c99d59ce4.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40938 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel')
-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 3bd912dc0a..b19b928cea 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