From patchwork Sun Oct 22 14:55:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 13431851 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF5D6C00A8F for ; Sun, 22 Oct 2023 14:56:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232073AbjJVO40 (ORCPT ); Sun, 22 Oct 2023 10:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232096AbjJVO4Y (ORCPT ); Sun, 22 Oct 2023 10:56:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3764013E for ; Sun, 22 Oct 2023 07:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697986583; x=1729522583; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=R4zcQcXEX8V7LqL+1TPJb4P0UPTtT+imZWMP8RW0mV8=; b=J6MJHik008sAvRQ5UkxTCCcJoZYs4uYck9rqrc7SvxfpocScXVTq8fAH Z9mMY2OhTm4SkwI6aoZBBpMhTkazTFkhQoGLOYcQS/yCmnUg6zxjK9ZXG pmNDm8nrsW5QQKt6QU/SU0VAQGZQ7qUdV6hyYeNgWvNf8hOB7NPCOuI4K 4odxx9oXHgvqMsY5aFb0o4dGMcVxJvF/HRHKDe1uQus4S3YVrhEGo9How u8nbqRuhqI5G7JBrIVbECvALO9Rtyvzz/vbcqhQCvDWfLd+/frCGOejkr IYKIklou2rqlDvPbBi7tMDaNFUHRNa3fzI5Fv3/QsouLaiIqd7KTDB5GY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10870"; a="472925857" X-IronPort-AV: E=Sophos;i="6.03,242,1694761200"; d="scan'208";a="472925857" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 07:56:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,242,1694761200"; d="scan'208";a="5556206" Received: from umark-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.231.87]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 07:55:06 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 06/10] wifi: iwlwifi: trace full frames with TX status request Date: Sun, 22 Oct 2023 17:55:52 +0300 Message-Id: <20231022173519.0dfb60a2eaec.I3c3e46ed0eb05700a4d05d293f80d727354a402f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231022145556.244202-1-gregory.greenman@intel.com> References: <20231022145556.244202-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg If upper layers requested a TX status, then the frames are more important, so trace frames in that case. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h index 1455b578358b..01fb7b900a6d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h @@ -3,17 +3,19 @@ * * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(C) 2016 Intel Deutschland GmbH - * Copyright(c) 2018 Intel Corporation + * Copyright(c) 2018, 2023 Intel Corporation *****************************************************************************/ #ifndef __IWLWIFI_DEVICE_TRACE #include #include #include +#include #include "iwl-trans.h" #if !defined(__IWLWIFI_DEVICE_TRACE) static inline bool iwl_trace_data(struct sk_buff *skb) { + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (void *)skb->data; __le16 fc = hdr->frame_control; int offs = 24; /* start with normal header length */ @@ -21,6 +23,10 @@ static inline bool iwl_trace_data(struct sk_buff *skb) if (!ieee80211_is_data(fc)) return false; + /* If upper layers wanted TX status it's an important frame */ + if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) + return false; + /* Try to determine if the frame is EAPOL. This might have false * positives (if there's no RFC 1042 header and we compare to some * payload instead) but since we're only doing tracing that's not