summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_common.c
diff options
context:
space:
mode:
authorAntonio Quartulli <a@unstable.cc>2016-05-06 02:46:38 +0800
committerSimon Wunderlich <sw@simonwunderlich.de>2016-06-30 10:29:43 +0200
commit3a24a63e74af1bffc7aeb5d83adcd63b37e38425 (patch)
treeaaac1fe9753860837d89608acc158a96dd16eb8b /net/batman-adv/gateway_common.c
parentc149ca72e58ac511ad8bf71df833efa9764115a4 (diff)
downloadblackbird-op-linux-3a24a63e74af1bffc7aeb5d83adcd63b37e38425.tar.gz
blackbird-op-linux-3a24a63e74af1bffc7aeb5d83adcd63b37e38425.zip
batman-adv: move GW mode and selection class to private data structure
To reduce the field pollution in our main batadv_priv data structure we've already created some substructures so that we could group fields in a convenient manner. However gw_mode and gw_sel_class are still part of the main object. More both fields to the GW private substructure. Signed-off-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/gateway_common.c')
-rw-r--r--net/batman-adv/gateway_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index 4423047889e1..3c269457776e 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -144,7 +144,7 @@ void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv)
u32 down, up;
char gw_mode;
- gw_mode = atomic_read(&bat_priv->gw_mode);
+ gw_mode = atomic_read(&bat_priv->gw.mode);
switch (gw_mode) {
case BATADV_GW_MODE_OFF:
@@ -241,8 +241,8 @@ static void batadv_gw_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv,
/* restart gateway selection if fast or late switching was enabled */
if ((gateway.bandwidth_down != 0) &&
- (atomic_read(&bat_priv->gw_mode) == BATADV_GW_MODE_CLIENT) &&
- (atomic_read(&bat_priv->gw_sel_class) > 2))
+ (atomic_read(&bat_priv->gw.mode) == BATADV_GW_MODE_CLIENT) &&
+ (atomic_read(&bat_priv->gw.sel_class) > 2))
batadv_gw_check_election(bat_priv, orig);
}
OpenPOWER on IntegriCloud