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.
Signed-off-by: Matti Laakso <malaakso at elisanet.fi> --- Index: trunk/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh =================================================================== --- trunk/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh (revision 39772) +++ trunk/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh (working copy) @@ -36,7 +36,7 @@ htc_vht \ rx_antenna_pattern \ tx_antenna_pattern - config_add_int vht_max_mpdu vht_max_rx_stbc vht_link_adapt vht160 + config_add_int vht_max_a_mpdu_len_exp vht_max_mpdu vht_max_rx_stbc vht_link_adapt vht160 } drv_mac80211_init_iface_config() { @@ -146,6 +146,7 @@ htc_vht:1 \ rx_antenna_pattern:1 \ tx_antenna_pattern:1 \ + vht_max_a_mpdu_len_exp:7 \ vht_max_mpdu:11454 \ vht_max_rx_stbc:4 \ vht_link_adapt:3 \ @@ -217,6 +218,24 @@ [ "$vht_max_rx_stbc_hw" = 3 ] && vht_capab="$vht_capab[RX-STBC-123]" [ "$vht_max_rx_stbc_hw" = 4 ] && vht_capab="$vht_capab[RX-STBC-1234]" + # 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 [ "$(($vht_cap & 201326592))" -ge 134217728 -a 2 -le "$vht_link_adapt" ] && \ _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel