batman-adv: Introduce forward packet creation helper
authorLinus Lüssing <linus.luessing@c0d3.blue>
Mon, 20 Jun 2016 19:39:54 +0000 (21:39 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Tue, 9 Aug 2016 05:54:32 +0000 (07:54 +0200)
commita65e5481315e0754a20f58aa374423610a311f33
tree32a59a2b19862ac384c81babaf03f3b18a7bcf47
parent4fd261bf586b0fc932d5fd20d9b1648547b16eca
batman-adv: Introduce forward packet creation helper

This patch abstracts the forward packet creation into the new function
batadv_forw_packet_alloc().

The queue counting and interface reference counters are now handled
internally within batadv_forw_packet_alloc() and its
batadv_forw_packet_free() counterpart. This should reduce the risk of
having reference/queue counting bugs again and should increase
code readibility.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/send.c
net/batman-adv/send.h
net/batman-adv/types.h