Lines Matching full:gw
127 "gw",
442 /* GW mode is not available if the routing algorithm in use does not in batadv_show_gw_mode()
443 * implement the GW API in batadv_show_gw_mode()
445 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_show_gw_mode()
446 !bat_priv->algo_ops->gw.is_eligible) in batadv_show_gw_mode()
449 switch (atomic_read(&bat_priv->gw.mode)) { in batadv_show_gw_mode()
476 /* toggling GW mode is allowed only if the routing algorithm in use in batadv_store_gw_mode()
477 * provides the GW API in batadv_store_gw_mode()
479 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_store_gw_mode()
480 !bat_priv->algo_ops->gw.is_eligible) in batadv_store_gw_mode()
500 "Invalid parameter for 'gw mode' setting received: %s\n", in batadv_store_gw_mode()
505 if (atomic_read(&bat_priv->gw.mode) == gw_mode_tmp) in batadv_store_gw_mode()
508 switch (atomic_read(&bat_priv->gw.mode)) { in batadv_store_gw_mode()
520 batadv_info(net_dev, "Changing gw mode from: %s to: %s\n", in batadv_store_gw_mode()
524 * current GW. It will only instruct the gateway client code to perform in batadv_store_gw_mode()
527 * When gw client mode is being switched off the current GW must be in batadv_store_gw_mode()
537 atomic_set(&bat_priv->gw.mode, (unsigned int)gw_mode_tmp); in batadv_store_gw_mode()
547 /* GW selection class is not available if the routing algorithm in use in batadv_show_gw_sel_class()
548 * does not implement the GW API in batadv_show_gw_sel_class()
550 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_show_gw_sel_class()
551 !bat_priv->algo_ops->gw.is_eligible) in batadv_show_gw_sel_class()
554 if (bat_priv->algo_ops->gw.show_sel_class) in batadv_show_gw_sel_class()
555 return bat_priv->algo_ops->gw.show_sel_class(bat_priv, buff); in batadv_show_gw_sel_class()
557 return sprintf(buff, "%i\n", atomic_read(&bat_priv->gw.sel_class)); in batadv_show_gw_sel_class()
566 /* setting the GW selection class is allowed only if the routing in batadv_store_gw_sel_class()
567 * algorithm in use implements the GW API in batadv_store_gw_sel_class()
569 if (!bat_priv->algo_ops->gw.get_best_gw_node || in batadv_store_gw_sel_class()
570 !bat_priv->algo_ops->gw.is_eligible) in batadv_store_gw_sel_class()
576 if (bat_priv->algo_ops->gw.store_sel_class) in batadv_store_gw_sel_class()
577 return bat_priv->algo_ops->gw.store_sel_class(bat_priv, buff, in batadv_store_gw_sel_class()
582 &bat_priv->gw.sel_class, in batadv_store_gw_sel_class()
592 down = atomic_read(&bat_priv->gw.bandwidth_down); in batadv_show_gw_bwidth()
593 up = atomic_read(&bat_priv->gw.bandwidth_up); in batadv_show_gw_bwidth()