Lines Matching full:gw
461 /* GW mode is not available if the routing algorithm in use does not in batadv_show_gw_mode()
462 * implement the GW API in batadv_show_gw_mode()
464 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_show_gw_mode()
465 !bat_priv->algo_ops->gw.is_eligible) in batadv_show_gw_mode()
468 switch (atomic_read(&bat_priv->gw.mode)) { in batadv_show_gw_mode()
497 /* toggling GW mode is allowed only if the routing algorithm in use in batadv_store_gw_mode()
498 * provides the GW API in batadv_store_gw_mode()
500 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_store_gw_mode()
501 !bat_priv->algo_ops->gw.is_eligible) in batadv_store_gw_mode()
521 "Invalid parameter for 'gw mode' setting received: %s\n", in batadv_store_gw_mode()
526 if (atomic_read(&bat_priv->gw.mode) == gw_mode_tmp) in batadv_store_gw_mode()
529 switch (atomic_read(&bat_priv->gw.mode)) { in batadv_store_gw_mode()
541 batadv_info(net_dev, "Changing gw mode from: %s to: %s\n", in batadv_store_gw_mode()
545 * current GW. It will only instruct the gateway client code to perform in batadv_store_gw_mode()
548 * When gw client mode is being switched off the current GW must be in batadv_store_gw_mode()
558 atomic_set(&bat_priv->gw.mode, (unsigned int)gw_mode_tmp); in batadv_store_gw_mode()
573 /* GW selection class is not available if the routing algorithm in use in batadv_show_gw_sel_class()
574 * does not implement the GW API in batadv_show_gw_sel_class()
576 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_show_gw_sel_class()
577 !bat_priv->algo_ops->gw.is_eligible) in batadv_show_gw_sel_class()
580 if (bat_priv->algo_ops->gw.show_sel_class) in batadv_show_gw_sel_class()
581 return bat_priv->algo_ops->gw.show_sel_class(bat_priv, buff); in batadv_show_gw_sel_class()
583 return sprintf(buff, "%i\n", atomic_read(&bat_priv->gw.sel_class)); in batadv_show_gw_sel_class()
595 /* setting the GW selection class is allowed only if the routing in batadv_store_gw_sel_class()
596 * algorithm in use implements the GW API in batadv_store_gw_sel_class()
598 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_store_gw_sel_class()
599 !bat_priv->algo_ops->gw.is_eligible) in batadv_store_gw_sel_class()
605 if (bat_priv->algo_ops->gw.store_sel_class) in batadv_store_gw_sel_class()
606 return bat_priv->algo_ops->gw.store_sel_class(bat_priv, buff, in batadv_store_gw_sel_class()
611 &bat_priv->gw.sel_class, in batadv_store_gw_sel_class()
627 down = atomic_read(&bat_priv->gw.bandwidth_down); in batadv_show_gw_bwidth()
628 up = atomic_read(&bat_priv->gw.bandwidth_up); in batadv_show_gw_bwidth()