Lines Matching refs:bat_priv

134 void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv)  in batadv_gw_tvlv_container_update()  argument
140 gw_mode = atomic_read(&bat_priv->gw.mode); in batadv_gw_tvlv_container_update()
145 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_GW, 1); in batadv_gw_tvlv_container_update()
148 down = atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_tvlv_container_update()
149 up = atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_tvlv_container_update()
152 batadv_tvlv_container_register(bat_priv, BATADV_TVLV_GW, 1, in batadv_gw_tvlv_container_update()
170 struct batadv_priv *bat_priv = netdev_priv(net_dev); in batadv_gw_bandwidth_set() local
177 down_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_bandwidth_set()
178 up_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_bandwidth_set()
196 batadv_gw_reselect(bat_priv); in batadv_gw_bandwidth_set()
202 atomic_set(&bat_priv->gw.bandwidth_down, down_new); in batadv_gw_bandwidth_set()
203 atomic_set(&bat_priv->gw.bandwidth_up, up_new); in batadv_gw_bandwidth_set()
204 batadv_gw_tvlv_container_update(bat_priv); in batadv_gw_bandwidth_set()
217 static void batadv_gw_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, in batadv_gw_tvlv_ogm_handler_v1() argument
242 batadv_gw_node_update(bat_priv, orig, &gateway); in batadv_gw_tvlv_ogm_handler_v1()
246 atomic_read(&bat_priv->gw.mode) == BATADV_GW_MODE_CLIENT) in batadv_gw_tvlv_ogm_handler_v1()
247 batadv_gw_check_election(bat_priv, orig); in batadv_gw_tvlv_ogm_handler_v1()
254 void batadv_gw_init(struct batadv_priv *bat_priv) in batadv_gw_init() argument
256 if (bat_priv->algo_ops->gw.init_sel_class) in batadv_gw_init()
257 bat_priv->algo_ops->gw.init_sel_class(bat_priv); in batadv_gw_init()
259 atomic_set(&bat_priv->gw.sel_class, 1); in batadv_gw_init()
261 batadv_tvlv_handler_register(bat_priv, batadv_gw_tvlv_ogm_handler_v1, in batadv_gw_init()
270 void batadv_gw_free(struct batadv_priv *bat_priv) in batadv_gw_free() argument
272 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_GW, 1); in batadv_gw_free()
273 batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_GW, 1); in batadv_gw_free()