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_link_adapt vht160 rx_stbc tx_stbc
+ config_add_boolean \
+ ldpc \
+ greenfield \
+ short_gi_20 \
+ short_gi_40 \
+ dsss_cck_40
}
drv_mac80211_init_iface_config() {
config_add_boolean wds powersave
config_add_int maxassoc
config_add_int max_listen_int
- config_add_int dtim_interval
+ config_add_int dtim_period
# mesh
config_add_string mesh_id
json_get_vars \
ldpc:1 \
- greenfield:1 \
+ greenfield:0 \
short_gi_20:1 \
short_gi_40:1 \
tx_stbc:1 \
GF:0x10::$greenfield \
SHORT-GI-20:0x20::$short_gi_20 \
SHORT-GI-40:0x40::$short_gi_40 \
- TX-STBC:0x80::$max_tx_stbc \
+ TX-STBC:0x80::$tx_stbc \
RX-STBC1:0x300:0x100:1 \
RX-STBC12:0x300:0x200:1 \
RX-STBC123:0x300:0x300:1 \
DSSS_CCK-40:0x1000::$dsss_cck_40
- [ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab$ht_capab_flags" "$N"
+ ht_capab="$ht_capab$ht_capab_flags"
+ [ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab" "$N"
}
# 802.11ac
append base_cfg "vht_oper_centr_freq_seg0_idx=$idx" "$N"
;;
VHT80)
- case "$(( ($channel / 4) % 2 ))" in
+ case "$(( ($channel / 4) % 4 ))" in
1) idx=$(($channel + 6));;
2) idx=$(($channel + 2));;
3) idx=$(($channel - 2));;
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 \
vht_link_adapt:3 \
vht160:2
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
find_phy() {
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
- [ -n "$path" -a -d "/sys/devices/$path/ieee80211" ] && {
- phy="$(ls /sys/devices/$path/ieee80211 | grep -m 1 phy)"
- [ -n "$phy" ] && return 0
+ [ -n "$path" ] && {
+ for phy in /sys/devices/$path/ieee80211/phy*; do
+ [ -e "$phy" ] && {
+ phy="${phy##*/}"
+ return 0
+ }
+ done
}
[ -n "$macaddr" ] && {
for phy in $(ls /sys/class/ieee80211 2>/dev/null); do