|
@@ -668,6 +668,16 @@ err_ifinfo1:
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * batadv_v_init_sel_class - initialize GW selection class
|
|
|
+ * @bat_priv: the bat priv with all the soft interface information
|
|
|
+ */
|
|
|
+static void batadv_v_init_sel_class(struct batadv_priv *bat_priv)
|
|
|
+{
|
|
|
+ /* set default throughput difference threshold to 5Mbps */
|
|
|
+ atomic_set(&bat_priv->gw.sel_class, 50);
|
|
|
+}
|
|
|
+
|
|
|
static ssize_t batadv_v_store_sel_class(struct batadv_priv *bat_priv,
|
|
|
char *buff, size_t count)
|
|
|
{
|
|
@@ -1052,6 +1062,7 @@ static struct batadv_algo_ops batadv_batman_v __read_mostly = {
|
|
|
.dump = batadv_v_orig_dump,
|
|
|
},
|
|
|
.gw = {
|
|
|
+ .init_sel_class = batadv_v_init_sel_class,
|
|
|
.store_sel_class = batadv_v_store_sel_class,
|
|
|
.show_sel_class = batadv_v_show_sel_class,
|
|
|
.get_best_gw_node = batadv_v_gw_get_best_gw_node,
|
|
@@ -1092,9 +1103,6 @@ int batadv_v_mesh_init(struct batadv_priv *bat_priv)
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- /* set default throughput difference threshold to 5Mbps */
|
|
|
- atomic_set(&bat_priv->gw.sel_class, 50);
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|