summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2012-05-11 12:10:50 +0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 20:01:07 +0400
commitdafe94b278e052c3901b137fe6f666f8f92d839a (patch)
tree261fd765f25e54dcd73198df4b610d96aec62f41
parent75c5a2e788ab02f67931442e8dcbc854ae7252d1 (diff)
downloadlinux-dafe94b278e052c3901b137fe6f666f8f92d839a.tar.xz
batman-adv: only store changed gw_bandwidth values
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
-rw-r--r--net/batman-adv/gateway_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index ca57ac7d73b2..6e3b052b935d 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -162,6 +162,9 @@ ssize_t gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count)
**/
gw_bandwidth_to_kbit((uint8_t)gw_bandwidth_tmp, &down, &up);
+ if (atomic_read(&bat_priv->gw_bandwidth) == gw_bandwidth_tmp)
+ return count;
+
gw_deselect(bat_priv);
bat_info(net_dev,
"Changing gateway bandwidth from: '%i' to: '%ld' (propagating: %d%s/%d%s)\n",