From patchwork Mon Nov 9 23:46:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Paulo X-Patchwork-Id: 58899 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA9Nlbw7015233 for ; Mon, 9 Nov 2009 23:47:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755735AbZKIXra (ORCPT ); Mon, 9 Nov 2009 18:47:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755720AbZKIXra (ORCPT ); Mon, 9 Nov 2009 18:47:30 -0500 Received: from ey-out-2122.google.com ([74.125.78.24]:19838 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755700AbZKIXr3 (ORCPT ); Mon, 9 Nov 2009 18:47:29 -0500 Received: by ey-out-2122.google.com with SMTP id 4so87855eyf.19 for ; Mon, 09 Nov 2009 15:47:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=9kLeFmb6EC4hFqHJQzIjcmptN/7I2dqSp2hMZErGmEA=; b=f/YfrSaSMN1fSgwLt7fsvGt5TrgDqNJzeeimc6CVernBXFGDiDXn85+ahBH9VX+y7n g+JOoWnjHy2UiZpcdPydi0IucEy2yVdRMSY2tUqlkWjr91T3+iWXLWn5Xf9NrqAGm3eA T09DDY8bmN3p5VznDYUQ6aMRwTPVi0GMYyN6I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=vaKeaPftt0+5AaHmLtiv05O0hHUNRoZULNGVGstpca8ZuIv1GnFXnZz4vZtsq/lfac THYhFATHBIMmV+ciA1q+c7QoDTFBeXkrQRTOzt+euKvBUP1DLoiqYN5RSFw4rHx1CQrf SfQ/4vuP692KGAPuBqd+xgAzFn7uq+oAZYtE0= Received: by 10.213.26.199 with SMTP id f7mr4137995ebc.72.1257810454960; Mon, 09 Nov 2009 15:47:34 -0800 (PST) Received: from localhost (bl5-227-167.dsl.telepac.pt [82.154.227.167]) by mx.google.com with ESMTPS id 28sm440999eyg.38.2009.11.09.15.47.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Nov 2009 15:47:34 -0800 (PST) From: Rui Paulo To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Johannes Berg , Rui Paulo , Javier Cardona Subject: [PATCH v2 13/20] mac80211: properly forward the RANN IE Date: Mon, 9 Nov 2009 23:46:51 +0000 Message-Id: <1257810418-30075-14-git-send-email-rpaulo@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1257810418-30075-1-git-send-email-rpaulo@gmail.com> References: <1257810418-30075-1-git-send-email-rpaulo@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index c12cf5a..355099f 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -686,6 +686,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, orig_addr = rann->rann_addr; orig_dsn = rann->rann_seq; hopcount = rann->rann_hopcount; + hopcount++; metric = rann->rann_metric; mhwmp_dbg("received RANN from %pM\n", orig_addr); @@ -706,7 +707,8 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, cpu_to_le32(orig_dsn), 0, NULL, 0, sdata->dev->broadcast, - hopcount, ttl, 0, cpu_to_le32(metric), + hopcount, ttl, 0, + cpu_to_le32(metric + mpath->metric), 0, sdata); mpath->dsn = orig_dsn; }