0016-mac80211-set-mcast-rate-for-mesh-point-interfaces.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From: Nils Schneider <nils@nilsschneider.net>
  2. Date: Fri, 24 Jul 2015 21:52:12 +0200
  3. Subject: mac80211: set mcast-rate for mesh point interfaces
  4. In order to set the multicast rate for mesh point interfaces the "mesh join"
  5. was made explicit and moved to mac80211_setup_vif(), similar to how it is
  6. done for IBSS interfaces.
  7. Previously, the mesh join was made implicit in case authentication (i.e.
  8. $key) was not used when creating the interface in mac80211_prepare_vif(),
  9. while using authentication would create the interface first, then join
  10. later in mac80211_setup_vif() by starting authsae.
  11. Signed-off-by: Nils Schneider <nils@nilsschneider.net>
  12. diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
  13. index c9bc3d6..8137b24 100644
  14. --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
  15. +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
  16. @@ -455,12 +455,7 @@ mac80211_prepare_vif() {
  17. }
  18. ;;
  19. mesh)
  20. - json_get_vars key mesh_id
  21. - if [ -n "$key" ]; then
  22. - iw phy "$phy" interface add "$ifname" type mp
  23. - else
  24. - iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id"
  25. - fi
  26. + iw phy "$phy" interface add "$ifname" type mp
  27. ;;
  28. monitor)
  29. iw phy "$phy" interface add "$ifname" type monitor
  30. @@ -603,6 +598,13 @@ mac80211_setup_vif() {
  31. wireless_vif_parse_encryption
  32. mac80211_setup_supplicant || failed=1
  33. fi
  34. + else
  35. + json_get_vars mesh_id mcast_rate
  36. +
  37. + mcval=
  38. + [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
  39. +
  40. + iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval}
  41. fi
  42. for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do