mac80211: add automatic ht40 mode handling for 2.4 ghz

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40684
This commit is contained in:
Felix Fietkau 2014-05-03 18:44:32 +00:00
parent 54625965c4
commit 4bd862a300

View file

@ -91,11 +91,28 @@ mac80211_hostapd_setup_base() {
case "$htmode" in case "$htmode" in
HT20) ;; HT20) ;;
HT40*|VHT40|VHT80|VHT160) HT40*|VHT40|VHT80|VHT160)
case "$hwmode" in
a)
case "$(( ($channel / 4) % 2 ))" in case "$(( ($channel / 4) % 2 ))" in
1) ht_capab="[HT40+]";; 1) ht_capab="[HT40+]";;
0) ht_capab="[HT40-]";; 0) ht_capab="[HT40-]";;
esac 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= ;; *) ieee80211n= ;;
esac esac