From patchwork Sat Aug 8 03:38:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 40086 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 n783oPPE031173 for ; Sat, 8 Aug 2009 03:50:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933432AbZHHDuX (ORCPT ); Fri, 7 Aug 2009 23:50:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933568AbZHHDuX (ORCPT ); Fri, 7 Aug 2009 23:50:23 -0400 Received: from mail-pz0-f196.google.com ([209.85.222.196]:57264 "EHLO mail-pz0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933417AbZHHDuW (ORCPT ); Fri, 7 Aug 2009 23:50:22 -0400 Received: by mail-pz0-f196.google.com with SMTP id 34so1943403pzk.4 for ; Fri, 07 Aug 2009 20:50:23 -0700 (PDT) Received: by 10.114.39.15 with SMTP id m15mr2606441wam.119.1249703423619; Fri, 07 Aug 2009 20:50:23 -0700 (PDT) Received: from localhost (adsl-71-156-104-53.dsl.pltn13.sbcglobal.net [71.156.104.53]) by mx.google.com with ESMTPS id d20sm2807777waa.47.2009.08.07.20.50.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Aug 2009 20:50:22 -0700 (PDT) From: Javier Cardona To: linux-wireless@vger.kernel.org Cc: Javier Cardona , andrey@cozybit.com, johannes@sipsolutions.net, linville@tuxdriver.com, devel@lists.open80211s.org Subject: [PATCH 6/8] mac80211: Early detection of broken mesh paths when using minstrel. Date: Fri, 7 Aug 2009 20:38:29 -0700 Message-Id: <1249702711-32737-7-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1249702711-32737-6-git-send-email-javier@cozybit.com> References: <> <1249702711-32737-1-git-send-email-javier@cozybit.com> <1249702711-32737-2-git-send-email-javier@cozybit.com> <1249702711-32737-3-git-send-email-javier@cozybit.com> <1249702711-32737-4-git-send-email-javier@cozybit.com> <1249702711-32737-5-git-send-email-javier@cozybit.com> <1249702711-32737-6-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 Signed-off-by: Javier Cardona --- net/mac80211/mesh_hwmp.c | 1 - net/mac80211/rc80211_minstrel.c | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index b4309b2..1cd1e72 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -272,7 +272,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, } last_hop_metric = airtime_link_metric_get(local, sta); - printk("XXX: last_hop_metric = %d\n", last_hop_metric); /* Update and check originator routing info */ fresh_info = true; diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 3ea9740..0071649 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -51,6 +51,7 @@ #include #include #include +#include "mesh.h" #include "rate.h" #include "rc80211_minstrel.h" @@ -178,9 +179,14 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband, if ((i != IEEE80211_TX_MAX_RATES - 1) && (ar[i + 1].idx < 0)) { mi->r[ndx].success += success; - if (si) + if (si) { si->fail_avg = (18050 - mi->r[ndx].probability) / 180; + WARN_ON(si->fail_avg > 100); + if (si->fail_avg == 100 && + ieee80211_vif_is_mesh(&si->sdata->vif)) + mesh_plink_broken(si); + } } }