aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorAlexis Green <agreen@cococorp.com>2016-12-21 15:17:01 -0800
committerJo-Philipp Wich <jo@mein.io>2017-01-02 16:47:59 +0100
commitfd718c50256536ed082852d735dc7690d7604418 (patch)
treeceb63c3277b5ee9c131fab80b33db181c69c42e1 /package/kernel
parent8496659eb464928a645025a55a7cd487e83199cb (diff)
downloadupstream-fd718c50256536ed082852d735dc7690d7604418.tar.gz
upstream-fd718c50256536ed082852d735dc7690d7604418.tar.bz2
upstream-fd718c50256536ed082852d735dc7690d7604418.zip
mac80211: Allow HT/VHT rates when running unencrypted mesh.
Signed-off-by: Alexis Green <agreen@cococorp.com>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh37
1 files changed, 36 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index e3d612e4b2..1fa39b8261 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -611,7 +611,42 @@ mac80211_setup_vif() {
mcval=
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
- iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval}
+ case "$htmode" in
+ VHT20|HT20) mesh_htmode=HT20;;
+ HT40*|VHT40)
+ case "$hwmode" in
+ a)
+ case "$(( ($channel / 4) % 2 ))" in
+ 1) mesh_htmode="HT40+" ;;
+ 0) mesh_htmode="HT40-";;
+ esac
+ ;;
+ *)
+ case "$htmode" in
+ HT40+) mesh_htmode="HT40+";;
+ HT40-) mesh_htmode="HT40-";;
+ *)
+ if [ "$channel" -lt 7 ]; then
+ mesh_htmode="HT40+"
+ else
+ mesh_htmode="HT40-"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ VHT80)
+ mesh_htmode="80Mhz"
+ ;;
+ VHT160)
+ mesh_htmode="160Mhz"
+ ;;
+ *) mesh_htmode="NOHT" ;;
+ esac
+
+ freq="$(get_freq "$phy" "$channel")"
+ iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode ${mcval:+mcast-rate $mcval}
fi
for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do