From patchwork Mon Dec 5 21:52:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 9461631 X-Patchwork-Delegate: kvalo@adurom.com 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 C9D266022E for ; Mon, 5 Dec 2016 21:53:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C09B92818E for ; Mon, 5 Dec 2016 21:53:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B51CF281A7; Mon, 5 Dec 2016 21:53:27 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 778F92818E for ; Mon, 5 Dec 2016 21:53:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cE1CE-00089h-TX; Mon, 05 Dec 2016 21:53:14 +0000 Received: from mail-wj0-x242.google.com ([2a00:1450:400c:c01::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cE1CB-00087F-7S for ath10k@lists.infradead.org; Mon, 05 Dec 2016 21:53:12 +0000 Received: by mail-wj0-x242.google.com with SMTP id he10so27014581wjc.2 for ; Mon, 05 Dec 2016 13:52:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=XEkORrnADXko000N4ISFY0O6c5muhAWU5Zo/mm8FuSY=; b=Pq2ziFrjE1rNaykT957fcgDN53B/LHCtmbH50A6U8x/JbtzPYAkFnpqNMqQ5xa8/Ld 6HjhDi5ccBEHj2jRhzyLoWiEwuYTl4nqu2M26KgwvQ0kJRISaxjJ7aRVibOR40YDM9gS LVFKIN+RE5AUJQWdrCUyr8+0Bl4wXIbz8kqDPuWnc0n1Umh/1fZwegH/KheKeVNkqmP1 F8mVndoNOd/RDxsqYYhNG8Ed1UdG1M06u2GEBfKdPfCiwJyKM+j9CxtrHPhrWo3WSjYw VLBUpIagWjYl2G+tC8o1aHT8YXmoXDsQ2KDPBU2/J5TxqbVZh46sCCWmqXGLiEg4XFCC 1vdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XEkORrnADXko000N4ISFY0O6c5muhAWU5Zo/mm8FuSY=; b=KarijIAlWDpolAdT+SyJqy+qulAqR8eA9a+KVONRmEpIyfECbt4vWRfQiOQiJ0LoXQ VffeGoFOznLDQDB2apsPHdaNqcObwnGyQKMHJQEFnCgKjkxMchczDWaUbfXIuXHEpi7D EBuU480ffhX5U2zKWhtHBcjegk9HiNwrSYiybvv0/pf08olUOEHyeJr0o/sJ9YRUyf49 4TvWwUR2SUsYH827hzYQH3lEf+Ol+/5hQBHB0uYFPP3z1slFbtR9cU++y8WFX3Okov3J rcl0ZeVbL44fnebRDcGODVxia/0FUfmwxETQyGNdEENmqBP2y2f61e6MOQ66S/KoLW5W qghg== X-Gm-Message-State: AKaTC02WEszHLq+2hfK9iS00oGvL6jHArH6xEjU0Ths6Y3zso57obZJgXKHnoXm5by0q4g== X-Received: by 10.194.123.201 with SMTP id mc9mr63008817wjb.47.1480974768162; Mon, 05 Dec 2016 13:52:48 -0800 (PST) Received: from debian64.daheim (p5B2E638E.dip0.t-ipconnect.de. [91.46.99.142]) by smtp.gmail.com with ESMTPSA id n5sm715171wmf.0.2016.12.05.13.52.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Dec 2016 13:52:46 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.88) (envelope-from ) id 1cE1Bm-0002Xn-7m; Mon, 05 Dec 2016 22:52:46 +0100 From: Christian Lamparter To: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH 1/2] ath10k: add accounting for the extended peer statistics Date: Mon, 5 Dec 2016 22:52:45 +0100 Message-Id: <992a4e2676037a06f482cdbe2d3d39e287530be5.1480974623.git.chunkeey@googlemail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161205_135311_474286_7B43201A X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kalle Valo MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The 10.4 firmware adds extended peer information to the firmware's statistics payload. This additional info is stored as a separate data field and the elements are stored in their own "peers_extd" list. These elements can pile up in the same way as the peer information elements. This is because the ath10k_wmi_10_4_op_pull_fw_stats() function tries to pull the same amount (num_peer_stats) for every statistic data unit. Fixes: 4a49ae94a448faa ("ath10k: fix 10.4 extended peer stats update") Signed-off-by: Christian Lamparter --- drivers/net/wireless/ath/ath10k/debug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 82a4c67f3672..4acd9eb65910 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -399,6 +399,7 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb) * prevent firmware from DoS-ing the host. */ ath10k_fw_stats_peers_free(&ar->debug.fw_stats.peers); + ath10k_fw_extd_stats_peers_free(&ar->debug.fw_stats.peers_extd); ath10k_warn(ar, "dropping fw peer stats\n"); goto free; } @@ -409,10 +410,12 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb) goto free; } + if (!list_empty(&stats.peers)) + list_splice_tail_init(&stats.peers_extd, + &ar->debug.fw_stats.peers_extd); + list_splice_tail_init(&stats.peers, &ar->debug.fw_stats.peers); list_splice_tail_init(&stats.vdevs, &ar->debug.fw_stats.vdevs); - list_splice_tail_init(&stats.peers_extd, - &ar->debug.fw_stats.peers_extd); } complete(&ar->debug.fw_stats_complete);