batman-adv: Add wrapper to look up neighbor and send skb
authorMartin Hundebøll <martin@hundeboll.net>
Tue, 16 Oct 2012 14:13:48 +0000 (16:13 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 21 Nov 2012 11:34:50 +0000 (12:34 +0100)
commitbb351ba0bba23f01af00e36bfe20897201f404fa
tree7ac84275cfb3f32d0cae0ba854a90298f56e9561
parent637fbd12947b5645d8c16c982aa15c17ab695b0a
batman-adv: Add wrapper to look up neighbor and send skb

By adding batadv_send_skb_to_orig() in send.c, we can remove duplicate
code that looks up the next hop and then calls batadv_send_skb_packet().

Furthermore, this prepares the upcoming new implementation of
fragmentation, which requires the next hop to route packets.

Please note that this doesn't entirely remove the next-hop lookup in
routing.c and unicast.c, since it is used by the current fragmentation
code.

Also note that the next-hop info is removed from debug messages in
translation-table.c, since it is looked up elsewhere.

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/routing.c
net/batman-adv/send.c
net/batman-adv/send.h
net/batman-adv/translation-table.c
net/batman-adv/unicast.c
net/batman-adv/vis.c