From patchwork Fri May 11 08:10:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1847 Return-Path: Received: from nm3-vm0.bullet.mail.ukl.yahoo.com (nm3-vm0.bullet.mail.ukl.yahoo.com [217.146.183.228]) by open-mesh.org (Postfix) with SMTP id A6BE96008AB for ; Fri, 11 May 2012 10:10:58 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.183] by nm3.bullet.mail.ukl.yahoo.com with NNFMP; 11 May 2012 08:10:58 -0000 Received: from [77.238.184.57] by tm14.bullet.mail.ukl.yahoo.com with NNFMP; 11 May 2012 08:10:58 -0000 Received: from [127.0.0.1] by smtp126.mail.ukl.yahoo.com with NNFMP; 11 May 2012 08:10:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1336723858; bh=CQgv7iIxl73zVnO4UXLqfBTxgN4Fe9bi3GDGsuJkbog=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer; b=dKNWzlf4rxTpWdeGiK2zMhyJock6oMnBj13N8FoO3/z0Ap23sdlNGf24xgt6B6gicouKDqKTleYUYpGS+ttMy7uz2yIOcAELAphOwv+C75i533lZc344kZdDIPb4c/D5eAAPD5qkAiucImt2hqqdyQVOnT2WtF0omv4WLm30uVo= X-Yahoo-Newman-Id: 200096.88151.bm@smtp126.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sQgPph0VM1nETyhUNk9wzaQxyWCFBUa_9llOn5DFugZMGuS ZLxVPVa3ZzJPcWgHLFj9dnp8ExFF.21c4TfRFZlSdzAPpJprrEOTZPPIZglk KcZ9HREbULX_vccXzC03ZwL9mvdSBxLGlXCM8Oo3G9eM6JQfmyVZ_cjWNkIP TS_qJ1Rnx8Oj1wRkmss3nhvmByamanYQfkd_yWgRAY7psk9XBqRDjp9PP7l. pk.pad9zSv7jbUs1bfo8W_7RfhcJZoNwHqCzUvTUShqwDgTp_1cg.VyPi36R 2EfvRllRMjRQ8i1CDbCNSa7fv5W6bzfuh.LKoEpLZ8vnKzRGAh38Jcz6aDE8 P3TmNo_Vy8FRPUophWEq4aw7HivlHun_Smw6UBmO63rV3l471660043olVWM 5jQ-- X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- Received: from localhost (lindner_marek@210.177.7.38 with plain) by smtp126.mail.ukl.yahoo.com with SMTP; 11 May 2012 08:10:57 +0000 GMT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 11 May 2012 16:10:50 +0800 Message-Id: <1336723850-487-1-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.9.1 Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: only store changed gw_bandwidth values X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 08:10:59 -0000 Signed-off-by: Marek Lindner --- gateway_common.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/gateway_common.c b/gateway_common.c index ca57ac7..6e3b052 100644 --- a/gateway_common.c +++ b/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",