Lines Matching refs:gw

85 	gw_node = rcu_dereference(bat_priv->gw.curr_gw);
134 spin_lock_bh(&bat_priv->gw.list_lock);
139 curr_gw_node = rcu_replace_pointer(bat_priv->gw.curr_gw, new_gw_node,
145 spin_unlock_bh(&bat_priv->gw.list_lock);
161 atomic_set(&bat_priv->gw.reselect, 1);
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)
188 /* if batman-adv is switching the gw client mode off and a gateway was
208 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT)
211 if (!bat_priv->algo_ops->gw.get_best_gw_node)
216 if (!batadv_atomic_dec_not_zero(&bat_priv->gw.reselect) && curr_gw)
219 /* if gw.reselect is set to 1 it means that a previous call to
220 * gw.is_eligible() said that we have a new best GW, therefore it can
223 next_gw = bat_priv->algo_ops->gw.get_best_gw_node(bat_priv);
301 if (!bat_priv->algo_ops->gw.is_eligible)
312 if (!bat_priv->algo_ops->gw.is_eligible(bat_priv, curr_gw_orig,
330 * (gw.list_lock).
338 lockdep_assert_held(&bat_priv->gw.list_lock);
355 hlist_add_head_rcu(&gw_node->list, &bat_priv->gw.gateway_list);
356 bat_priv->gw.generation++;
359 "Found new gateway %pM -> gw bandwidth: %u.%u/%u.%u MBit\n",
383 hlist_for_each_entry_rcu(gw_node_tmp, &bat_priv->gw.gateway_list,
412 spin_lock_bh(&bat_priv->gw.list_lock);
416 spin_unlock_bh(&bat_priv->gw.list_lock);
419 spin_unlock_bh(&bat_priv->gw.list_lock);
448 spin_lock_bh(&bat_priv->gw.list_lock);
452 bat_priv->gw.generation++;
454 spin_unlock_bh(&bat_priv->gw.list_lock);
494 spin_lock_bh(&bat_priv->gw.list_lock);
496 &bat_priv->gw.gateway_list, list) {
499 bat_priv->gw.generation++;
501 spin_unlock_bh(&bat_priv->gw.list_lock);
530 if (!bat_priv->algo_ops->gw.print) {
536 bat_priv->algo_ops->gw.print(bat_priv, seq);
577 if (!bat_priv->algo_ops->gw.dump) {
582 bat_priv->algo_ops->gw.dump(msg, cb, bat_priv);
729 * Return: true if the packet destination is unicast and it is not the best gw,
760 switch (atomic_read(&bat_priv->gw.mode)) {
776 /* If the dhcp packet has been sent to a different gw,
777 * we have to evaluate whether the old gw is still