From patchwork Thu Dec 10 02:43:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 66168 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 nBA2i93Y024234 for ; Thu, 10 Dec 2009 02:44:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758577AbZLJCns (ORCPT ); Wed, 9 Dec 2009 21:43:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758564AbZLJCns (ORCPT ); Wed, 9 Dec 2009 21:43:48 -0500 Received: from mail-gx0-f212.google.com ([209.85.217.212]:36243 "EHLO mail-gx0-f212.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754210AbZLJCnr (ORCPT ); Wed, 9 Dec 2009 21:43:47 -0500 Received: by gxk4 with SMTP id 4so11880073gxk.8 for ; Wed, 09 Dec 2009 18:43:53 -0800 (PST) Received: by 10.101.11.5 with SMTP id o5mr1003102ani.149.1260413033593; Wed, 09 Dec 2009 18:43:53 -0800 (PST) Received: from localhost.localdomain (adsl-71-156-104-53.dsl.pltn13.sbcglobal.net [71.156.104.53]) by mx.google.com with ESMTPS id 13sm205821gxk.1.2009.12.09.18.43.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Dec 2009 18:43:52 -0800 (PST) From: Javier Cardona To: linux-wireless@vger.kernel.org Cc: Javier Cardona , Andrey Yurovsky , stable@kernel.org, linville@tuxdriver.com, johannes@sipsolutions.net Subject: [PATCH 2/2] mac80211: Revert 'Use correct sign for mesh active path refresh' Date: Wed, 9 Dec 2009 18:43:01 -0800 Message-Id: <1260412981-2982-2-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1260412981-2982-1-git-send-email-javier@cozybit.com> References: <1260412981-2982-1-git-send-email-javier@cozybit.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.h b/net/mac80211/mesh.h index 31e1025..85562c5 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -188,8 +188,9 @@ struct mesh_rmc { */ #define MESH_PREQ_MIN_INT 10 #define MESH_DIAM_TRAVERSAL_TIME 50 -/* Paths will be refreshed if they are closer than PATH_REFRESH_TIME to their - * expiration +/* A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds before + * timing out. This way it will remain ACTIVE and no data frames will be + * unnecesarily held in the pending queue. */ #define MESH_PATH_REFRESH_TIME 1000 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 9aecf02..c43fa91 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -936,7 +936,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb, } if (mpath->flags & MESH_PATH_ACTIVE) { - if (time_after(jiffies, mpath->exp_time + + if (time_after(jiffies, mpath->exp_time - msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && !memcmp(sdata->dev->dev_addr, hdr->addr4, ETH_ALEN)