From patchwork Wed Jun 22 10:52:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Raj Nagarajan X-Patchwork-Id: 9192397 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 D98D460756 for ; Wed, 22 Jun 2016 10:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA09B283E9 for ; Wed, 22 Jun 2016 10:54:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE8BB283F7; Wed, 22 Jun 2016 10:54:00 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AED5283E9 for ; Wed, 22 Jun 2016 10:53:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbcFVKxx (ORCPT ); Wed, 22 Jun 2016 06:53:53 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:14739 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbcFVKx3 (ORCPT ); Wed, 22 Jun 2016 06:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1466592809; x=1498128809; h=from:to:cc:subject:date:message-id:mime-version; bh=mHUqCdhsKu/CLQseP4vBH5CqhC/G0i91LEiqcsPaKtY=; b=oP3wFBWAaUN6zQis+PDblqCnytai7+vS8OCO4MHri0lABqtYLhVT9aEY h5OFBSWZpfT5SLGviX3YA3LMzFDkEWDdSMrouHKif18QmaE1ctC/xWq5j QS/SGDY1ZiSDiveMRb1odpW/XSMbDtWDBGyn2xy2YsqKkH8wDLbGptLVp w=; X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="202546000" Received: from unknown (HELO Ironmsg04-R.qualcomm.com) ([10.53.140.108]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Jun 2016 03:53:28 -0700 X-IronPort-AV: E=McAfee;i="5700,7163,8203"; a="1221353755" Received: from nasanexm01c.na.qualcomm.com ([10.85.0.83]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 22 Jun 2016 03:53:28 -0700 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01C.na.qualcomm.com (10.85.0.83) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 22 Jun 2016 03:53:27 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 22 Jun 2016 16:23:19 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Wed, 22 Jun 2016 16:22:42 +0530 From: Ashok Raj Nagarajan To: CC: , , "Ashok Raj Nagarajan" Subject: [PATCH] ath10k: simplify pktlog htt event processing Date: Wed, 22 Jun 2016 16:22:41 +0530 Message-ID: <1466592761-6659-1-git-send-email-arnagara@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01f.ap.qualcomm.com (10.252.127.15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is expected that all pktlog events for 10.4 firmware based solutions should come through CE8 where as in case of 10.2 firmware based solutions, it should come through one of the HTT events (HTT_T2H_MSG_TYPE_PKTLOG). But from experiments with 10.4 based solutions, it is observed that pktlog event for ATH_PKTLOG_TYPE_TX_MSDU_ID is coming through HTT pktlog event. Currently, we always parse with 10.2 pktlog header which will lead to pktlog decoding issues (payload length mismatch exceptions) For trace points, it is required to provide only the payload size. So fixing this by simplifying the payload size calculation without the use of ath10k pktlog headers. While there, remove the unused ath10k pktlog headers. Signed-off-by: Ashok Raj Nagarajan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 8 +++----- drivers/net/wireless/ath/ath10k/hw.h | 19 ------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 80e6453..b2a9c4c 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2307,12 +2307,10 @@ bool ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb) ath10k_htt_rx_delba(ar, resp); break; case HTT_T2H_MSG_TYPE_PKTLOG: { - struct ath10k_pktlog_hdr *hdr = - (struct ath10k_pktlog_hdr *)resp->pktlog_msg.payload; - trace_ath10k_htt_pktlog(ar, resp->pktlog_msg.payload, - sizeof(*hdr) + - __le16_to_cpu(hdr->size)); + skb->len - + offsetof(struct htt_resp, + pktlog_msg.payload)); break; } case HTT_T2H_MSG_TYPE_RX_FLUSH: { diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index f31d3ce..427b720 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -296,25 +296,6 @@ enum ath10k_mcast2ucast_mode { ATH10K_MCAST2UCAST_ENABLED = 1, }; -struct ath10k_pktlog_hdr { - __le16 flags; - __le16 missed_cnt; - __le16 log_type; - __le16 size; - __le32 timestamp; - u8 payload[0]; -} __packed; - -struct ath10k_pktlog_10_4_hdr { - __le16 flags; - __le16 missed_cnt; - __le16 log_type; - __le16 size; - __le32 timestamp; - __le32 type_specific_data; - u8 payload[0]; -} __packed; - enum ath10k_hw_rate_ofdm { ATH10K_HW_RATE_OFDM_48M = 0, ATH10K_HW_RATE_OFDM_24M,