Skip to contentSkip to conversation

batman-adv: only store changed gw_bandwidth values

PATCH Applied Marek Lindner 1 participant 2 messages May 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batman-adv: only store changed gw_bandwidth values

---
 gateway_common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
gateway_common.c +3 -0
index ca57ac7..6e3b052 100644
@@ -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",
Signature · 1 line
1.7.9.1
author Applied
#1 lore raw
Quoted 4 lines · On Friday, May 11, 2012 16:10:50 Marek Lindner wrote:
---
 gateway_common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied in revision cbe9711.

Regards,
Marek