Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp689110pxb; Wed, 16 Feb 2022 02:05:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO549rsm2drd+PonlPFeXumz/ere5619HVzspUnUIju7f218Z5AhggDJXff52UD6sH+Mgn X-Received: by 2002:a63:1b5e:0:b0:36f:e756:c118 with SMTP id b30-20020a631b5e000000b0036fe756c118mr1643079pgm.562.1645005946613; Wed, 16 Feb 2022 02:05:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645005946; cv=none; d=google.com; s=arc-20160816; b=Jioh2BWv0L6efrWVMIyjjIHLEyiIKvYTqgw93v9ntrOffr21uCgVN5Ok66wquPCEYi ocdjjTq7v0hKrJ7pLYCFc/Y0DTuzA/qbPyVl7U+QzFt//aO9Yl9ePY7GDVoBEghfArbS hYGcKo++xLZLtN0L6S8RfeRi8AkTVGi9KiAQubZD1yqD2pQV6mCWmkkejSUesv/bsSMI s0uzcn4zv5/EkfO+eyivyLaJ8e3iJG97LxZyMguRQyNx5/dOaG7umwptTHV2xuQUPaNl +23XxrJAwkbWFFtJ8vc0e02opnJCKeY/Hn6aw6DWzZLnYfmx75AtbW7TOwBqrE7NzH0o OkuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=T55G1p5GH/mqW/hkJ+YbiFZ3Mg8vvPgF6gUJT8RnjjA=; b=oKMG9ndELaFptTQoi2ldIHjj+aRmzML1A/yn8zoU9pIuT5S7QC1OWUCzU1YGrXS4eA 9ZtuhfQqqf0XG5Tb5rp+LgYfrTR6NAtLTqOPSjYsuqsmMNUNUDk7QPbdKMWOThQMg50V ho+FQ/jJ9EIt+OehRRjrKuKDXMNV4W4Y9aDo9jiJ4/jxWSXtKVgi/BC9iKE3OC84F+Gr /XtcshxtgH/gcqFjkkI76/DhfJjf2TZRYPUYnilVU3N0Rap6rk6u9T2rfTOTdd5D9wAw l9ROkbEZ4w7MWodGkoORQDQ2MWxTLYNtV/P71tgh85FlmKAStvEcu2OBGAgNGw/Xmt+6 226g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=LMda2kdC; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d9si21901786plg.497.2022.02.16.02.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:05:46 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=LMda2kdC; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6CF262B7601; Wed, 16 Feb 2022 02:05:40 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232704AbiBPKFs (ORCPT + 73 others); Wed, 16 Feb 2022 05:05:48 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:38828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232682AbiBPKFq (ORCPT ); Wed, 16 Feb 2022 05:05:46 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCDE679C65 for ; Wed, 16 Feb 2022 02:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645005934; x=1676541934; h=from:to:cc:subject:date:message-id:mime-version; bh=T55G1p5GH/mqW/hkJ+YbiFZ3Mg8vvPgF6gUJT8RnjjA=; b=LMda2kdCGTQ1KWVst478yzUdyupg81eJt6TOHCjJUSpup7A/mMW8M9bY YD9bZ126P/O88eSMVzZWhaho6LQYZbBnBCwr1f68nu+3sMajkg0bIy2FQ 9o/i0w6/HzPFpunJ4X1bogMRMcvpnjLtiH2TOGhQ/tknIbaOLYEYN+9qy U=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 16 Feb 2022 02:05:34 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 02:05:34 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 16 Feb 2022 02:05:33 -0800 Received: from vnaralas-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 16 Feb 2022 02:05:32 -0800 From: Venkateswara Naralasetty To: CC: , Venkateswara Naralasetty Subject: [PATCHv2 0/6] ath11k: add single shot/periodic CFR capture support for IPQ8074 Date: Wed, 16 Feb 2022 15:35:16 +0530 Message-ID: <1645005922-7252-1-git-send-email-quic_vnaralas@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Channel Frequency Response feature is to get the channel state information from the hardware based on the user configurations and send the CSI data to user space. CSI data is further processed in user space which can be used to identify the motion of the objects. CFR dumps will be collected from the received ACK's for the transmited QOS NULL frames for the associated stations. For unassociated stations CFR dumps will be collected from the probe response ACK. CFR format to user space: ___________________________________________ | CFR header | CFR payload | CFR tail data | |____________|_____________|_______________| CFR header contains the following fields, * Start magic number 0xDEADBEAF - 4bytes * vendor id - 4bytes * cfr metadata version - 1byte * cfr data version - 1byte * chip type - 1byte * platform type - 1byte * CFR metadata length - 4bytes * metadata - 92bytes peer mac - 6bytes capture status - 1byte (1 for success 0 for failure) capture_bw - 1byte channel_bw - 1byte phy_mode - 1byte prim20_chan - 2bytes center_freq1 - 2bytes center_freq2 - 2bytes capture_mode - 1byte capture_type - 1byte sts_count - 1byte num_rx_chain - 1byte timestamp - 4bytes length - 4bytes chain_rssi - 32bytes (4bytes for each chain) chain_phase - 16bytes (2bytes for each chain) cfo_measurement - 4bytes agc_gain - 8bytes (1 bytes for each chain) rx_start_ts - 4bytes CFR payload: CFR payload contains 8bytes of ucode header followed by the tone information. Tone order is positive tones, followed by PHY memory garbage, followed by negative tones. Dummy tones are uploaded to make number of tones always integer number of 64. Number of tones is not preamble type dependent. Each CFR tone has 14-bit I component and 14-bit Q component and is sign extended to 16-bit I/Q. Two tones are packed into one 64-bit unit as: [63:0] = [Tone1_Q(63:48) Tone1_I(47:32) Tone0_Q(31:16) Tone0_I(15:0)] CFR tail: end magic number 0xBEAFDEAD Tested-on: IPQ8074 WLAN.HK.2.5.0.1-00991-QCAHKSWPL_SILICONZ-1 Venkateswara Naralasetty (6): nl80211: vendor-cmd: qca: add command for CFR configuration ath11k: CFR module initialization and deinitialization for IPQ8074 ath11k: register relayfs entries for CFR dump ath11k: register vendor sub command for CFR configuration ath11k: Register DBR event handler for CFR data ath11k: Register handler for CFR capture event v2: * Fixed warnings reported by kernel test robot. drivers/net/wireless/ath/ath11k/Kconfig | 9 + drivers/net/wireless/ath/ath11k/Makefile | 4 +- drivers/net/wireless/ath/ath11k/cfr.c | 817 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/cfr.h | 304 ++++++++++++ drivers/net/wireless/ath/ath11k/core.c | 35 ++ drivers/net/wireless/ath/ath11k/core.h | 17 + drivers/net/wireless/ath/ath11k/dbring.c | 33 +- drivers/net/wireless/ath/ath11k/dbring.h | 7 + drivers/net/wireless/ath/ath11k/debug.h | 2 + drivers/net/wireless/ath/ath11k/hal.c | 3 +- drivers/net/wireless/ath/ath11k/hw.h | 5 + drivers/net/wireless/ath/ath11k/mac.c | 18 +- drivers/net/wireless/ath/ath11k/vendor.c | 192 ++++++++ drivers/net/wireless/ath/ath11k/vendor.h | 13 + drivers/net/wireless/ath/ath11k/wmi.c | 148 +++++- drivers/net/wireless/ath/ath11k/wmi.h | 97 +++- include/uapi/linux/nl80211-vnd-qca.h | 104 ++++ 17 files changed, 1792 insertions(+), 16 deletions(-) create mode 100644 drivers/net/wireless/ath/ath11k/cfr.c create mode 100644 drivers/net/wireless/ath/ath11k/cfr.h create mode 100644 drivers/net/wireless/ath/ath11k/vendor.c create mode 100644 drivers/net/wireless/ath/ath11k/vendor.h create mode 100644 include/uapi/linux/nl80211-vnd-qca.h -- 2.7.4