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 | 4bd862a3005bbc20573ddd0172d2d0bcd46ae4df (patch) | |
tree | 72d3be3a31030bf3dfafec3a1fe6c8c9fa4fc3d7 /package | |
parent | 54625965c4cae72bafa5bdd293e013ed3c6f7e15 (diff) | |
download | upstream-4bd862a3005bbc20573ddd0172d2d0bcd46ae4df.tar.gz upstream-4bd862a3005bbc20573ddd0172d2d0bcd46ae4df.tar.bz2 upstream-4bd862a3005bbc20573ddd0172d2d0bcd46ae4df.zip |
mac80211: add automatic ht40 mode handling for 2.4 ghz
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40684
Diffstat (limited to 'package')
-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= ;; |