]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: set up network coding packet handlers during module init
authorMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 27 Sep 2013 16:03:39 +0000 (18:03 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 2 Oct 2013 11:46:19 +0000 (13:46 +0200)
commitc119885b86131da28f72ade55f1496a7bc8b2e6c
treec937e1f722ff9c3468bca8077bb42f045d3a3207
parenta84bc0d96a54fc12e51153bb67b4aad1e2917bc8
batman-adv: set up network coding packet handlers during module init

batman-adv saves its table of packet handlers as a global state, so handlers
must be set up only once (and setting them up a second time will fail).

The recently-added network coding support tries to set up its handler each time
a new softif is registered, which obviously fails when more that one softif is
used (and in consequence, the softif creation fails).

Fix this by splitting up batadv_nc_init into batadv_nc_init (which is called
only once) and batadv_nc_mesh_init (which is called for each softif); in
addition batadv_nc_free is renamed to batadv_nc_mesh_free to keep naming
consistent.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/main.c
net/batman-adv/network-coding.c
net/batman-adv/network-coding.h