Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5652689img; Wed, 27 Mar 2019 12:30:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfsQca4XcL7aNmD6zA8/l6U5u62QZ8qjf6BCTTVAYdHxeGeAKRNMyuON0lGBxlk7kJT3WK X-Received: by 2002:aa7:8d49:: with SMTP id s9mr35982033pfe.248.1553715001252; Wed, 27 Mar 2019 12:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553715001; cv=none; d=google.com; s=arc-20160816; b=QdNG0CAi8UoWp2XaFV7+nRilSwV+giw7ur1ai9EkJbcC9jQGii7tknuOHsRbScDG9e Oe1OXNaxnTjJDmlFIRQ4mXZRoqqeknPjRSCvKEyCuUyblCaxUKp5YDJlNyM2FPmSIgrD AsK8eHWrdM8pcLx0+YrJCuB8uomKsLXukk/hD8IGgq+bPOOqmAmiXjz3abr34zCtZS7H bY7r9Af/BzwHtqfC5kAfL+Zw5C90/QOfCEnTG3mDxZVBI2PlSV5ZFmzfNweDdYe8P9Z3 yCso0yS6ErHBY/RCjDUaAhHo+DBXKyKrne99VMuqrvYyhhjJw6QQqZpQdalxMyOX9eqr kzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CGmm6EmPBmRuQrZw86Qb+8murxD5hNVwc69ZBAnDh54=; b=bPhgEo0uOC/fkyzmjvPE/nkaAYQPOSyzmQ/hivk3FEDRUpFNIFQAtusisiPP8Ij4JB Tr8WlstbVczEpV9QGLVdteQAWYEQiA4kaN9S+/YFckAx9hCpDpOGuNN9yRk+e7TGEVFE 2JTTfV7Q7buSAHP9NmJEp288/n3eOExaZRxmHmkreg3IkbbJTR3c5KriMagpISetl8z3 AfnY9EsG+inTTiGy2t8wsQ0ZZKWFRdVliq4FGHmTTecEpprY4ocOFFA8Hc51l6crbo+E La4JSdyDtGVjN14Blbev+91WSofRftJgk3P4DFcI/88dnG8fpR4brzcroKU95OuzhhTd GfOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=APmf+JDt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si18494543pgq.198.2019.03.27.12.29.46; Wed, 27 Mar 2019 12:30:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=APmf+JDt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732997AbfC0SDz (ORCPT + 99 others); Wed, 27 Mar 2019 14:03:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:44322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729540AbfC0SDy (ORCPT ); Wed, 27 Mar 2019 14:03:54 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1E862082F; Wed, 27 Mar 2019 18:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709833; bh=DZlINmG1lM12VF8DFoS3JMnFbQRIx5SlE38ekQv96nM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=APmf+JDt47gEzqz/cA6NHn10RCuTwAI5sZq4k/nfTgxtwjfCqYfB0Tscvnhn2r15g H51srthQCGc1GbucWnsVyFS+nQFQ5S/jbaIraWinfWsCTPI1FLzlkua298y7VlPKyt TMw077wJk+CNHv/N77DMsQpjAmtem3GICBFW02oU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Surabhi Vishnoi , Kalle Valo , Sasha Levin , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 065/262] ath10k: Fix the wrong updation of BW in tx_stats debugfs entry Date: Wed, 27 Mar 2019 13:58:40 -0400 Message-Id: <20190327180158.10245-65-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Surabhi Vishnoi [ Upstream commit ef9051c72ab7bc664e8047c55ac74bdb1c7fa3ee ] Currently, the bandwidth is updated wrongly in BW table in tx_stats debugfs per sta as there is difference in number of bandwidth type in mac80211 and driver stats table. This leads to bandwidth getting updated at wrong index in bandwidth table in tx_stats. Fix this index mismatch between mac80211 and driver stats table (BW table) by making the number of bandwidth type in driver compatible with mac80211. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Fixes: a904417fc876 ("ath10k: add extended per sta tx statistics support") Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/debugfs_sta.c | 7 ++++--- drivers/net/wireless/ath/ath10k/wmi.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c index 4778a455d81a..068f1a7e07d3 100644 --- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c @@ -696,11 +696,12 @@ static ssize_t ath10k_dbg_sta_dump_tx_stats(struct file *file, " %llu ", stats->ht[j][i]); len += scnprintf(buf + len, size - len, "\n"); len += scnprintf(buf + len, size - len, - " BW %s (20,40,80,160 MHz)\n", str[j]); + " BW %s (20,5,10,40,80,160 MHz)\n", str[j]); len += scnprintf(buf + len, size - len, - " %llu %llu %llu %llu\n", + " %llu %llu %llu %llu %llu %llu\n", stats->bw[j][0], stats->bw[j][1], - stats->bw[j][2], stats->bw[j][3]); + stats->bw[j][2], stats->bw[j][3], + stats->bw[j][4], stats->bw[j][5]); len += scnprintf(buf + len, size - len, " NSS %s (1x1,2x2,3x3,4x4)\n", str[j]); len += scnprintf(buf + len, size - len, diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2034ccc7cc72..1d5d0209ebeb 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -5003,7 +5003,7 @@ enum wmi_rate_preamble { #define ATH10K_FW_SKIPPED_RATE_CTRL(flags) (((flags) >> 6) & 0x1) #define ATH10K_VHT_MCS_NUM 10 -#define ATH10K_BW_NUM 4 +#define ATH10K_BW_NUM 6 #define ATH10K_NSS_NUM 4 #define ATH10K_LEGACY_NUM 12 #define ATH10K_GI_NUM 2 -- 2.19.1