qcacmn: Add Host support for Spectral FFT recapture
Add support to receive the fft_recapture arg value from spectraltool, handle the FFT recapture config and pass this to FW. The recapture feature must be enabled only for spectral scan period > 52 us and Normal Spectral scans. Change-Id: Ied637704d25bb15bff2139a215da7481d4f80e4f CRs-Fixed: 3140890
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
b64b200ff8
當前提交
055dfbe881
@@ -7700,6 +7700,13 @@ enum qca_wlan_vendor_attr_spectral_scan {
|
||||
* for the current operating bandwidth.
|
||||
*/
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_BANDWIDTH = 30,
|
||||
/* Spectral FFT recapture flag attribute, to enable/disable FFT
|
||||
* recapture. Recapture can only be enabled for Scan period greater
|
||||
* than 52us.
|
||||
* If this attribute is enabled, re-triggers will be enabled in uCode
|
||||
* when AGC gain changes.
|
||||
*/
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE = 31,
|
||||
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX =
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -93,6 +94,8 @@ const struct nla_policy spectral_scan_policy[
|
||||
.type = NLA_U8},
|
||||
[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_BANDWIDTH] = {
|
||||
.type = NLA_U8},
|
||||
[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE] = {
|
||||
.type = NLA_U32},
|
||||
};
|
||||
|
||||
const struct nla_policy spectral_scan_get_status_policy[
|
||||
@@ -107,6 +110,7 @@ const struct nla_policy spectral_scan_get_status_policy[
|
||||
static void wlan_spectral_intit_config(struct spectral_config *config_req)
|
||||
{
|
||||
config_req->ss_period = SPECTRAL_PHYERR_PARAM_NOVAL;
|
||||
config_req->ss_recapture = SPECTRAL_PHYERR_PARAM_NOVAL;
|
||||
config_req->ss_count = SPECTRAL_PHYERR_PARAM_NOVAL;
|
||||
config_req->ss_fft_period = SPECTRAL_PHYERR_PARAM_NOVAL;
|
||||
config_req->ss_short_report = SPECTRAL_PHYERR_PARAM_NOVAL;
|
||||
@@ -397,6 +401,10 @@ int wlan_cfg80211_spectral_scan_config_and_start(struct wiphy *wiphy,
|
||||
config_req.ss_period = nla_get_u32(tb
|
||||
[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_SCAN_PERIOD]);
|
||||
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE])
|
||||
config_req.ss_recapture = nla_get_u32(tb
|
||||
[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE]);
|
||||
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_PRIORITY])
|
||||
config_req.ss_spectral_pri = nla_get_u32(tb
|
||||
[QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_PRIORITY]);
|
||||
@@ -806,7 +814,10 @@ int wlan_cfg80211_spectral_scan_get_config(struct wiphy *wiphy,
|
||||
sconfig->ss_frequency.cfreq2) ||
|
||||
nla_put_u8(skb,
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_BANDWIDTH,
|
||||
sscan_bw_nl))
|
||||
sscan_bw_nl) ||
|
||||
nla_put_u32(skb,
|
||||
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FFT_RECAPTURE,
|
||||
sconfig->ss_recapture))
|
||||
|
||||
goto fail;
|
||||
|
||||
|
Reference in New Issue
Block a user