Home
last modified time | relevance | path

Searched refs:gw_node (Results 1 – 4 of 4) sorted by relevance

/linux-5.19.10/net/batman-adv/
Dgateway_client.c65 struct batadv_gw_node *gw_node; in batadv_gw_node_release() local
67 gw_node = container_of(ref, struct batadv_gw_node, refcount); in batadv_gw_node_release()
69 batadv_orig_node_put(gw_node->orig_node); in batadv_gw_node_release()
70 kfree_rcu(gw_node, rcu); in batadv_gw_node_release()
82 struct batadv_gw_node *gw_node; in batadv_gw_get_selected_gw_node() local
85 gw_node = rcu_dereference(bat_priv->gw.curr_gw); in batadv_gw_get_selected_gw_node()
86 if (!gw_node) in batadv_gw_get_selected_gw_node()
89 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_gw_get_selected_gw_node()
90 gw_node = NULL; in batadv_gw_get_selected_gw_node()
94 return gw_node; in batadv_gw_get_selected_gw_node()
[all …]
Dbat_v.c543 static int batadv_v_gw_throughput_get(struct batadv_gw_node *gw_node, u32 *bw) in batadv_v_gw_throughput_get() argument
550 orig_node = gw_node->orig_node; in batadv_v_gw_throughput_get()
565 *bw = min_t(u32, *bw, gw_node->bandwidth_down); in batadv_v_gw_throughput_get()
584 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_v_gw_get_best_gw_node() local
588 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_get_best_gw_node()
589 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_v_gw_get_best_gw_node()
592 if (batadv_v_gw_throughput_get(gw_node, &bw) < 0) in batadv_v_gw_get_best_gw_node()
600 curr_gw = gw_node; in batadv_v_gw_get_best_gw_node()
605 batadv_gw_node_put(gw_node); in batadv_v_gw_get_best_gw_node()
679 struct batadv_gw_node *gw_node) in batadv_v_gw_dump_entry() argument
[all …]
Dgateway_client.h47 static inline void batadv_gw_node_put(struct batadv_gw_node *gw_node) in batadv_gw_node_put() argument
49 if (!gw_node) in batadv_gw_node_put()
52 kref_put(&gw_node->refcount, batadv_gw_node_release); in batadv_gw_node_put()
Dbat_iv_ogm.c2253 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_iv_gw_get_best_gw_node() local
2261 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_iv_gw_get_best_gw_node()
2262 orig_node = gw_node->orig_node; in batadv_iv_gw_get_best_gw_node()
2272 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_iv_gw_get_best_gw_node()
2280 tmp_gw_factor *= gw_node->bandwidth_down; in batadv_iv_gw_get_best_gw_node()
2288 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node()
2302 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node()
2314 batadv_gw_node_put(gw_node); in batadv_iv_gw_get_best_gw_node()
2403 struct batadv_gw_node *gw_node) in batadv_iv_gw_dump_entry() argument
2411 router = batadv_orig_router_get(gw_node->orig_node, BATADV_IF_DEFAULT); in batadv_iv_gw_dump_entry()
[all …]