Message ID | 20200203161922.190564249@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=s+JW=3X=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23D6DC35247 for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:41:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAACE2086A for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580748086; bh=qVSo41/s7T8HG9ndWY0t08ZWXbSoREZ6+XJRms8b+Lw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Q6r2WRLEfXyf327SM1ASOCNMWgBHHLW660MY8nsb+sxePpRIC2JrPaaRuVae6zerU xUEvaqsi71dAmA8tnGDKF868FJi1OcJ9rkXTmeQMUOg6AI5V1EdSAGA/PaewEd4sVF bkxrvXeBHRau3MsmFPdW+7Aas+WscRjfWWQfXwJA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730907AbgBCQfF (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 3 Feb 2020 11:35:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:49662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730901AbgBCQfE (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 3 Feb 2020 11:35:04 -0500 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F382C2087E; Mon, 3 Feb 2020 16:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580747703; bh=qVSo41/s7T8HG9ndWY0t08ZWXbSoREZ6+XJRms8b+Lw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=koubNpJ3fmbGmG/lxaTGCYC5QNmpee7hK3OcqkMPWI5oMpqr9cAk1CJEsirojbn1b 0rWzf9tt4rwZdxv34UHi7nsLhC8XeDODLap1CVkfQdIApXXrKavANtIcqCAJafhhFe t5Aayyc8mj4K0RG0nfzCoHsqD/RYdBOQ61S/6SWw= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Markus Theil <markus.theil@tu-ilmenau.de>, Johannes Berg <johannes.berg@intel.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.4 34/90] mac80211: mesh: restrict airtime metric to peered established plinks Date: Mon, 3 Feb 2020 16:19:37 +0000 Message-Id: <20200203161922.190564249@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203161917.612554987@linuxfoundation.org> References: <20200203161917.612554987@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 68af623063858..d699833703819 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -328,6 +328,9 @@ u32 airtime_link_metric_get(struct ieee80211_local *local, unsigned long fail_avg = ewma_mesh_fail_avg_read(&sta->mesh->fail_avg); + if (sta->mesh->plink_state != NL80211_PLINK_ESTAB) + return MAX_METRIC; + /* Try to get rate based on HW/SW RC algorithm. * Rate is returned in units of Kbps, correct this * to comply with airtime calculation units