Commit 8248a4c7 authored by Marek Lindner's avatar Marek Lindner Committed by Antonio Quartulli

batman-adv: add bat_hardif_neigh_init algo ops call

Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
parent cef63419
...@@ -539,6 +539,7 @@ static struct batadv_hardif_neigh_node * ...@@ -539,6 +539,7 @@ static struct batadv_hardif_neigh_node *
batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr) const u8 *neigh_addr)
{ {
struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
struct batadv_hardif_neigh_node *hardif_neigh = NULL; struct batadv_hardif_neigh_node *hardif_neigh = NULL;
spin_lock_bh(&hard_iface->neigh_list_lock); spin_lock_bh(&hard_iface->neigh_list_lock);
...@@ -564,6 +565,9 @@ batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface, ...@@ -564,6 +565,9 @@ batadv_hardif_neigh_create(struct batadv_hard_iface *hard_iface,
atomic_set(&hardif_neigh->refcount, 1); atomic_set(&hardif_neigh->refcount, 1);
if (bat_priv->bat_algo_ops->bat_hardif_neigh_init)
bat_priv->bat_algo_ops->bat_hardif_neigh_init(hardif_neigh);
hlist_add_head(&hardif_neigh->list, &hard_iface->neigh_list); hlist_add_head(&hardif_neigh->list, &hard_iface->neigh_list);
out: out:
......
...@@ -1153,6 +1153,7 @@ struct batadv_forw_packet { ...@@ -1153,6 +1153,7 @@ struct batadv_forw_packet {
* @bat_primary_iface_set: called when primary interface is selected / changed * @bat_primary_iface_set: called when primary interface is selected / changed
* @bat_ogm_schedule: prepare a new outgoing OGM for the send queue * @bat_ogm_schedule: prepare a new outgoing OGM for the send queue
* @bat_ogm_emit: send scheduled OGM * @bat_ogm_emit: send scheduled OGM
* @bat_hardif_neigh_init: called on creation of single hop entry
* @bat_neigh_cmp: compare the metrics of two neighbors for their respective * @bat_neigh_cmp: compare the metrics of two neighbors for their respective
* outgoing interfaces * outgoing interfaces
* @bat_neigh_is_equiv_or_better: check if neigh1 is equally good or better * @bat_neigh_is_equiv_or_better: check if neigh1 is equally good or better
...@@ -1178,6 +1179,7 @@ struct batadv_algo_ops { ...@@ -1178,6 +1179,7 @@ struct batadv_algo_ops {
void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface); void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
void (*bat_ogm_emit)(struct batadv_forw_packet *forw_packet); void (*bat_ogm_emit)(struct batadv_forw_packet *forw_packet);
/* neigh_node handling API */ /* neigh_node handling API */
void (*bat_hardif_neigh_init)(struct batadv_hardif_neigh_node *neigh);
int (*bat_neigh_cmp)(struct batadv_neigh_node *neigh1, int (*bat_neigh_cmp)(struct batadv_neigh_node *neigh1,
struct batadv_hard_iface *if_outgoing1, struct batadv_hard_iface *if_outgoing1,
struct batadv_neigh_node *neigh2, struct batadv_neigh_node *neigh2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment