From patchwork Tue Jan 2 18:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 10141195 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 59850601A1 for ; Tue, 2 Jan 2018 18:21:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EA8B28DD2 for ; Tue, 2 Jan 2018 18:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4334528DD0; Tue, 2 Jan 2018 18:21:22 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7B1E28DB4 for ; Tue, 2 Jan 2018 18:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=qC/By1msCGOdxBrksx4Gb+G/j6ZQhcIeY//U19ZtGvk=; b=A+r zLnYVCSK39DWuTJuaNOWcKJPqJPP3Cu+sKzzw0FjesJ7hr8t02VP/y6G0YVH2CpmggbP9zyxo5HCf mHI033APDZ8NIXH1pJmypKSNKT6atRhrk8dKr3Dc5kAlhZTE44UcYA2T0cATnbJsNeTrhrAfS+Wrm d5yNIxRFmTptCKGsaftNm/jSgrjhVJlobo7eaZdXp6XhU+cAX/m3fme8U5YBI3uFKq0b56malI4wr 3EGdQ/zbV/AKkmhFPwvb4sG7VvxZHISOgWVUMmZ3//fLlFDHr2InM5/FqELAuw+QUZqygk8HOMRn8 9INNq+4ILPyWr/M4aC/J+CkUI0mCexg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWRBX-0004mz-IZ; Tue, 02 Jan 2018 18:21:11 +0000 Received: from mail2.candelatech.com ([208.74.158.173]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWRBA-0004kK-BJ for ath10k@lists.infradead.org; Tue, 02 Jan 2018 18:20:50 +0000 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id D254340E8A2; Tue, 2 Jan 2018 10:20:32 -0800 (PST) From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Subject: [PATCH] ath10k: Report rx-timeout errors. Date: Tue, 2 Jan 2018 10:20:29 -0800 Message-Id: <1514917229-7839-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_102048_426851_837564DA X-CRM114-Status: UNSURE ( 5.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Greear , ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear The rx pdev related stats do not match the 10.4 firmware stats struct. The pdev-rx-timeout field needs to be added. Stock firmware may not actually ever increment that value, but this should at least help the other stats be aligned properly. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/wmi.c | 3 +++ drivers/net/wireless/ath/ath10k/wmi.h | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index a6b0894..1aacc9b8 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -288,6 +288,7 @@ struct ath10k_fw_stats_pdev { s32 phy_err_drop; s32 mpdu_errs; s32 rx_ovfl_errs; + s32 rx_timeout_errs; }; struct ath10k_fw_stats { diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index f3e6c67..cba6dad 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -3217,6 +3217,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, ath10k_wmi_pull_pdev_stats_base(&src->base, dst); ath10k_wmi_10_4_pull_pdev_stats_tx(&src->tx, dst); ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); + dst->rx_timeout_errs = __le32_to_cpu(src->pdev_rx_timeout); dst->rx_ovfl_errs = __le32_to_cpu(src->rx_ovfl_errs); ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); @@ -8244,6 +8245,8 @@ void ath10k_wmi_10_4_op_fw_stats_fill(struct ath10k *ar, ath10k_wmi_fw_pdev_rx_stats_fill(pdev, buf, &len); len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", + "Num Rx Timeout errors", pdev->rx_timeout_errs); + len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", "Num Rx Overflow errors", pdev->rx_ovfl_errs); len += scnprintf(buf + len, buf_len - len, "\n"); diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 66b446d..93ca8e8 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -4434,6 +4434,7 @@ struct wmi_10_4_pdev_stats { struct wmi_pdev_stats_base base; struct wmi_10_4_pdev_stats_tx tx; struct wmi_pdev_stats_rx rx; + __le32 pdev_rx_timeout; __le32 rx_ovfl_errs; struct wmi_pdev_stats_mem mem; __le32 sram_free_size;