From patchwork Mon Aug 29 20:23:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 1110492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7TKNLak026114 for ; Mon, 29 Aug 2011 20:23:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755076Ab1H2UX0 (ORCPT ); Mon, 29 Aug 2011 16:23:26 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:52134 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044Ab1H2UXY (ORCPT ); Mon, 29 Aug 2011 16:23:24 -0400 Received: by gya6 with SMTP id 6so5097515gya.19 for ; Mon, 29 Aug 2011 13:23:23 -0700 (PDT) Received: by 10.142.169.20 with SMTP id r20mr2726088wfe.384.1314649403359; Mon, 29 Aug 2011 13:23:23 -0700 (PDT) Received: from localhost.localdomain (99-8-184-170.lightspeed.snfcca.sbcglobal.net [99.8.184.170]) by mx.google.com with ESMTPS id g14sm5303323wfh.22.2011.08.29.13.23.22 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 13:23:22 -0700 (PDT) From: Javier Cardona To: "John W. Linville" Cc: Javier Cardona , Thomas Pedersen , devel@lists.open80211s.org, Johannes Berg , linux-wireless@vger.kernel.org, jlopex@gmail.com Subject: [PATCH v3 4/7] mac80211: Remove redundant mesh path expiration checks Date: Mon, 29 Aug 2011 13:23:06 -0700 Message-Id: <1314649389-7115-5-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1314649389-7115-1-git-send-email-javier@cozybit.com> References: <1314649389-7115-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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 20:23:43 +0000 (UTC) Signed-off-by: Javier Cardona --- net/mac80211/mesh_pathtbl.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index b895a7c..598249e 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -359,8 +359,7 @@ struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata) memcmp(dst, mpath->dst, ETH_ALEN) == 0) { if (MPATH_EXPIRED(mpath)) { spin_lock_bh(&mpath->state_lock); - if (MPATH_EXPIRED(mpath)) - mpath->flags &= ~MESH_PATH_ACTIVE; + mpath->flags &= ~MESH_PATH_ACTIVE; spin_unlock_bh(&mpath->state_lock); } return mpath; @@ -386,8 +385,7 @@ struct mesh_path *mpp_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata) memcmp(dst, mpath->dst, ETH_ALEN) == 0) { if (MPATH_EXPIRED(mpath)) { spin_lock_bh(&mpath->state_lock); - if (MPATH_EXPIRED(mpath)) - mpath->flags &= ~MESH_PATH_ACTIVE; + mpath->flags &= ~MESH_PATH_ACTIVE; spin_unlock_bh(&mpath->state_lock); } return mpath; @@ -420,8 +418,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data if (j++ == idx) { if (MPATH_EXPIRED(node->mpath)) { spin_lock_bh(&node->mpath->state_lock); - if (MPATH_EXPIRED(node->mpath)) - node->mpath->flags &= ~MESH_PATH_ACTIVE; + node->mpath->flags &= ~MESH_PATH_ACTIVE; spin_unlock_bh(&node->mpath->state_lock); } return node->mpath;