aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-01 08:14:59 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-01 08:14:59 +0000
commit9af27e4d4947ba748a3c446ad30f8fc330144d1d (patch)
tree58a4e22909bae715bf6fab169bbaf98c37707a97 /package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
parentc2f41fefe5b8377c32c99616c245881fe6e0e001 (diff)
downloadupstream-9af27e4d4947ba748a3c446ad30f8fc330144d1d.tar.gz
upstream-9af27e4d4947ba748a3c446ad30f8fc330144d1d.tar.bz2
upstream-9af27e4d4947ba748a3c446ad30f8fc330144d1d.zip
mac80211: set mcast-rate for mesh point interfaces
In order to set the multicast rate for mesh point interfaces the "mesh join" was made explicit and moved to mac80211_setup_vif(), similar to how it is done for IBSS interfaces. Previously, the mesh join was made implicit in case authentication (i.e. $key) was not used when creating the interface in mac80211_prepare_vif(), while using authentication would create the interface first, then join later in mac80211_setup_vif() by starting authsae. Signed-off-by: Nils Schneider <nils@nilsschneider.net> Backport of r47408 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48858 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 2852f3e08c..fb2f928751 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -455,12 +455,7 @@ mac80211_prepare_vif() {
}
;;
mesh)
- json_get_vars key mesh_id
- if [ -n "$key" ]; then
- iw phy "$phy" interface add "$ifname" type mp
- else
- iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id"
- fi
+ iw phy "$phy" interface add "$ifname" type mp
;;
monitor)
iw phy "$phy" interface add "$ifname" type monitor
@@ -606,6 +601,13 @@ mac80211_setup_vif() {
wireless_vif_parse_encryption
mac80211_setup_supplicant || failed=1
fi
+ else
+ json_get_vars mesh_id mcast_rate
+
+ mcval=
+ [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
+
+ iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval}
fi
for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do