From patchwork Sat Jan 28 00:01:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 9542891 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C489860415 for ; Sat, 28 Jan 2017 00:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B93B927F93 for ; Sat, 28 Jan 2017 00:02:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACAAB281C3; Sat, 28 Jan 2017 00:02:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21A4227F93 for ; Sat, 28 Jan 2017 00:02:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751233AbdA1ACc (ORCPT ); Fri, 27 Jan 2017 19:02:32 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:9899 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbdA1ACZ (ORCPT ); Fri, 27 Jan 2017 19:02:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1485561745; x=1517097745; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=PMDAOzmcTvWe/iDgxA5fZvnXi+0xEaSaLTKz+6vE/D4=; b=qpFT7u8zL3dK6TbdEVfELnTXZ2lFpCAyXaGuXR2isow6kGxJjVYLXNGH zt3y3C7HDWVWbd/CegStUxRgnV/IDSaQz/y3lxB1bteICOsys3h5NvEZJ S+nMhk7+m+3Fu2IKR85bBP7Zuq9W+mi5eu5NVioB8Vtd5MzU9y6L+42wo Q=; X-IronPort-AV: E=Sophos;i="5.33,298,1477983600"; d="scan'208";a="258764316" Received: from ironmsg03-lv.qualcomm.com ([10.47.202.181]) by wolverine01.qualcomm.com with ESMTP; 27 Jan 2017 16:02:01 -0800 X-IronPort-AV: E=McAfee;i="5700,7163,8421"; a="28743810" Received: from nalasexr01h.na.qualcomm.com ([10.49.56.54]) by ironmsg03-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Jan 2017 16:02:01 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by NALASEXR01H.na.qualcomm.com (10.49.56.54) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 27 Jan 2017 16:01:59 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 27 Jan 2017 16:01:58 -0800 From: Rajkumar Manoharan To: CC: , , Rajkumar Manoharan Subject: [PATCH 3/3] mac80211: clear failure average upon mesh path deactivation Date: Fri, 27 Jan 2017 16:01:48 -0800 Message-ID: <1485561708-31559-3-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485561708-31559-1-git-send-email-rmanohar@qca.qualcomm.com> References: <1485561708-31559-1-git-send-email-rmanohar@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To NALASEXR01H.na.qualcomm.com (10.49.56.54) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Mesh moving average should be cleared, whenever mesh paths to the given station are deactivated due to bad link. This will give enough room to analysis more tx status than retaining the current average. Signed-off-by: Rajkumar Manoharan --- net/mac80211/mesh_pathtbl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index f0e6175a9821..208ad36c0a7f 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -510,6 +510,7 @@ void mesh_plink_broken(struct sta_info *sta) struct mesh_path *mpath; struct rhashtable_iter iter; int ret; + bool paths_deactivated = false; ret = rhashtable_walk_init(&tbl->rhead, &iter, GFP_ATOMIC); if (ret) @@ -535,8 +536,11 @@ void mesh_plink_broken(struct sta_info *sta) sdata->u.mesh.mshcfg.element_ttl, mpath->dst, mpath->sn, WLAN_REASON_MESH_PATH_DEST_UNREACHABLE, bcast); + paths_deactivated = true; } } + if (paths_deactivated) + sta->mesh->fail_avg = 0; out: rhashtable_walk_stop(&iter); rhashtable_walk_exit(&iter);