Lines Matching refs:bat_priv
47 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_iface_activate() local
50 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_v_iface_activate()
101 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_iface_update_mac() local
104 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_v_iface_update_mac()
179 static void batadv_v_neigh_print(struct batadv_priv *bat_priv, in batadv_v_neigh_print() argument
267 struct batadv_priv *bat_priv, in batadv_v_neigh_dump_hardif() argument
299 struct batadv_priv *bat_priv, in batadv_v_neigh_dump() argument
313 bat_priv, single_hardif, in batadv_v_neigh_dump()
319 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_v_neigh_dump()
327 bat_priv, hard_iface, in batadv_v_neigh_dump()
347 static void batadv_v_orig_print(struct batadv_priv *bat_priv, in batadv_v_orig_print() argument
352 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_v_orig_print()
424 struct batadv_priv *bat_priv, in batadv_v_orig_dump_subentry() argument
491 struct batadv_priv *bat_priv, in batadv_v_orig_dump_entry() argument
510 if (batadv_v_orig_dump_subentry(msg, portid, seq, bat_priv, in batadv_v_orig_dump_entry()
543 struct batadv_priv *bat_priv, in batadv_v_orig_dump_bucket() argument
555 if (batadv_v_orig_dump_entry(msg, portid, seq, bat_priv, in batadv_v_orig_dump_bucket()
578 struct batadv_priv *bat_priv, in batadv_v_orig_dump() argument
581 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_v_orig_dump()
593 bat_priv, if_outgoing, head, &idx, in batadv_v_orig_dump()
663 static void batadv_v_init_sel_class(struct batadv_priv *bat_priv) in batadv_v_init_sel_class() argument
666 atomic_set(&bat_priv->gw.sel_class, 50); in batadv_v_init_sel_class()
669 static ssize_t batadv_v_store_sel_class(struct batadv_priv *bat_priv, in batadv_v_store_sel_class() argument
674 if (!batadv_parse_throughput(bat_priv->soft_iface, buff, in batadv_v_store_sel_class()
679 old_class = atomic_read(&bat_priv->gw.sel_class); in batadv_v_store_sel_class()
680 atomic_set(&bat_priv->gw.sel_class, class); in batadv_v_store_sel_class()
683 batadv_gw_reselect(bat_priv); in batadv_v_store_sel_class()
688 static ssize_t batadv_v_show_sel_class(struct batadv_priv *bat_priv, char *buff) in batadv_v_show_sel_class() argument
690 u32 class = atomic_read(&bat_priv->gw.sel_class); in batadv_v_show_sel_class()
745 batadv_v_gw_get_best_gw_node(struct batadv_priv *bat_priv) in batadv_v_gw_get_best_gw_node() argument
751 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_get_best_gw_node()
784 static bool batadv_v_gw_is_eligible(struct batadv_priv *bat_priv, in batadv_v_gw_is_eligible() argument
792 threshold = atomic_read(&bat_priv->gw.sel_class); in batadv_v_gw_is_eligible()
794 curr_gw = batadv_gw_node_get(bat_priv, curr_gw_orig); in batadv_v_gw_is_eligible()
805 orig_gw = batadv_gw_node_get(bat_priv, orig_node); in batadv_v_gw_is_eligible()
818 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_v_gw_is_eligible()
834 static int batadv_v_gw_write_buffer_text(struct batadv_priv *bat_priv, in batadv_v_gw_write_buffer_text() argument
851 curr_gw = batadv_gw_get_selected_gw_node(bat_priv); in batadv_v_gw_write_buffer_text()
880 static void batadv_v_gw_print(struct batadv_priv *bat_priv, in batadv_v_gw_print() argument
890 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_print()
892 if (batadv_v_gw_write_buffer_text(bat_priv, seq, gw_node) < 0) in batadv_v_gw_print()
916 struct batadv_priv *bat_priv, in batadv_v_gw_dump_entry() argument
933 curr_gw = batadv_gw_get_selected_gw_node(bat_priv); in batadv_v_gw_dump_entry()
1008 struct batadv_priv *bat_priv) in batadv_v_gw_dump() argument
1015 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_v_gw_dump()
1016 cb->seq = bat_priv->gw.generation << 1 | 1; in batadv_v_gw_dump()
1018 hlist_for_each_entry(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_dump()
1022 if (batadv_v_gw_dump_entry(msg, portid, cb, bat_priv, in batadv_v_gw_dump()
1031 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_v_gw_dump()
1100 int batadv_v_mesh_init(struct batadv_priv *bat_priv) in batadv_v_mesh_init() argument
1104 ret = batadv_v_ogm_init(bat_priv); in batadv_v_mesh_init()
1115 void batadv_v_mesh_free(struct batadv_priv *bat_priv) in batadv_v_mesh_free() argument
1117 batadv_v_ogm_free(bat_priv); in batadv_v_mesh_free()