mac80211 compat layer for OpenWrt
Commit Message
On Thursday 11 February 2016 23:25:56 Sven Eckelmann wrote:
[...]
> I've also attached the patch to build the current state of B.A.T.M.A.N. V on
> OpenWrt.
Btw. the previously proposed way to select the routing algorithm at runtime in
OpenWrt requires an additional patch. The setting in /etc/config/network would
look something like:
config interface 'batnet'
option mtu '1532'
option proto 'batadv'
option mesh 'bat0'
option routing_algo 'BATMAN_IV'
Kind regards,
Sven
From: Sven Eckelmann <sven@open-mesh.com>
Date: Tue, 19 Jan 2016 12:40:10 +0100
Subject: [PATCH] openwrt-feed-batman-adv: Allow to select routing algorithm
The network config section for proto batadv now allows to select the
routing algorithm via the option routing_algo. This allows to chose between
BATMAN_IV and BATMAN_V when BATMAN_V is released. This option is only
useful when a new batman-adv device is created and not when only a device
is added to an already existing batman-adv device.
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Forwarded: https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2016-January/014225.html
---
batman-adv/files/lib/netifd/proto/batadv.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
@@ -6,14 +6,18 @@ init_proto "$@"
proto_batadv_init_config() {
proto_config_add_string "mesh"
+ proto_config_add_string "routing_algo"
}
proto_batadv_setup() {
local config="$1"
local iface="$2"
- local mesh
- json_get_vars mesh
+ local mesh routing_algo
+ json_get_vars mesh routing_algo
+
+ [ -n "$routing_algo" ] || routing_algo="BATMAN_IV"
+ echo "$routing_algo" > "/sys/module/batman_adv/parameters/routing_algo"
echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface"
proto_init_update "$iface" 1