diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-05-03 18:44:32 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-05-03 18:44:32 +0000 |
commit | 15f447a3f5d0147b5aa72abdda8a4e6948f7f804 (patch) | |
tree | ad6ffaac1558b0c952b78e3bff76989d662ff4fc /package/kernel/mac80211/files | |
parent | abbb0b01450fcf093c09ba2c1e6bc561149ad5ac (diff) | |
download | master-187ad058-15f447a3f5d0147b5aa72abdda8a4e6948f7f804.tar.gz master-187ad058-15f447a3f5d0147b5aa72abdda8a4e6948f7f804.tar.bz2 master-187ad058-15f447a3f5d0147b5aa72abdda8a4e6948f7f804.zip |
mac80211: add automatic ht40 mode handling for 2.4 ghz
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40684 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 23 |
1 files changed, 20 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 1b7c5a65f2..29100887e3 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -91,9 +91,26 @@ mac80211_hostapd_setup_base() { case "$htmode" in HT20) ;; HT40*|VHT40|VHT80|VHT160) - case "$(( ($channel / 4) % 2 ))" in - 1) ht_capab="[HT40+]";; - 0) ht_capab="[HT40-]";; + case "$hwmode" in + a) + case "$(( ($channel / 4) % 2 ))" in + 1) ht_capab="[HT40+]";; + 0) ht_capab="[HT40-]";; + esac + ;; + *) + case "$htmode" in + HT40+) ht_capab="[HT40+]";; + HT40-) ht_capab="[HT40-]";; + *) + if [ "$channel" -lt 7 ]; then + ht_capab="[HT40+]" + else + ht_capab="[HT40-]" + fi + ;; + esac + ;; esac ;; *) ieee80211n= ;; |