Skip to content

Commit

Permalink
batman-adv: only store changed gw_bandwidth values
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed Jun 18, 2012
1 parent 75c5a2e commit dafe94b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/batman-adv/gateway_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit dafe94b

Please sign in to comment.