From patchwork Fri May 3 05:14:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anilkumar Kolli X-Patchwork-Id: 10927905 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-2.web.codeaurora.org (Postfix) with ESMTP id 9A64D92A for ; Fri, 3 May 2019 05:15:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F32227EE2 for ; Fri, 3 May 2019 05:15:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B47F27F17; Fri, 3 May 2019 05:15:08 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 EFA8B27EE2 for ; Fri, 3 May 2019 05:15:07 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Bn34u9b72edD1u87wd6W+ACW2BBOd9dw26H5/OcWVAc=; b=SIwODqc/7qUMKg LOcdHCWedmlOhT6LZEHPqPTB6yGpZNIQEuLMkKE8M+HBCSkhrUGgyGqiAJd6MTDRA2DmXEn8BdW58 V/fYMhcGJIVpjz9XfpkmGNA3wwxo4g1blhDN55yTCu2NG9ki8qZxyUGFq97QDa+XFDtNcvL6Mq7Pf VeTmEoSe6Tmm9vdVh+9wyDELv2ZK0NUXzyWDpxzvstlu3Q4Twls8SAuARyOXy5TFp+gdFitJJSP7l NHreSnBFgpkJKHXV2ZH/d2M8bVxPbbL6aBYKUBONKjeas1+tg5soPH9G0SPbXTZTBluwVm5HvY6HK Xza33Aw3tq04Xh9mGAGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMQXJ-00055e-UH; Fri, 03 May 2019 05:15:05 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMQXH-0004Mi-3R for ath11k@lists.infradead.org; Fri, 03 May 2019 05:15:04 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 617F961156; Fri, 3 May 2019 05:15:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556860500; bh=TRrVM9VN1/czVplOhZ0ue0GvSCPrf28oB5fT/CYoiNY=; h=From:To:Cc:Subject:Date:From; b=j/snm2zJmjDn5SFViTXVvXEY88UGlEdbvE1Ily5d2CiXf1tOueuPGtIMf+pyb/+F6 5XWTcWHUB4Cobau/ZR4pabZEKiu3igmB0RC61ygjRLWTl09TXzJ8e1bLATfyLySz7I 8fEjcijOq/MId7a2omEznRcwoOjFwlVObykj7ctY= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: akolli@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 100B660134; Fri, 3 May 2019 05:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556860499; bh=TRrVM9VN1/czVplOhZ0ue0GvSCPrf28oB5fT/CYoiNY=; h=From:To:Cc:Subject:Date:From; b=WblyPGe0Ju0COz39mKlLxedPtCpXQvkYxjYCS+MM3+M5Dxs3QxlJUYTvNxb618t7T NMRXUZ1JnehjMshrGfLwpTuUK0g9sRzZhDb462kMFSYu2CJ+IuxtfspI6d3ig0NV7n IpqQo/YkA2BNdS9rgBkdqdrkEKLOxQVRdEJFVC7w= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 100B660134 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=akolli@codeaurora.org From: Anilkumar Kolli To: ath11k@lists.infradead.org Subject: [PATCH v3] ath11k: fix build issues on disabling ATH11K_DEBUG Date: Fri, 3 May 2019 10:44:47 +0530 Message-Id: <1556860487-31604-1-git-send-email-akolli@codeaurora.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190502_221503_187291_A19B3B67 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On CONFIG_ATH11K_DEBUG disable fix these build errors ath11k/dp_rx.c: In function ‘ath11k_htt_pull_ppdu_stats’: ath11k/dp_rx.c:991:8: error: ‘struct ath11k’ has no member named ‘debug’ if (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE) { ^ ath11k/dp_rx.c: In function ‘ath11k_dp_rx_process_mon_status’: ath11k/dp_rx.c:2278:10: error: ‘struct ath11k’ has no member named ‘debug’ if (!ar->debug.pktlog_peer_valid) { ^ ath11k/dp_rx.c:2307:9: error: ‘struct ath11k’ has no member named ‘debug’ if (ar->debug.pktlog_peer_valid && ^ ath11k/dp_rx.c:2308:38: error: ‘struct ath11k’ has no member named ‘debug’ ether_addr_equal(peer->addr, ar->debug.pktlog_peer_addr)) { Signed-off-by: Anilkumar Kolli --- V2: - Rebased on top of tree - changed ath11k_debug_is_pktlog_per_peer_enabled() to ath11k_debug_is_pktlog_rx_stats_enabled() drivers/net/wireless/ath/ath11k/debug.h | 31 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/dp_rx.c | 7 +++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h index 4c1fcca2d8b5..7f62da8d8b8b 100644 --- a/drivers/net/wireless/ath/ath11k/debug.h +++ b/drivers/net/wireless/ath/ath11k/debug.h @@ -146,6 +146,22 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, u8 *evt_buf, int ath11k_dbg_htt_stats_req(struct ath11k *ar, struct debug_htt_stats_req *stats_req); +static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar) +{ + return (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE); +} + +static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar) +{ + return (!ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode); +} + +static inline bool ath11k_debug_is_pktlog_peer_vaild(struct ath11k *ar, u8 *addr) +{ + return (ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode && + ether_addr_equal(addr, ar->debug.pktlog_peer_addr)); +} + static inline int ath11k_debug_is_extd_tx_stats_enabled(struct ath11k *ar) { return ar->debug.extd_tx_stats; @@ -207,6 +223,21 @@ static inline int ath11k_dbg_htt_stats_req(struct ath11k *ar, { return 0; } + +static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar) +{ + return false; +} + +static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar) +{ + return false; +} + +static inline bool ath11k_debug_is_pktlog_peer_vaild(struct ath11k *ar, u8 *addr) +{ + return false; +} #endif /* CONFIG_ATH11K_DEBUGFS */ #ifdef CONFIG_MAC80211_DEBUGFS diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 78f7423a66e9..257dd97275d8 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -988,7 +988,7 @@ static int ath11k_htt_pull_ppdu_stats(struct ath11k_base *ab, ppdu_id = *((u32 *)data + 1); ar = ab->pdevs[pdev_id].ar; - if (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE) { + if (ath11k_debug_is_pktlog_lite_mode_enabled(ar)) { /* TODO update the pktlog tracing */ } @@ -2300,7 +2300,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, memset(&ppdu_info, 0, sizeof(ppdu_info)); ppdu_info.peer_id = HAL_INVALID_PEERID; - if (!ar->debug.pktlog_peer_valid) { + if (ath11k_debug_is_pktlog_rx_stats_enabled(ar)) { /* TODO update the pktlog tracing */ } @@ -2329,8 +2329,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, arsta = (struct ath11k_sta *)peer->sta->drv_priv; ath11k_dp_rx_update_peer_stats(arsta, &ppdu_info); - if (ar->debug.pktlog_peer_valid && - ether_addr_equal(peer->addr, ar->debug.pktlog_peer_addr)) { + if (ath11k_debug_is_pktlog_peer_vaild(ar, peer->addr)) { /* TODO update the pktlog tracing for one peer*/ } spin_unlock_bh(&ab->data_lock);