summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorAntonio Quartulli <a@unstable.cc>2016-05-25 23:27:31 +0800
committerSimon Wunderlich <sw@simonwunderlich.de>2016-07-04 12:37:19 +0200
commit29824a55c07cd79a530d4bc1020a529c402515b6 (patch)
treec1838a6a39f690cdc23e14ffbeb416f4f9ff93ce /net/batman-adv/translation-table.c
parent33a3bb4a3345bb511f9c69c913da95d4693e2a4e (diff)
downloadlinux-stable-29824a55c07cd79a530d4bc1020a529c402515b6.tar.gz
linux-stable-29824a55c07cd79a530d4bc1020a529c402515b6.tar.bz2
linux-stable-29824a55c07cd79a530d4bc1020a529c402515b6.zip
batman-adv: split routing API data structure in subobjects
The routing API data structure contains several function pointers that can easily be grouped together based on the component they work with. Split the API in subobjects in order to improve definition readability. At the same time, remove the "bat_" prefix from the API object and its fields names. These are batman-adv private structs and there is no need to always prepend such prefix, which only makes function invocations much much longer. Signed-off-by: Antonio Quartulli <a@unstable.cc> Reviewed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 48ce7889a3e8..8bb82a391490 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1546,7 +1546,7 @@ batadv_transtable_best_orig(struct batadv_priv *bat_priv,
struct batadv_tt_global_entry *tt_global_entry)
{
struct batadv_neigh_node *router, *best_router = NULL;
- struct batadv_algo_ops *bao = bat_priv->bat_algo_ops;
+ struct batadv_algo_ops *bao = bat_priv->algo_ops;
struct hlist_head *head;
struct batadv_tt_orig_list_entry *orig_entry, *best_entry = NULL;
@@ -1558,8 +1558,8 @@ batadv_transtable_best_orig(struct batadv_priv *bat_priv,
continue;
if (best_router &&
- bao->bat_neigh_cmp(router, BATADV_IF_DEFAULT,
- best_router, BATADV_IF_DEFAULT) <= 0) {
+ bao->neigh.cmp(router, BATADV_IF_DEFAULT, best_router,
+ BATADV_IF_DEFAULT) <= 0) {
batadv_neigh_node_put(router);
continue;
}