• Home
  • Raw
  • Download

Lines Matching full:gw

85 	gw_node = rcu_dereference(bat_priv->gw.curr_gw);  in batadv_gw_get_selected_gw_node()
134 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_select()
139 curr_gw_node = rcu_replace_pointer(bat_priv->gw.curr_gw, new_gw_node, in batadv_gw_select()
145 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_select()
152 * Set a flag to remind the GW component to perform a new gateway reselection.
161 atomic_set(&bat_priv->gw.reselect, 1); in batadv_gw_reselect()
168 * This function assumes the caller has checked that the gw state *is actually
176 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT) in batadv_gw_check_client_stop()
188 /* if batman-adv is switching the gw client mode off and a gateway was in batadv_gw_check_client_stop()
208 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT) in batadv_gw_election()
211 if (!bat_priv->algo_ops->gw.get_best_gw_node) in batadv_gw_election()
216 if (!batadv_atomic_dec_not_zero(&bat_priv->gw.reselect) && curr_gw) in batadv_gw_election()
219 /* if gw.reselect is set to 1 it means that a previous call to in batadv_gw_election()
220 * gw.is_eligible() said that we have a new best GW, therefore it can in batadv_gw_election()
223 next_gw = bat_priv->algo_ops->gw.get_best_gw_node(bat_priv); in batadv_gw_election()
301 if (!bat_priv->algo_ops->gw.is_eligible) in batadv_gw_check_election()
312 if (!bat_priv->algo_ops->gw.is_eligible(bat_priv, curr_gw_orig, in batadv_gw_check_election()
330 * (gw.list_lock).
338 lockdep_assert_held(&bat_priv->gw.list_lock); in batadv_gw_node_add()
355 hlist_add_head_rcu(&gw_node->list, &bat_priv->gw.gateway_list); in batadv_gw_node_add()
356 bat_priv->gw.generation++; in batadv_gw_node_add()
359 "Found new gateway %pM -> gw bandwidth: %u.%u/%u.%u MBit\n", in batadv_gw_node_add()
383 hlist_for_each_entry_rcu(gw_node_tmp, &bat_priv->gw.gateway_list, in batadv_gw_node_get()
412 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_update()
416 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_update()
419 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_update()
448 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_update()
452 bat_priv->gw.generation++; in batadv_gw_node_update()
454 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_update()
494 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_free()
496 &bat_priv->gw.gateway_list, list) { in batadv_gw_node_free()
499 bat_priv->gw.generation++; in batadv_gw_node_free()
501 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_node_free()
530 if (!bat_priv->algo_ops->gw.print) { in batadv_gw_client_seq_print_text()
536 bat_priv->algo_ops->gw.print(bat_priv, seq); in batadv_gw_client_seq_print_text()
577 if (!bat_priv->algo_ops->gw.dump) { in batadv_gw_dump()
582 bat_priv->algo_ops->gw.dump(msg, cb, bat_priv); in batadv_gw_dump()
722 * Check if the skb is a DHCP request and if it is sent to the current best GW
723 * server. Due to topology changes it may be the case that the GW server
729 * Return: true if the packet destination is unicast and it is not the best gw,
760 switch (atomic_read(&bat_priv->gw.mode)) { in batadv_gw_out_of_range()
762 /* If we are a GW then we are our best GW. We can artificially in batadv_gw_out_of_range()
776 /* If the dhcp packet has been sent to a different gw, in batadv_gw_out_of_range()
777 * we have to evaluate whether the old gw is still in batadv_gw_out_of_range()