Lines Matching refs:gw
85 gw_node = rcu_dereference(bat_priv->gw.curr_gw);
133 spin_lock_bh(&bat_priv->gw.list_lock);
138 curr_gw_node = rcu_replace_pointer(bat_priv->gw.curr_gw, new_gw_node,
143 spin_unlock_bh(&bat_priv->gw.list_lock);
159 atomic_set(&bat_priv->gw.reselect, 1);
166 * This function assumes the caller has checked that the gw state *is actually
174 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT)
186 /* if batman-adv is switching the gw client mode off and a gateway was
206 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT)
209 if (!bat_priv->algo_ops->gw.get_best_gw_node)
214 if (!batadv_atomic_dec_not_zero(&bat_priv->gw.reselect) && curr_gw)
217 /* if gw.reselect is set to 1 it means that a previous call to
218 * gw.is_eligible() said that we have a new best GW, therefore it can
221 next_gw = bat_priv->algo_ops->gw.get_best_gw_node(bat_priv);
295 if (!bat_priv->algo_ops->gw.is_eligible)
306 if (!bat_priv->algo_ops->gw.is_eligible(bat_priv, curr_gw_orig,
323 * (gw.list_lock).
331 lockdep_assert_held(&bat_priv->gw.list_lock);
348 hlist_add_head_rcu(&gw_node->list, &bat_priv->gw.gateway_list);
349 bat_priv->gw.generation++;
352 "Found new gateway %pM -> gw bandwidth: %u.%u/%u.%u MBit\n",
376 hlist_for_each_entry_rcu(gw_node_tmp, &bat_priv->gw.gateway_list,
405 spin_lock_bh(&bat_priv->gw.list_lock);
409 spin_unlock_bh(&bat_priv->gw.list_lock);
412 spin_unlock_bh(&bat_priv->gw.list_lock);
441 spin_lock_bh(&bat_priv->gw.list_lock);
445 bat_priv->gw.generation++;
447 spin_unlock_bh(&bat_priv->gw.list_lock);
485 spin_lock_bh(&bat_priv->gw.list_lock);
487 &bat_priv->gw.gateway_list, list) {
490 bat_priv->gw.generation++;
492 spin_unlock_bh(&bat_priv->gw.list_lock);
530 if (!bat_priv->algo_ops->gw.dump) {
535 bat_priv->algo_ops->gw.dump(msg, cb, bat_priv);
680 * Return: true if the packet destination is unicast and it is not the best gw,
711 switch (atomic_read(&bat_priv->gw.mode)) {
727 /* If the dhcp packet has been sent to a different gw,
728 * we have to evaluate whether the old gw is still