Lines Matching refs:bat_priv
58 batadv_orig_hash_find(struct batadv_priv *bat_priv, const void *data) in batadv_orig_hash_find() argument
60 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_orig_hash_find()
196 int batadv_originator_init(struct batadv_priv *bat_priv) in batadv_originator_init() argument
198 if (bat_priv->orig_hash) in batadv_originator_init()
201 bat_priv->orig_hash = batadv_hash_new(1024); in batadv_originator_init()
203 if (!bat_priv->orig_hash) in batadv_originator_init()
206 batadv_hash_set_lock_class(bat_priv->orig_hash, in batadv_originator_init()
209 INIT_DELAYED_WORK(&bat_priv->orig_work, batadv_purge_orig); in batadv_originator_init()
211 &bat_priv->orig_work, in batadv_originator_init()
519 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() local
542 if (bat_priv->algo_ops->neigh.hardif_init) in batadv_hardif_neigh_create()
543 bat_priv->algo_ops->neigh.hardif_init(hardif_neigh); in batadv_hardif_neigh_create()
661 batadv_dbg(BATADV_DBG_BATMAN, orig_node->bat_priv, in batadv_neigh_node_create()
707 struct batadv_priv *bat_priv = netdev_priv(net_dev); in batadv_hardif_neigh_seq_print_text() local
717 bat_priv->algo_ops->name); in batadv_hardif_neigh_seq_print_text()
721 if (!bat_priv->algo_ops->neigh.print) { in batadv_hardif_neigh_seq_print_text()
727 bat_priv->algo_ops->neigh.print(bat_priv, seq); in batadv_hardif_neigh_seq_print_text()
746 struct batadv_priv *bat_priv; in batadv_hardif_neigh_dump() local
761 bat_priv = netdev_priv(soft_iface); in batadv_hardif_neigh_dump()
763 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_hardif_neigh_dump()
787 if (!bat_priv->algo_ops->neigh.dump) { in batadv_hardif_neigh_dump()
792 bat_priv->algo_ops->neigh.dump(msg, cb, bat_priv, hardif); in batadv_hardif_neigh_dump()
896 batadv_nc_purge_orig(orig_node->bat_priv, orig_node, NULL); in batadv_orig_node_release()
905 void batadv_originator_free(struct batadv_priv *bat_priv) in batadv_originator_free() argument
907 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_originator_free()
917 cancel_delayed_work_sync(&bat_priv->orig_work); in batadv_originator_free()
919 bat_priv->orig_hash = NULL; in batadv_originator_free()
947 struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv, in batadv_orig_node_new() argument
955 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_orig_node_new()
976 orig_node->bat_priv = bat_priv; in batadv_orig_node_new()
1023 batadv_purge_neigh_ifinfo(struct batadv_priv *bat_priv, in batadv_purge_neigh_ifinfo() argument
1047 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_purge_neigh_ifinfo()
1066 batadv_purge_orig_ifinfo(struct batadv_priv *bat_priv, in batadv_purge_orig_ifinfo() argument
1091 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_purge_orig_ifinfo()
1118 batadv_purge_orig_neighbors(struct batadv_priv *bat_priv, in batadv_purge_orig_neighbors() argument
1142 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_purge_orig_neighbors()
1147 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_purge_orig_neighbors()
1160 batadv_purge_neigh_ifinfo(bat_priv, neigh_node); in batadv_purge_orig_neighbors()
1177 batadv_find_best_neighbor(struct batadv_priv *bat_priv, in batadv_find_best_neighbor() argument
1182 struct batadv_algo_ops *bao = bat_priv->algo_ops; in batadv_find_best_neighbor()
1213 static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, in batadv_purge_orig_node() argument
1222 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_purge_orig_node()
1228 changed_ifinfo = batadv_purge_orig_ifinfo(bat_priv, orig_node); in batadv_purge_orig_node()
1229 changed_neigh = batadv_purge_orig_neighbors(bat_priv, orig_node); in batadv_purge_orig_node()
1235 best_neigh_node = batadv_find_best_neighbor(bat_priv, orig_node, in batadv_purge_orig_node()
1237 batadv_update_route(bat_priv, orig_node, BATADV_IF_DEFAULT, in batadv_purge_orig_node()
1248 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_purge_orig_node()
1254 best_neigh_node = batadv_find_best_neighbor(bat_priv, in batadv_purge_orig_node()
1257 batadv_update_route(bat_priv, orig_node, hard_iface, in batadv_purge_orig_node()
1273 void batadv_purge_orig_ref(struct batadv_priv *bat_priv) in batadv_purge_orig_ref() argument
1275 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_purge_orig_ref()
1293 if (batadv_purge_orig_node(bat_priv, orig_node)) { in batadv_purge_orig_ref()
1294 batadv_gw_node_delete(bat_priv, orig_node); in batadv_purge_orig_ref()
1296 batadv_tt_global_del_orig(orig_node->bat_priv, in batadv_purge_orig_ref()
1309 batadv_gw_election(bat_priv); in batadv_purge_orig_ref()
1315 struct batadv_priv *bat_priv; in batadv_purge_orig() local
1318 bat_priv = container_of(delayed_work, struct batadv_priv, orig_work); in batadv_purge_orig()
1319 batadv_purge_orig_ref(bat_priv); in batadv_purge_orig()
1321 &bat_priv->orig_work, in batadv_purge_orig()
1337 struct batadv_priv *bat_priv = netdev_priv(net_dev); in batadv_orig_seq_print_text() local
1347 bat_priv->algo_ops->name); in batadv_orig_seq_print_text()
1351 if (!bat_priv->algo_ops->orig.print) { in batadv_orig_seq_print_text()
1357 bat_priv->algo_ops->orig.print(bat_priv, seq, BATADV_IF_DEFAULT); in batadv_orig_seq_print_text()
1374 struct batadv_priv *bat_priv; in batadv_orig_hardif_seq_print_text() local
1383 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_orig_hardif_seq_print_text()
1384 if (!bat_priv->algo_ops->orig.print) { in batadv_orig_hardif_seq_print_text()
1398 hard_iface->soft_iface->name, bat_priv->algo_ops->name); in batadv_orig_hardif_seq_print_text()
1400 bat_priv->algo_ops->orig.print(bat_priv, seq, hard_iface); in batadv_orig_hardif_seq_print_text()
1423 struct batadv_priv *bat_priv; in batadv_orig_dump() local
1438 bat_priv = netdev_priv(soft_iface); in batadv_orig_dump()
1440 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_orig_dump()
1464 if (!bat_priv->algo_ops->orig.dump) { in batadv_orig_dump()
1469 bat_priv->algo_ops->orig.dump(msg, cb, bat_priv, hardif); in batadv_orig_dump()