From patchwork Tue Dec 5 13:31:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akolli@qti.qualcomm.com X-Patchwork-Id: 10092939 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 83E9360329 for ; Tue, 5 Dec 2017 13:37:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CA26292C3 for ; Tue, 5 Dec 2017 13:37:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70FB2293E8; Tue, 5 Dec 2017 13:37:39 +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 EB388292C3 for ; Tue, 5 Dec 2017 13:37:38 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=zw70ruK5cEViCZ3cfBG4Z1GzOvMu1sFNvfvQqZBHfVU=; b=Kyf01z80KLOf+2 QmseJQMLETMLSJajbjmRjWsjknLZm/kIl0H22wlkt1BPjg4wiHwa65OWpbVtRxAVNMJ6PT4KCmLSB Y9so7v5LABBw/wNjHT/E+kXUTGDODAVHH0BeThydwTpjDvPJ2Dg6e4LMfLQgXSAn+EAYaA0f+Kgt9 D43sNjvbhbLIkzuy0a6IaJxAbRQxocDI6TZm1fR2ph+IJpqvHNXyIa+4SuQm8PH6W5F7uj1FjmyLF HU3GFsvv3OeFWW0+XQXN5RAxlEiTxcSIEdNy0EzvKVKHC3exIRl2NaHZLUIPL+TNz2DT+ojTRCd4O Hn7XBJfY4DG5S4FVXx7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMDPi-0006pN-D2; Tue, 05 Dec 2017 13:37:34 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMDPg-0006Wj-Bo for ath10k@bombadil.infradead.org; Tue, 05 Dec 2017 13:37:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5ynV8SYMWaE9F2WA0LeZUNbZ5gF3xIcbSHfeIoymqJw=; b=qSl2vZ8BKs1njn6NfI3md+nR7 FmuPzHpGj79l9pLVJglAgFILchB/lNQif1xrGZBJ3eUeLiYXAg9qyismFmOh/wE7scdzMRmSlIKqJ KspILmOphPrG1jAztn/gLbJeUBWhLwL9sBS12XoVkkwFmOpDuFTMqHCoT5rOCw82aS4DE+hXMK6El AfQHRyvJbIjv6yoRE+GW+xcP70RB54XRUF6GFRktpRWELZZbNLTYyDKzTCy+JdYe1mfRN2Cqe99f8 mmIQjnbYBBplY8IUYXGctVJq7L8HZVQ/0pbNn8KLMaXcKEABt9ZikD3yrJIq4anhcP/PfSJuSLT6l iATTS3eBA==; Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMDJx-0002za-L9 for ath10k@lists.infradead.org; Tue, 05 Dec 2017 13:31:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1512480697; x=1544016697; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=fRemlCJ8wcpLMiI731rZ19p2UJT4PwYl/iLlllB5qQU=; b=gA7fZuxTc5Ie5zDdjO6HFsWu2BeZ5J//B/1M6SbJ6FnPhZsKODy7wpzu cyyzi11WvFH8fSbH0RarqTFVg/39KtS56pXl9jwIjBaN9NzZTXQcQxkZS 5Ey2n9bF1D3ST8U14v83EdTzO7WDlslPfdqWbRqXzbmekTcZ1JJAmiM9F Y=; X-IronPort-AV: E=Sophos;i="5.45,364,1508828400"; d="scan'208";a="117392282" Received: from unknown (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by sabertooth01.qualcomm.com with ESMTP; 05 Dec 2017 05:31:15 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8735"; a="1084566724" X-MGA-submission: =?us-ascii?q?MDEQEPt7aNsFfaWH2BZD8ckOSOOnUyTfFBRDbx?= =?us-ascii?q?P4iGX4LQIE1jamenczXUzHwaPt2WmnuAiwebCuU7mwXFFLb+WWBs3Sfo?= =?us-ascii?q?j/HDB27o1WFmtyk+9jLdSz6UQ5Crso81RUi96gSPEeMvwDQtg4CPcuGL?= =?us-ascii?q?Ez?= Received: from nasanexm03f.na.qualcomm.com ([10.85.0.47]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/AES256-SHA; 05 Dec 2017 05:31:15 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm03f.na.qualcomm.com (10.85.0.47) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 5 Dec 2017 05:31:14 -0800 Received: from localhost (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 5 Dec 2017 19:01:08 +0530 From: To: Subject: [PATCHv2 2/3] ath10k: move pktlog_filter out of ath10k_debug Date: Tue, 5 Dec 2017 19:01:24 +0530 Message-ID: <1512480685-28471-3-git-send-email-akolli@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1512480685-28471-1-git-send-email-akolli@qti.qualcomm.com> References: <1512480685-28471-1-git-send-email-akolli@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171205_133137_982617_21CD976A X-CRM114-Status: GOOD ( 11.04 ) 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: Anilkumar Kolli , akolli@codeaurora.org, linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anilkumar Kolli Move pktlog_filter from struct ath10k_debug to struct ath10k so that pktlog can be enabled even when debugfs is not enabled, needed to enable peer tx stats for 10.2.4. No changes in functionality. Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 15e386d091a4..eac9737ee407 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -488,7 +488,6 @@ struct ath10k_debug { /* protected by conf_mutex */ u64 fw_dbglog_mask; u32 fw_dbglog_level; - u32 pktlog_filter; u32 reg_addr; u32 nf_cal_period; void *cal_data; @@ -963,6 +962,7 @@ struct ath10k { } spectral; #endif + u32 pktlog_filter; struct { /* protected by conf_mutex */ struct ath10k_fw_components utf_mode_fw; diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index df514507d3f1..e278300b4f14 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -1950,14 +1950,14 @@ int ath10k_debug_start(struct ath10k *ar) ret); } - if (ar->debug.pktlog_filter) { + if (ar->pktlog_filter) { ret = ath10k_wmi_pdev_pktlog_enable(ar, - ar->debug.pktlog_filter); + ar->pktlog_filter); if (ret) /* not serious */ ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n", - ar->debug.pktlog_filter, ret); + ar->pktlog_filter, ret); } else { ret = ath10k_wmi_pdev_pktlog_disable(ar); if (ret) @@ -2097,12 +2097,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, mutex_lock(&ar->conf_mutex); if (ar->state != ATH10K_STATE_ON) { - ar->debug.pktlog_filter = filter; + ar->pktlog_filter = filter; ret = count; goto out; } - if (filter == ar->debug.pktlog_filter) { + if (filter == ar->pktlog_filter) { ret = count; goto out; } @@ -2111,7 +2111,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, ret = ath10k_wmi_pdev_pktlog_enable(ar, filter); if (ret) { ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n", - ar->debug.pktlog_filter, ret); + ar->pktlog_filter, ret); goto out; } } else { @@ -2122,7 +2122,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, } } - ar->debug.pktlog_filter = filter; + ar->pktlog_filter = filter; ret = count; out: @@ -2139,7 +2139,7 @@ static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf, mutex_lock(&ar->conf_mutex); len = scnprintf(buf, sizeof(buf) - len, "%08x\n", - ar->debug.pktlog_filter); + ar->pktlog_filter); mutex_unlock(&ar->conf_mutex); return simple_read_from_buffer(ubuf, count, ppos, buf, len);