diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-05-03 18:38:16 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-05-03 18:38:16 +0000 |
commit | 52846f0ff53e7a4f5ecc6603200da708fb20d767 (patch) | |
tree | fbaad1430bb107796557cb1da53b832f05faf9eb /package/kernel/mac80211/files/lib | |
parent | 24791e0dd8791e5c7b75176454a4e9356edbb067 (diff) | |
download | upstream-52846f0ff53e7a4f5ecc6603200da708fb20d767.tar.gz upstream-52846f0ff53e7a4f5ecc6603200da708fb20d767.tar.bz2 upstream-52846f0ff53e7a4f5ecc6603200da708fb20d767.zip |
mac80211: disable 802.11n support if htmode is not set to HT* or VHT*
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40681
Diffstat (limited to 'package/kernel/mac80211/files/lib')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index e940f1304e..c96b4a353b 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -67,17 +67,21 @@ mac80211_hostapd_setup_base() { json_get_vars noscan htmode json_get_values ht_capab_list ht_capab - append base_cfg "ieee80211n=1" "$N" - + ieee80211n=1 ht_capab= case "$htmode" in + HT20) ;; HT40*|VHT40|VHT80|VHT160) case "$(( ($channel / 4) % 2 ))" in 1) ht_capab="[HT40+]";; 0) ht_capab="[HT40-]";; esac - ;; + ;; + *) ieee80211n= ;; esac + + [ -n "$ieee80211n" ] && append base_cfg "ieee80211n=1" "$N" + for cap in $ht_capab_list; do ht_capab="$ht_capab[$cap]" done |