qcacmn: Add start scan response WMI event
Add support for processing the start scan response WMI event. FW provides the necessary information to segregate FFT bins to pri80, 5 MHz and sec80 in 160/165 MHz. Also, cfreq2 and the channel width is provided to FW via WMI command. CRs-Fixed: 2672081 Change-Id: I666b6c18a63d5d01117aa9cbd611691c6f8b2793
This commit is contained in:

committed by
nshrivas

parent
18bbaf7484
commit
abdb33bb00
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2018,2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -29,9 +29,25 @@
|
|||||||
#include <wlan_objmgr_psoc_obj.h>
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
#include <wlan_objmgr_global_obj.h>
|
#include <wlan_objmgr_global_obj.h>
|
||||||
|
|
||||||
/* Function pointer for spectral pdev open handler */
|
/**
|
||||||
typedef QDF_STATUS (*spectral_pdev_open_handler)(
|
* struct dispatcher_spectral_ops - Spectral ops table
|
||||||
struct wlan_objmgr_pdev *pdev);
|
* @spectral_pdev_open_handler: Spectral pdev open handler
|
||||||
|
* @spectral_psoc_open_handler: Spectral psoc open handler
|
||||||
|
* @spectral_psoc_close_handler: Spectral psoc close handler
|
||||||
|
* @spectral_psoc_enable_handler: Spectral psoc enable handler
|
||||||
|
* @spectral_psoc_disable_handler: Spectral psoc disable handler
|
||||||
|
*/
|
||||||
|
struct dispatcher_spectral_ops {
|
||||||
|
QDF_STATUS(*spectral_pdev_open_handler)(struct wlan_objmgr_pdev *pdev);
|
||||||
|
QDF_STATUS(*spectral_psoc_open_handler)(
|
||||||
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
QDF_STATUS(*spectral_psoc_close_handler)(
|
||||||
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
QDF_STATUS(*spectral_psoc_enable_handler)(
|
||||||
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
QDF_STATUS(*spectral_psoc_disable_handler)(
|
||||||
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dispatcher_init(): API to init all new components
|
* dispatcher_init(): API to init all new components
|
||||||
@@ -182,15 +198,15 @@ QDF_STATUS dispatcher_pdev_open(struct wlan_objmgr_pdev *pdev);
|
|||||||
QDF_STATUS dispatcher_pdev_close(struct wlan_objmgr_pdev *pdev);
|
QDF_STATUS dispatcher_pdev_close(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dispatcher_register_spectral_pdev_open_handler():
|
* dispatcher_register_spectral_ops_handler(): API to register spectral
|
||||||
* API to register spectral pdev open handler
|
* operations
|
||||||
* @handler: pdev open handler
|
* @sops: pointer to Spectral ops table
|
||||||
*
|
*
|
||||||
* This API registers spectral pdev open handler.
|
* This API registers spectral pdev open handler, psoc enable handler and
|
||||||
|
* psoc disable handler, psoc open handler and psoc close handler.
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
QDF_STATUS dispatcher_register_spectral_pdev_open_handler(QDF_STATUS (*handler)
|
QDF_STATUS
|
||||||
(struct wlan_objmgr_pdev *pdev));
|
dispatcher_register_spectral_ops_handler(struct dispatcher_spectral_ops *sops);
|
||||||
|
|
||||||
#endif /* End of !defined(__DISPATCHER_INIT_H) */
|
#endif /* End of !defined(__DISPATCHER_INIT_H) */
|
||||||
|
@@ -90,7 +90,7 @@
|
|||||||
* their actual handlers are ready
|
* their actual handlers are ready
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spectral_pdev_open_handler dispatcher_spectral_pdev_open_handler_cb;
|
struct dispatcher_spectral_ops ops_spectral;
|
||||||
|
|
||||||
#ifdef WLAN_CFR_ENABLE
|
#ifdef WLAN_CFR_ENABLE
|
||||||
static QDF_STATUS dispatcher_init_cfr(void)
|
static QDF_STATUS dispatcher_init_cfr(void)
|
||||||
@@ -322,26 +322,48 @@ static QDF_STATUS dispatcher_regulatory_psoc_close(struct wlan_objmgr_psoc
|
|||||||
return regulatory_psoc_close(psoc);
|
return regulatory_psoc_close(psoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WLAN_CONV_SPECTRAL_ENABLE) && defined(SPECTRAL_MODULIZED_ENABLE)
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
QDF_STATUS dispatcher_register_spectral_pdev_open_handler(
|
#ifdef SPECTRAL_MODULIZED_ENABLE
|
||||||
spectral_pdev_open_handler handler)
|
QDF_STATUS
|
||||||
|
dispatcher_register_spectral_ops_handler(struct dispatcher_spectral_ops *sops)
|
||||||
{
|
{
|
||||||
dispatcher_spectral_pdev_open_handler_cb = handler;
|
qdf_mem_copy(&ops_spectral, sops,
|
||||||
|
qdf_min(sizeof(*sops), sizeof(ops_spectral)));
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(dispatcher_register_spectral_pdev_open_handler);
|
|
||||||
|
|
||||||
static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
|
qdf_export_symbol(dispatcher_register_spectral_ops_handler);
|
||||||
*pdev)
|
|
||||||
|
static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
return dispatcher_spectral_pdev_open_handler_cb(pdev);
|
return ops_spectral.spectral_pdev_open_handler(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
|
static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return ops_spectral.spectral_psoc_open_handler(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return ops_spectral.spectral_psoc_close_handler(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return ops_spectral.spectral_psoc_enable_handler(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return ops_spectral.spectral_psoc_disable_handler(psoc);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
|
static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
|
||||||
*pdev)
|
*pdev)
|
||||||
@@ -353,6 +375,58 @@ static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
|
|||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return wlan_spectral_psoc_open(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return wlan_spectral_psoc_close(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return wlan_spectral_psoc_enable(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return wlan_spectral_psoc_disable(psoc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
|
||||||
|
*pdev)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static QDF_STATUS dispatcher_regulatory_pdev_open(struct wlan_objmgr_pdev
|
static QDF_STATUS dispatcher_regulatory_pdev_open(struct wlan_objmgr_pdev
|
||||||
@@ -1031,6 +1105,8 @@ qdf_export_symbol(dispatcher_disable);
|
|||||||
|
|
||||||
QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_open(psoc))
|
if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_open(psoc))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -1058,8 +1134,14 @@ QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
|
|||||||
if (QDF_STATUS_SUCCESS != dcs_psoc_open(psoc))
|
if (QDF_STATUS_SUCCESS != dcs_psoc_open(psoc))
|
||||||
goto dcs_psoc_open_fail;
|
goto dcs_psoc_open_fail;
|
||||||
|
|
||||||
|
status = spectral_psoc_open(psoc);
|
||||||
|
if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
|
||||||
|
goto spectral_psoc_open_fail;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
spectral_psoc_open_fail:
|
||||||
|
dcs_psoc_close(psoc);
|
||||||
dcs_psoc_open_fail:
|
dcs_psoc_open_fail:
|
||||||
dispatcher_coex_psoc_close(psoc);
|
dispatcher_coex_psoc_close(psoc);
|
||||||
coex_psoc_open_fail:
|
coex_psoc_open_fail:
|
||||||
@@ -1084,6 +1166,8 @@ qdf_export_symbol(dispatcher_psoc_open);
|
|||||||
|
|
||||||
QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == dcs_psoc_close(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == dcs_psoc_close(psoc));
|
||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coex_psoc_close(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coex_psoc_close(psoc));
|
||||||
@@ -1102,12 +1186,18 @@ QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
|
|||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_close(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_close(psoc));
|
||||||
|
|
||||||
|
status = spectral_psoc_close(psoc);
|
||||||
|
QDF_BUG((status == QDF_STATUS_SUCCESS) ||
|
||||||
|
(status == QDF_STATUS_COMP_DISABLED));
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(dispatcher_psoc_close);
|
qdf_export_symbol(dispatcher_psoc_close);
|
||||||
|
|
||||||
QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
if (QDF_STATUS_SUCCESS != wlan_serialization_psoc_enable(psoc))
|
if (QDF_STATUS_SUCCESS != wlan_serialization_psoc_enable(psoc))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -1141,8 +1231,14 @@ QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
if (QDF_STATUS_SUCCESS != wlan_mlme_psoc_enable(psoc))
|
if (QDF_STATUS_SUCCESS != wlan_mlme_psoc_enable(psoc))
|
||||||
goto mlme_psoc_enable_fail;
|
goto mlme_psoc_enable_fail;
|
||||||
|
|
||||||
|
status = spectral_psoc_enable(psoc);
|
||||||
|
if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
|
||||||
|
goto spectral_psoc_enable_fail;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
spectral_psoc_enable_fail:
|
||||||
|
wlan_mlme_psoc_disable(psoc);
|
||||||
mlme_psoc_enable_fail:
|
mlme_psoc_enable_fail:
|
||||||
dispatcher_dbr_psoc_disable(psoc);
|
dispatcher_dbr_psoc_disable(psoc);
|
||||||
dbr_psoc_enable_fail:
|
dbr_psoc_enable_fail:
|
||||||
@@ -1170,6 +1266,8 @@ qdf_export_symbol(dispatcher_psoc_enable);
|
|||||||
|
|
||||||
QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mlme_psoc_disable(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mlme_psoc_disable(psoc));
|
||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dbr_psoc_disable(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dbr_psoc_disable(psoc));
|
||||||
@@ -1190,6 +1288,10 @@ QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
|||||||
|
|
||||||
QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_psoc_disable(psoc));
|
QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_psoc_disable(psoc));
|
||||||
|
|
||||||
|
status = spectral_psoc_disable(psoc);
|
||||||
|
QDF_BUG((status == QDF_STATUS_SUCCESS) ||
|
||||||
|
(status == QDF_STATUS_COMP_DISABLED));
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(dispatcher_psoc_disable);
|
qdf_export_symbol(dispatcher_psoc_disable);
|
||||||
|
@@ -483,6 +483,8 @@ spectral_ctx_deinit(struct spectral_context *sc)
|
|||||||
sc->sptrlc_ucfg_phyerr_config = NULL;
|
sc->sptrlc_ucfg_phyerr_config = NULL;
|
||||||
sc->sptrlc_pdev_spectral_init = NULL;
|
sc->sptrlc_pdev_spectral_init = NULL;
|
||||||
sc->sptrlc_pdev_spectral_deinit = NULL;
|
sc->sptrlc_pdev_spectral_deinit = NULL;
|
||||||
|
sc->sptrlc_psoc_spectral_init = NULL;
|
||||||
|
sc->sptrlc_psoc_spectral_deinit = NULL;
|
||||||
sc->sptrlc_set_spectral_config = NULL;
|
sc->sptrlc_set_spectral_config = NULL;
|
||||||
sc->sptrlc_get_spectral_config = NULL;
|
sc->sptrlc_get_spectral_config = NULL;
|
||||||
sc->sptrlc_start_spectral_scan = NULL;
|
sc->sptrlc_start_spectral_scan = NULL;
|
||||||
|
@@ -93,16 +93,21 @@ struct pdev_spectral {
|
|||||||
uint32_t spectral_pid;
|
uint32_t spectral_pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wmi_spectral_cmd_ops;
|
struct spectral_wmi_ops;
|
||||||
|
struct spectral_tgt_ops;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct spectral_context - spectral global context
|
* struct spectral_context - spectral global context
|
||||||
* @psoc_obj: Reference to psoc global object
|
* @psoc_obj: Reference to psoc global object
|
||||||
|
* @psoc_target_handle: Reference to psoc target_if object
|
||||||
* @spectral_legacy_cbacks: Spectral legacy callbacks
|
* @spectral_legacy_cbacks: Spectral legacy callbacks
|
||||||
*
|
*
|
||||||
* Call back functions to invoke independent of OL/DA
|
* Call back functions to invoke independent of OL/DA
|
||||||
* @sptrlc_ucfg_phyerr_config: ucfg handler for phyerr
|
* @sptrlc_ucfg_phyerr_config: ucfg handler for phyerr
|
||||||
* @sptrlc_pdev_spectral_init: Init spectral
|
* @sptrlc_pdev_spectral_init: Init pdev Spectral
|
||||||
* @sptrlc_pdev_spectral_deinit: Deinit spectral
|
* @sptrlc_pdev_spectral_deinit: Deinit pdev Spectral
|
||||||
|
* @sptrlc_psoc_spectral_init: Spectral psoc init
|
||||||
|
* @sptrlc_psoc_spectral_deinit: Spectral psoc deinit
|
||||||
* @sptrlc_set_spectral_config: Set spectral configurations
|
* @sptrlc_set_spectral_config: Set spectral configurations
|
||||||
* @sptrlc_get_spectral_config: Get spectral configurations
|
* @sptrlc_get_spectral_config: Get spectral configurations
|
||||||
* @sptrlc_start_spectral_scan: Start spectral scan
|
* @sptrlc_start_spectral_scan: Start spectral scan
|
||||||
@@ -113,7 +118,8 @@ struct wmi_spectral_cmd_ops;
|
|||||||
* @sptrlc_get_debug_level: Get debug level
|
* @sptrlc_get_debug_level: Get debug level
|
||||||
* @sptrlc_get_spectral_capinfo: Get spectral capability info
|
* @sptrlc_get_spectral_capinfo: Get spectral capability info
|
||||||
* @sptrlc_get_spectral_diagstats: Get spectral diag status
|
* @sptrlc_get_spectral_diagstats: Get spectral diag status
|
||||||
* @sptrlc_register_wmi_spectral_cmd_ops: Register wmi_spectral_cmd operations
|
* @sptrlc_register_spectral_wmi_ops: Register Spectral WMI operations
|
||||||
|
* @ptrlc_register_spectral_tgt_ops: Register Spectral target operations
|
||||||
* @sptrlc_register_netlink_cb: Register Netlink callbacks
|
* @sptrlc_register_netlink_cb: Register Netlink callbacks
|
||||||
* @sptrlc_use_nl_bcast: Check whether to use Netlink broadcast/unicast
|
* @sptrlc_use_nl_bcast: Check whether to use Netlink broadcast/unicast
|
||||||
* @sptrlc_deregister_netlink_cb: De-register Netlink callbacks
|
* @sptrlc_deregister_netlink_cb: De-register Netlink callbacks
|
||||||
@@ -122,6 +128,7 @@ struct wmi_spectral_cmd_ops;
|
|||||||
*/
|
*/
|
||||||
struct spectral_context {
|
struct spectral_context {
|
||||||
struct wlan_objmgr_psoc *psoc_obj;
|
struct wlan_objmgr_psoc *psoc_obj;
|
||||||
|
void *psoc_target_handle;
|
||||||
struct spectral_legacy_cbacks legacy_cbacks;
|
struct spectral_legacy_cbacks legacy_cbacks;
|
||||||
QDF_STATUS (*sptrlc_spectral_control)
|
QDF_STATUS (*sptrlc_spectral_control)
|
||||||
(struct wlan_objmgr_pdev *pdev,
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
@@ -130,6 +137,8 @@ struct spectral_context {
|
|||||||
void *ad);
|
void *ad);
|
||||||
void * (*sptrlc_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
|
void * (*sptrlc_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
|
||||||
void (*sptrlc_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev);
|
void (*sptrlc_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev);
|
||||||
|
void * (*sptrlc_psoc_spectral_init)(struct wlan_objmgr_psoc *psoc);
|
||||||
|
void (*sptrlc_psoc_spectral_deinit)(struct wlan_objmgr_psoc *psoc);
|
||||||
QDF_STATUS (*sptrlc_set_spectral_config)
|
QDF_STATUS (*sptrlc_set_spectral_config)
|
||||||
(struct wlan_objmgr_pdev *pdev,
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
const struct spectral_cp_param *param,
|
const struct spectral_cp_param *param,
|
||||||
@@ -159,9 +168,12 @@ struct spectral_context {
|
|||||||
QDF_STATUS (*sptrlc_get_spectral_diagstats)
|
QDF_STATUS (*sptrlc_get_spectral_diagstats)
|
||||||
(struct wlan_objmgr_pdev *pdev,
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_diag_stats *stats);
|
struct spectral_diag_stats *stats);
|
||||||
void (*sptrlc_register_wmi_spectral_cmd_ops)(
|
QDF_STATUS (*sptrlc_register_spectral_wmi_ops)(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_psoc *psoc,
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
struct spectral_wmi_ops *wmi_ops);
|
||||||
|
QDF_STATUS (*sptrlc_register_spectral_tgt_ops)(
|
||||||
|
struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops);
|
||||||
void (*sptrlc_register_netlink_cb)(
|
void (*sptrlc_register_netlink_cb)(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_nl_cb *nl_cb);
|
struct spectral_nl_cb *nl_cb);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011,2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011,2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -26,6 +26,14 @@
|
|||||||
|
|
||||||
MODULE_LICENSE("Dual BSD/GPL");
|
MODULE_LICENSE("Dual BSD/GPL");
|
||||||
|
|
||||||
|
struct dispatcher_spectral_ops sops = {
|
||||||
|
.spectral_pdev_open_handler = spectral_pdev_open,
|
||||||
|
.spectral_psoc_open_handler = wlan_spectral_psoc_open,
|
||||||
|
.spectral_psoc_close_handler = wlan_spectral_psoc_close,
|
||||||
|
.spectral_psoc_enable_handler = wlan_spectral_psoc_enable,
|
||||||
|
.spectral_psoc_disable_handler = wlan_spectral_psoc_disable,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spectral_init_module() - Initialize Spectral module
|
* spectral_init_module() - Initialize Spectral module
|
||||||
*
|
*
|
||||||
@@ -43,9 +51,7 @@ int spectral_init_module(void)
|
|||||||
/* register spectral rxops */
|
/* register spectral rxops */
|
||||||
wlan_lmac_if_sptrl_set_rx_ops_register_cb
|
wlan_lmac_if_sptrl_set_rx_ops_register_cb
|
||||||
(wlan_lmac_if_sptrl_register_rx_ops);
|
(wlan_lmac_if_sptrl_register_rx_ops);
|
||||||
/* register spectral pdev open handler */
|
dispatcher_register_spectral_ops_handler(&sops);
|
||||||
dispatcher_register_spectral_pdev_open_handler(
|
|
||||||
spectral_pdev_open);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -48,6 +48,8 @@ spectral_ctx_init_ol(struct spectral_context *sc)
|
|||||||
sc->sptrlc_spectral_control = tgt_spectral_control;
|
sc->sptrlc_spectral_control = tgt_spectral_control;
|
||||||
sc->sptrlc_pdev_spectral_init = tgt_pdev_spectral_init;
|
sc->sptrlc_pdev_spectral_init = tgt_pdev_spectral_init;
|
||||||
sc->sptrlc_pdev_spectral_deinit = tgt_pdev_spectral_deinit;
|
sc->sptrlc_pdev_spectral_deinit = tgt_pdev_spectral_deinit;
|
||||||
|
sc->sptrlc_psoc_spectral_init = tgt_psoc_spectral_init;
|
||||||
|
sc->sptrlc_psoc_spectral_deinit = tgt_psoc_spectral_deinit;
|
||||||
sc->sptrlc_set_spectral_config = tgt_set_spectral_config;
|
sc->sptrlc_set_spectral_config = tgt_set_spectral_config;
|
||||||
sc->sptrlc_get_spectral_config = tgt_get_spectral_config;
|
sc->sptrlc_get_spectral_config = tgt_get_spectral_config;
|
||||||
sc->sptrlc_start_spectral_scan = tgt_start_spectral_scan;
|
sc->sptrlc_start_spectral_scan = tgt_start_spectral_scan;
|
||||||
@@ -58,8 +60,8 @@ spectral_ctx_init_ol(struct spectral_context *sc)
|
|||||||
sc->sptrlc_get_debug_level = tgt_get_debug_level;
|
sc->sptrlc_get_debug_level = tgt_get_debug_level;
|
||||||
sc->sptrlc_get_spectral_capinfo = tgt_get_spectral_capinfo;
|
sc->sptrlc_get_spectral_capinfo = tgt_get_spectral_capinfo;
|
||||||
sc->sptrlc_get_spectral_diagstats = tgt_get_spectral_diagstats;
|
sc->sptrlc_get_spectral_diagstats = tgt_get_spectral_diagstats;
|
||||||
sc->sptrlc_register_wmi_spectral_cmd_ops =
|
sc->sptrlc_register_spectral_wmi_ops = tgt_register_spectral_wmi_ops;
|
||||||
tgt_register_wmi_spectral_cmd_ops;
|
sc->sptrlc_register_spectral_tgt_ops = tgt_register_spectral_tgt_ops;
|
||||||
sc->sptrlc_register_netlink_cb = tgt_spectral_register_nl_cb;
|
sc->sptrlc_register_netlink_cb = tgt_spectral_register_nl_cb;
|
||||||
sc->sptrlc_use_nl_bcast = tgt_spectral_use_nl_bcast;
|
sc->sptrlc_use_nl_bcast = tgt_spectral_use_nl_bcast;
|
||||||
sc->sptrlc_deregister_netlink_cb = tgt_spectral_deregister_nl_cb;
|
sc->sptrlc_deregister_netlink_cb = tgt_spectral_deregister_nl_cb;
|
||||||
|
@@ -25,15 +25,26 @@
|
|||||||
#include "../../core/spectral_cmn_api_i.h"
|
#include "../../core/spectral_cmn_api_i.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tgt_get_target_handle() - Get target_if handle
|
* tgt_get_pdev_target_handle() - Get pdev target_if handle
|
||||||
* @pdev: Pointer to pdev
|
* @pdev: Pointer to pdev
|
||||||
*
|
*
|
||||||
* Get handle to target_if internal Spectral data
|
* Get handle to pdev target_if internal Spectral data
|
||||||
*
|
*
|
||||||
* Return: Handle to target_if internal Spectral data on success, NULL on
|
* Return: Handle to pdev target_if internal Spectral data on success, NULL on
|
||||||
* failure
|
* failure
|
||||||
*/
|
*/
|
||||||
void *tgt_get_target_handle(struct wlan_objmgr_pdev *pdev);
|
void *tgt_get_pdev_target_handle(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_get_psoc_target_handle() - Get psoc target_if handle
|
||||||
|
* @psoc: Pointer to psoc
|
||||||
|
*
|
||||||
|
* Get handle to psoc target_if internal Spectral data
|
||||||
|
*
|
||||||
|
* Return: Handle to psoc target_if internal Spectral data on success, NULL on
|
||||||
|
* failure
|
||||||
|
*/
|
||||||
|
void *tgt_get_psoc_target_handle(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tgt_spectral_control()- handler for demultiplexing requests from higher layer
|
* tgt_spectral_control()- handler for demultiplexing requests from higher layer
|
||||||
@@ -65,6 +76,23 @@ void *tgt_pdev_spectral_init(struct wlan_objmgr_pdev *pdev);
|
|||||||
*/
|
*/
|
||||||
void tgt_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev);
|
void tgt_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_psoc_spectral_init() - implementation for spectral init
|
||||||
|
* @psoc: Pointer to psoc
|
||||||
|
*
|
||||||
|
* Return: On success, pointer to Spectral psoc target_if internal private data,
|
||||||
|
* on failure, NULL
|
||||||
|
*/
|
||||||
|
void *tgt_psoc_spectral_init(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_psoc_spectral_deinit() - implementation for spectral de-init
|
||||||
|
* @psoc: Pointer to psoc
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void tgt_psoc_spectral_deinit(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tgt_set_spectral_config() - Set spectral config
|
* tgt_set_spectral_config() - Set spectral config
|
||||||
* @pdev: Pointer to pdev object
|
* @pdev: Pointer to pdev object
|
||||||
@@ -195,17 +223,30 @@ QDF_STATUS tgt_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
|||||||
struct spectral_diag_stats *stats);
|
struct spectral_diag_stats *stats);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tgt_register_wmi_spectral_cmd_ops() - Register wmi_spectral_cmd_ops
|
* tgt_register_spectral_wmi_ops() - Register Spectral WMI operations
|
||||||
* @cmd_ops: Pointer to the structure having wmi_spectral_cmd function pointers
|
* @psoc: Pointer to psoc bject
|
||||||
* @pdev: Pointer to pdev object
|
* @wmi_ops: Pointer to the structure having Spectral WMI operations
|
||||||
*
|
*
|
||||||
* Implementation to register wmi_spectral_cmd_ops in spectral
|
* Implementation to register Spectral WMI operations in spectral
|
||||||
* internal data structure
|
* internal data structure
|
||||||
*
|
*
|
||||||
* Return: void
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
void tgt_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS tgt_register_spectral_wmi_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
struct spectral_wmi_ops *wmi_ops);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_register_spectral_tgt_ops() - Register Spectral target operations
|
||||||
|
* @psoc: Pointer to psoc bject
|
||||||
|
* @tgt_ops: Pointer to the structure having Spectral target operations
|
||||||
|
*
|
||||||
|
* Implementation to register Spectral target operations in spectral
|
||||||
|
* internal data structure
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS tgt_register_spectral_tgt_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tgt_spectral_register_nl_cb() - Register Netlink callbacks
|
* tgt_spectral_register_nl_cb() - Register Netlink callbacks
|
||||||
@@ -283,4 +324,22 @@ tgt_spectral_get_target_type(struct wlan_objmgr_psoc *psoc);
|
|||||||
QDF_STATUS tgt_set_spectral_dma_debug(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS tgt_set_spectral_dma_debug(struct wlan_objmgr_pdev *pdev,
|
||||||
enum spectral_dma_debug dma_debug_type,
|
enum spectral_dma_debug dma_debug_type,
|
||||||
bool dma_debug_enable);
|
bool dma_debug_enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_spectral_register_events() - Register Spectral WMI event handlers
|
||||||
|
* @psoc: Pointer to psoc object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS of operation
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
tgt_spectral_register_events(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_spectral_unregister_events() - Unregister Spectral WMI event handlers
|
||||||
|
* @psoc: Pointer to psoc object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS of operation
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
tgt_spectral_unregister_events(struct wlan_objmgr_psoc *psoc);
|
||||||
#endif /* _WLAN_SPECTRAL_TGT_API_H_ */
|
#endif /* _WLAN_SPECTRAL_TGT_API_H_ */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
|
|
||||||
/* Forward declaration */
|
/* Forward declaration */
|
||||||
struct direct_buf_rx_data;
|
struct direct_buf_rx_data;
|
||||||
struct wmi_spectral_cmd_ops;
|
struct spectral_wmi_ops;
|
||||||
|
struct spectral_tgt_ops;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_spectral_is_feature_disabled() - Check if spectral feature is disabled
|
* wlan_spectral_is_feature_disabled() - Check if spectral feature is disabled
|
||||||
@@ -71,19 +72,32 @@ void
|
|||||||
wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
|
wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_register_wmi_spectral_cmd_ops() - Register operations related to wmi
|
* wlan_register_spectral_wmi_ops() - Register Spectral WMI operations
|
||||||
* commands on spectral parameters
|
* @psoc - Pointer to psoc object
|
||||||
* @pdev - the physical device object
|
* @wmi_ops - pointer to the structure holding the Spectral WMI
|
||||||
* @cmd_ops - pointer to the structure holding the operations
|
* operations
|
||||||
* related to wmi commands on spectral parameters
|
*
|
||||||
*
|
* API to register Spectral WMI operations
|
||||||
* API to register operations related to wmi commands on spectral parameters
|
*
|
||||||
*
|
* Return: QDF_STATUS
|
||||||
* Return: None
|
|
||||||
*/
|
*/
|
||||||
void
|
QDF_STATUS
|
||||||
wlan_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
|
wlan_register_spectral_wmi_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
struct spectral_wmi_ops *wmi_ops);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_register_spectral_tgt_ops() - Register Spectral target operations
|
||||||
|
* @psoc - Pointer to psoc object
|
||||||
|
* @tgt_ops - pointer to the structure holding the Spectral target
|
||||||
|
* operations
|
||||||
|
*
|
||||||
|
* API to register Spectral target operations
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_register_spectral_tgt_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct spectral_legacy_cbacks - Spectral legacy callbacks
|
* struct spectral_legacy_cbacks - Spectral legacy callbacks
|
||||||
@@ -164,6 +178,50 @@ spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev);
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS spectral_pdev_open(struct wlan_objmgr_pdev *pdev);
|
QDF_STATUS spectral_pdev_open(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_open() - Spectral psoc open handler
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to execute operations on psoc open
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_spectral_psoc_open(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_close() - Spectral psoc close handler
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to execute operations on psoc close
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_spectral_psoc_close(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_enable() - Spectral psoc enable handler
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to execute operations on psoc enable
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_spectral_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_disable() - Spectral psoc disable handler
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to execute operations on psoc disable
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_spectral_psoc_disable(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spectral_register_dbr() - register Spectral event handler with DDMA
|
* spectral_register_dbr() - register Spectral event handler with DDMA
|
||||||
* @pdev: pointer to pdev object
|
* @pdev: pointer to pdev object
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void *
|
void *
|
||||||
tgt_get_target_handle(struct wlan_objmgr_pdev *pdev)
|
tgt_get_pdev_target_handle(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct pdev_spectral *ps;
|
struct pdev_spectral *ps;
|
||||||
|
|
||||||
@@ -46,6 +46,26 @@ tgt_get_target_handle(struct wlan_objmgr_pdev *pdev)
|
|||||||
return ps->psptrl_target_handle;
|
return ps->psptrl_target_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
tgt_get_psoc_target_handle(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct spectral_context *sc;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is NULL!");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_SPECTRAL);
|
||||||
|
if (!sc) {
|
||||||
|
spectral_err("psoc Spectral object is NULL!");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sc->psoc_target_handle;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
tgt_spectral_control(
|
tgt_spectral_control(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
@@ -84,6 +104,29 @@ tgt_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
|
|||||||
psoc->soc_cb.tx_ops.sptrl_tx_ops.sptrlto_pdev_spectral_deinit(pdev);
|
psoc->soc_cb.tx_ops.sptrl_tx_ops.sptrlto_pdev_spectral_deinit(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
tgt_psoc_spectral_init(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return psoc->soc_cb.tx_ops.sptrl_tx_ops.sptrlto_psoc_spectral_init(
|
||||||
|
psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tgt_psoc_spectral_deinit(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc->soc_cb.tx_ops.sptrl_tx_ops.sptrlto_psoc_spectral_deinit(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
tgt_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
tgt_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||||
const struct spectral_cp_param *param,
|
const struct spectral_cp_param *param,
|
||||||
@@ -199,20 +242,47 @@ tgt_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
|||||||
pdev, stats);
|
pdev, stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
QDF_STATUS
|
||||||
tgt_register_wmi_spectral_cmd_ops(
|
tgt_register_spectral_wmi_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct spectral_wmi_ops *wmi_ops)
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
|
||||||
{
|
{
|
||||||
struct wlan_objmgr_psoc *psoc = NULL;
|
|
||||||
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops = NULL;
|
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops = NULL;
|
||||||
|
|
||||||
psoc = wlan_pdev_get_psoc(pdev);
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wmi_ops) {
|
||||||
|
spectral_err("WMI operations table is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||||
|
|
||||||
return psptrl_tx_ops->sptrlto_register_wmi_spectral_cmd_ops(pdev,
|
return psptrl_tx_ops->sptrlto_register_spectral_wmi_ops(psoc, wmi_ops);
|
||||||
cmd_ops);
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
tgt_register_spectral_tgt_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops)
|
||||||
|
{
|
||||||
|
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tgt_ops) {
|
||||||
|
spectral_err("Target operations table is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||||
|
|
||||||
|
return psptrl_tx_ops->sptrlto_register_spectral_tgt_ops(psoc,
|
||||||
|
tgt_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -393,3 +463,34 @@ QDF_STATUS tgt_set_spectral_dma_debug(struct wlan_objmgr_pdev *pdev,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
tgt_spectral_register_events(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||||
|
|
||||||
|
return psptrl_tx_ops->sptrlto_register_events(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
tgt_spectral_unregister_events(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||||
|
|
||||||
|
return psptrl_tx_ops->sptrlto_unregister_events(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -193,7 +193,10 @@ wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
|||||||
struct wlan_lmac_if_sptrl_rx_ops *sptrl_rx_ops = &rx_ops->sptrl_rx_ops;
|
struct wlan_lmac_if_sptrl_rx_ops *sptrl_rx_ops = &rx_ops->sptrl_rx_ops;
|
||||||
|
|
||||||
/* Spectral rx ops */
|
/* Spectral rx ops */
|
||||||
sptrl_rx_ops->sptrlro_get_target_handle = tgt_get_target_handle;
|
sptrl_rx_ops->sptrlro_get_pdev_target_handle =
|
||||||
|
tgt_get_pdev_target_handle;
|
||||||
|
sptrl_rx_ops->sptrlro_get_psoc_target_handle =
|
||||||
|
tgt_get_psoc_target_handle;
|
||||||
sptrl_rx_ops->sptrlro_vdev_get_chan_freq = spectral_vdev_get_chan_freq;
|
sptrl_rx_ops->sptrlro_vdev_get_chan_freq = spectral_vdev_get_chan_freq;
|
||||||
sptrl_rx_ops->sptrlro_vdev_get_chan_freq_seg2 =
|
sptrl_rx_ops->sptrlro_vdev_get_chan_freq_seg2 =
|
||||||
spectral_vdev_get_chan_freq_seg2;
|
spectral_vdev_get_chan_freq_seg2;
|
||||||
@@ -204,26 +207,122 @@ wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
|||||||
wlan_spectral_is_feature_disabled;
|
wlan_spectral_is_feature_disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
QDF_STATUS
|
||||||
wlan_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
|
wlan_register_spectral_wmi_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
struct spectral_wmi_ops *wmi_ops)
|
||||||
{
|
{
|
||||||
struct spectral_context *sc;
|
struct spectral_context *sc;
|
||||||
|
|
||||||
if (!pdev) {
|
if (!psoc) {
|
||||||
spectral_err("PDEV is NULL!");
|
spectral_err("psoc is NULL!");
|
||||||
return;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = spectral_get_spectral_ctx_from_pdev(pdev);
|
sc = spectral_get_spectral_ctx_from_psoc(psoc);
|
||||||
if (!sc) {
|
if (!sc) {
|
||||||
spectral_err("spectral context is NULL!");
|
spectral_err("spectral context is NULL!");
|
||||||
return;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sc->sptrlc_register_wmi_spectral_cmd_ops(pdev, cmd_ops);
|
return sc->sptrlc_register_spectral_wmi_ops(psoc, wmi_ops);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(wlan_register_spectral_wmi_ops);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_register_spectral_tgt_ops(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops)
|
||||||
|
{
|
||||||
|
struct spectral_context *sc;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is NULL!");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
sc = spectral_get_spectral_ctx_from_psoc(psoc);
|
||||||
|
if (!sc) {
|
||||||
|
spectral_err("spectral context is NULL!");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sc->sptrlc_register_spectral_tgt_ops(psoc, tgt_ops);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(wlan_register_spectral_tgt_ops);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_target_attach() - Spectral psoc target attach
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to initialize Spectral psoc target object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
wlan_spectral_psoc_target_attach(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct spectral_context *sc = NULL;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_SPECTRAL);
|
||||||
|
if (!sc) {
|
||||||
|
spectral_err("Spectral context is null");
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sc->sptrlc_psoc_spectral_init) {
|
||||||
|
void *target_handle;
|
||||||
|
|
||||||
|
target_handle = sc->sptrlc_psoc_spectral_init(psoc);
|
||||||
|
if (!target_handle) {
|
||||||
|
spectral_err("Spectral psoc lmac object is NULL!");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
sc->psoc_target_handle = target_handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_spectral_psoc_target_detach() - Spectral psoc target detach
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* API to destroy Spectral psoc target object
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS upon successful registration,
|
||||||
|
* QDF_STATUS_E_FAILURE upon failure
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
wlan_spectral_psoc_target_detach(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct spectral_context *sc = NULL;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_SPECTRAL);
|
||||||
|
if (!sc) {
|
||||||
|
spectral_err("Spectral context is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sc->sptrlc_psoc_spectral_deinit)
|
||||||
|
sc->sptrlc_psoc_spectral_deinit(psoc);
|
||||||
|
sc->psoc_target_handle = NULL;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(wlan_register_wmi_spectral_cmd_ops);
|
|
||||||
|
|
||||||
#ifdef DIRECT_BUF_RX_ENABLE
|
#ifdef DIRECT_BUF_RX_ENABLE
|
||||||
bool spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
|
bool spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
|
||||||
@@ -283,3 +382,63 @@ QDF_STATUS spectral_unregister_dbr(struct wlan_objmgr_pdev *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(spectral_unregister_dbr);
|
qdf_export_symbol(spectral_unregister_dbr);
|
||||||
|
|
||||||
|
QDF_STATUS wlan_spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wlan_spectral_is_feature_disabled(psoc)) {
|
||||||
|
spectral_info("Spectral is disabled");
|
||||||
|
return QDF_STATUS_COMP_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wlan_spectral_psoc_target_attach(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wlan_spectral_is_feature_disabled(psoc)) {
|
||||||
|
spectral_info("Spectral is disabled");
|
||||||
|
return QDF_STATUS_COMP_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wlan_spectral_psoc_target_detach(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wlan_spectral_is_feature_disabled(psoc)) {
|
||||||
|
spectral_info("Spectral is disabled");
|
||||||
|
return QDF_STATUS_COMP_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return tgt_spectral_register_events(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wlan_spectral_is_feature_disabled(psoc)) {
|
||||||
|
spectral_info("Spectral is disabled");
|
||||||
|
return QDF_STATUS_COMP_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return tgt_spectral_unregister_events(psoc);
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <spectral_defs_i.h>
|
#include <spectral_defs_i.h>
|
||||||
|
#include <wmi_unified_param.h>
|
||||||
|
|
||||||
#define FREQ_OFFSET_10MHZ (10)
|
#define FREQ_OFFSET_10MHZ (10)
|
||||||
#define FREQ_OFFSET_40MHZ (40)
|
#define FREQ_OFFSET_40MHZ (40)
|
||||||
@@ -501,31 +502,6 @@ struct spectral_fft_bin_len_adj_swar {
|
|||||||
enum spectral_fftbin_size_war fftbin_size_war;
|
enum spectral_fftbin_size_war fftbin_size_war;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* struct spectral_fft_bin_markers_165mhz - Stores the start index and length of
|
|
||||||
* FFT bins in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @start_pri80: Starting index of FFT bins corresponding to primary 80 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @num_pri80: Number of FFT bins corresponding to primary 80 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @start_5mhz: Starting index of FFT bins corresponding to extra 5 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @num_5mhz: Number of FFT bins corresponding to extra 5 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @start_sec80: Starting index of FFT bins corresponding to secondary 80 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
* @num_sec80: Number of FFT bins corresponding to secondary 80 MHz
|
|
||||||
* in 165 MHz/Restricted 80p80 mode
|
|
||||||
*/
|
|
||||||
struct spectral_fft_bin_markers_165mhz {
|
|
||||||
size_t start_pri80;
|
|
||||||
size_t num_pri80;
|
|
||||||
size_t start_5mhz;
|
|
||||||
size_t num_5mhz;
|
|
||||||
size_t start_sec80;
|
|
||||||
size_t num_sec80;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct spectral_report_params - Parameters related to format of Spectral
|
* struct spectral_report_params - Parameters related to format of Spectral
|
||||||
* report.
|
* report.
|
||||||
@@ -551,8 +527,8 @@ struct spectral_report_params {
|
|||||||
enum phy_ch_width max_agile_ch_width;
|
enum phy_ch_width max_agile_ch_width;
|
||||||
enum spectral_scan_mode detid_mode_table[SPECTRAL_DETECTOR_ID_MAX];
|
enum spectral_scan_mode detid_mode_table[SPECTRAL_DETECTOR_ID_MAX];
|
||||||
uint8_t num_spectral_detectors;
|
uint8_t num_spectral_detectors;
|
||||||
struct spectral_fft_bin_markers_165mhz
|
struct spectral_fft_bin_markers_160_165mhz
|
||||||
marker[SPECTRAL_REPORT_MODE_MAX][SPECTRAL_FFT_SIZE_MAX];
|
marker[SPECTRAL_SCAN_MODE_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -846,21 +822,49 @@ struct vdev_spectral_configure_params;
|
|||||||
struct vdev_spectral_enable_params;
|
struct vdev_spectral_enable_params;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wmi_spectral_cmd_ops - structure used holding the operations
|
* struct spectral_wmi_ops - structure used holding the operations
|
||||||
* related to wmi commands on spectral parameters.
|
* related to Spectral WMI
|
||||||
* @wmi_spectral_configure_cmd_send: Configure Spectral parameters
|
* @wmi_spectral_configure_cmd_send: Configure Spectral parameters
|
||||||
* @wmi_spectral_enable_cmd_send: Enable/Disable Spectral
|
* @wmi_spectral_enable_cmd_send: Enable/Disable Spectral
|
||||||
* @wmi_spectral_crash_inject: Inject FW crash
|
* @wmi_spectral_crash_inject: Inject FW crash
|
||||||
|
* @wmi_extract_pdev_sscan_fw_cmd_fixed_param: Extract Fixed params from
|
||||||
|
* start scan response event
|
||||||
|
* @wmi_extract_pdev_sscan_fft_bin_index: Extract TLV which describes FFT
|
||||||
|
* bin indices from start scan response event
|
||||||
|
* @wmi_unified_register_event_handler: Register WMI event handler
|
||||||
|
* @wmi_unified_unregister_event_handler: Unregister WMI event handler
|
||||||
*/
|
*/
|
||||||
struct wmi_spectral_cmd_ops {
|
struct spectral_wmi_ops {
|
||||||
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
|
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
|
||||||
wmi_unified_t wmi_hdl,
|
wmi_unified_t wmi_hdl,
|
||||||
struct vdev_spectral_configure_params *param);
|
struct vdev_spectral_configure_params *param);
|
||||||
QDF_STATUS (*wmi_spectral_enable_cmd_send)(
|
QDF_STATUS (*wmi_spectral_enable_cmd_send)(
|
||||||
wmi_unified_t wmi_hdl,
|
wmi_unified_t wmi_hdl,
|
||||||
struct vdev_spectral_enable_params *param);
|
struct vdev_spectral_enable_params *param);
|
||||||
QDF_STATUS(*wmi_spectral_crash_inject)(
|
QDF_STATUS (*wmi_spectral_crash_inject)(
|
||||||
wmi_unified_t wmi_handle, struct crash_inject *param);
|
wmi_unified_t wmi_handle, struct crash_inject *param);
|
||||||
|
QDF_STATUS (*wmi_extract_pdev_sscan_fw_cmd_fixed_param)(
|
||||||
|
wmi_unified_t wmi_handle, uint8_t *evt_buf,
|
||||||
|
struct spectral_startscan_resp_params *param);
|
||||||
|
QDF_STATUS (*wmi_extract_pdev_sscan_fft_bin_index)(
|
||||||
|
wmi_unified_t wmi_handle, uint8_t *evt_buf,
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *param);
|
||||||
|
int (*wmi_unified_register_event_handler)(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
wmi_conv_event_id event_id,
|
||||||
|
wmi_unified_event_handler handler_func,
|
||||||
|
uint8_t rx_ctx);
|
||||||
|
int (*wmi_unified_unregister_event_handler)(wmi_unified_t wmi_handle,
|
||||||
|
wmi_conv_event_id event_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct spectral_tgt_ops - structure used holding the operations
|
||||||
|
* related to target operations
|
||||||
|
* @tgt_get_psoc_from_scn_hdl: Function to get psoc from scn
|
||||||
|
*/
|
||||||
|
struct spectral_tgt_ops {
|
||||||
|
struct wlan_objmgr_psoc *(*tgt_get_psoc_from_scn_hdl)(void *scn_handle);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1067,7 +1071,6 @@ struct target_if_spectral {
|
|||||||
uint8_t tag_sscan_summary_exp;
|
uint8_t tag_sscan_summary_exp;
|
||||||
uint8_t tag_sscan_fft_exp;
|
uint8_t tag_sscan_fft_exp;
|
||||||
uint8_t tlvhdr_size;
|
uint8_t tlvhdr_size;
|
||||||
struct wmi_spectral_cmd_ops param_wmi_cmd_ops;
|
|
||||||
struct spectral_nl_cb nl_cb;
|
struct spectral_nl_cb nl_cb;
|
||||||
bool use_nl_bcast;
|
bool use_nl_bcast;
|
||||||
int (*send_phy_data)(struct wlan_objmgr_pdev *pdev,
|
int (*send_phy_data)(struct wlan_objmgr_pdev *pdev,
|
||||||
@@ -1084,6 +1087,16 @@ struct target_if_spectral {
|
|||||||
struct spectral_param_min_max param_min_max;
|
struct spectral_param_min_max param_min_max;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct target_if_psoc_spectral - Target if psoc Spectral object
|
||||||
|
* @psoc_obj: psoc object
|
||||||
|
* @wmi_ops: Spectral WMI operations
|
||||||
|
*/
|
||||||
|
struct target_if_psoc_spectral {
|
||||||
|
struct wlan_objmgr_psoc *psoc_obj;
|
||||||
|
struct spectral_wmi_ops wmi_ops;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct target_if_samp_msg_params - Spectral Analysis Messaging Protocol
|
* struct target_if_samp_msg_params - Spectral Analysis Messaging Protocol
|
||||||
* data format
|
* data format
|
||||||
@@ -1428,11 +1441,37 @@ struct target_if_spectral *get_target_if_spectral_handle_from_pdev(
|
|||||||
}
|
}
|
||||||
|
|
||||||
spectral = (struct target_if_spectral *)
|
spectral = (struct target_if_spectral *)
|
||||||
psoc->soc_cb.rx_ops.sptrl_rx_ops.sptrlro_get_target_handle(
|
psoc->soc_cb.rx_ops.sptrl_rx_ops.sptrlro_get_pdev_target_handle(
|
||||||
pdev);
|
pdev);
|
||||||
return spectral;
|
return spectral;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get_target_if_spectral_handle_from_psoc() - Get handle to psoc target_if
|
||||||
|
* internal Spectral data
|
||||||
|
* @psoc: Pointer to psoc
|
||||||
|
*
|
||||||
|
* Return: Handle to target_if psoc internal Spectral data on success, NULL on
|
||||||
|
* failure
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
struct target_if_psoc_spectral *get_target_if_spectral_handle_from_psoc(
|
||||||
|
struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct target_if_psoc_spectral *psoc_spectral;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc_spectral = (struct target_if_psoc_spectral *)
|
||||||
|
psoc->soc_cb.rx_ops.sptrl_rx_ops.sptrlro_get_psoc_target_handle(
|
||||||
|
psoc);
|
||||||
|
|
||||||
|
return psoc_spectral;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* target_if_vdev_get_chan_freq() - Get the operating channel frequency of a
|
* target_if_vdev_get_chan_freq() - Get the operating channel frequency of a
|
||||||
* given vdev
|
* given vdev
|
||||||
@@ -2148,10 +2187,6 @@ QDF_STATUS target_if_get_spectral_capinfo(struct wlan_objmgr_pdev *pdev,
|
|||||||
QDF_STATUS target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_diag_stats *stats);
|
struct spectral_diag_stats *stats);
|
||||||
|
|
||||||
void target_if_register_wmi_spectral_cmd_ops(
|
|
||||||
struct wlan_objmgr_pdev *pdev,
|
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
target_if_160mhz_delivery_state_change(struct target_if_spectral *spectral,
|
target_if_160mhz_delivery_state_change(struct target_if_spectral *spectral,
|
||||||
enum spectral_scan_mode smode,
|
enum spectral_scan_mode smode,
|
||||||
|
@@ -78,6 +78,8 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
|
|||||||
spec_samp_msg->agile_freq2 = params->agile_freq2;
|
spec_samp_msg->agile_freq2 = params->agile_freq2;
|
||||||
}
|
}
|
||||||
spec_samp_msg->freq_loading = params->freq_loading;
|
spec_samp_msg->freq_loading = params->freq_loading;
|
||||||
|
spec_samp_msg->vhtop_ch_freq_seg1 = params->vhtop_ch_freq_seg1;
|
||||||
|
spec_samp_msg->vhtop_ch_freq_seg2 = params->vhtop_ch_freq_seg2;
|
||||||
samp_data->spectral_mode = params->smode;
|
samp_data->spectral_mode = params->smode;
|
||||||
samp_data->spectral_data_len = params->datalen;
|
samp_data->spectral_data_len = params->datalen;
|
||||||
samp_data->spectral_rssi = params->rssi;
|
samp_data->spectral_rssi = params->rssi;
|
||||||
@@ -183,8 +185,6 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
|
|||||||
}
|
}
|
||||||
|
|
||||||
samp_data = &spec_samp_msg->samp_data;
|
samp_data = &spec_samp_msg->samp_data;
|
||||||
spec_samp_msg->vhtop_ch_freq_seg1 = params->vhtop_ch_freq_seg1;
|
|
||||||
spec_samp_msg->vhtop_ch_freq_seg2 = params->vhtop_ch_freq_seg2;
|
|
||||||
samp_data->spectral_rssi_sec80 =
|
samp_data->spectral_rssi_sec80 =
|
||||||
params->rssi_sec80;
|
params->rssi_sec80;
|
||||||
samp_data->noise_floor_sec80 =
|
samp_data->noise_floor_sec80 =
|
||||||
|
@@ -161,15 +161,37 @@ target_if_spectral_dump_fft(uint8_t *pfft, int fftlen)
|
|||||||
QDF_STATUS target_if_spectral_fw_hang(struct target_if_spectral *spectral)
|
QDF_STATUS target_if_spectral_fw_hang(struct target_if_spectral *spectral)
|
||||||
{
|
{
|
||||||
struct crash_inject param;
|
struct crash_inject param;
|
||||||
|
struct wlan_objmgr_pdev *pdev;
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
struct target_if_psoc_spectral *psoc_spectral;
|
||||||
|
|
||||||
if (!spectral) {
|
if (!spectral) {
|
||||||
spectral_err("Spectral LMAC object is null");
|
spectral_err("Spectral LMAC object is null");
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pdev = spectral->pdev_obj;
|
||||||
|
if (!pdev) {
|
||||||
|
spectral_err("pdev is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc = wlan_pdev_get_psoc(pdev);
|
||||||
|
if (!psoc) {
|
||||||
|
spectral_err("psoc is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc_spectral = get_target_if_spectral_handle_from_psoc(psoc);
|
||||||
|
if (!psoc_spectral) {
|
||||||
|
spectral_err("spectral psoc object is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
qdf_mem_set(¶m, sizeof(param), 0);
|
qdf_mem_set(¶m, sizeof(param), 0);
|
||||||
param.type = 1; //RECOVERY_SIM_ASSERT
|
param.type = 1; //RECOVERY_SIM_ASSERT
|
||||||
|
|
||||||
return spectral->param_wmi_cmd_ops.wmi_spectral_crash_inject(
|
return psoc_spectral->wmi_ops.wmi_spectral_crash_inject(
|
||||||
GET_WMI_HDL_FROM_PDEV(spectral->pdev_obj), ¶m);
|
GET_WMI_HDL_FROM_PDEV(spectral->pdev_obj), ¶m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1984,6 +2006,7 @@ target_if_consume_spectral_report_gen3(
|
|||||||
[spectral_mode]) && !spectral->rparams.
|
[spectral_mode]) && !spectral->rparams.
|
||||||
fragmentation_160[spectral_mode]) {
|
fragmentation_160[spectral_mode]) {
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *marker;
|
||||||
|
|
||||||
qdf_assert_always(spectral->pdev_obj);
|
qdf_assert_always(spectral->pdev_obj);
|
||||||
psoc = wlan_pdev_get_psoc(spectral->pdev_obj);
|
psoc = wlan_pdev_get_psoc(spectral->pdev_obj);
|
||||||
@@ -2000,34 +2023,21 @@ target_if_consume_spectral_report_gen3(
|
|||||||
params.max_mag_sec80 = p_sfft->fft_peak_mag;
|
params.max_mag_sec80 = p_sfft->fft_peak_mag;
|
||||||
params.datalen = fft_hdr_length * 2;
|
params.datalen = fft_hdr_length * 2;
|
||||||
params.datalen_sec80 = fft_hdr_length * 2;
|
params.datalen_sec80 = fft_hdr_length * 2;
|
||||||
if (spectral->ch_width[spectral_mode] ==
|
|
||||||
CH_WIDTH_80P80MHZ && wlan_psoc_nif_fw_ext_cap_get(
|
|
||||||
psoc, WLAN_SOC_RESTRICTED_80P80_SUPPORT)) {
|
|
||||||
struct spectral_fft_bin_markers_165mhz *marker;
|
|
||||||
enum spectral_report_mode rpt_mode;
|
|
||||||
enum spectral_fft_size fft_size;
|
|
||||||
|
|
||||||
rpt_mode = spectral->params[spectral_mode].
|
marker = &spectral->rparams.marker[spectral_mode];
|
||||||
ss_rpt_mode;
|
qdf_assert_always(marker->is_valid);
|
||||||
fft_size = spectral->params[spectral_mode].
|
|
||||||
ss_fft_size;
|
|
||||||
marker = &spectral->rparams.marker
|
|
||||||
[rpt_mode][fft_size];
|
|
||||||
params.bin_pwr_data = temp +
|
params.bin_pwr_data = temp +
|
||||||
marker->start_pri80 * fft_bin_size;
|
marker->start_pri80 * fft_bin_size;
|
||||||
params.pwr_count = marker->num_pri80;
|
params.pwr_count = marker->num_pri80;
|
||||||
params.bin_pwr_data_5mhz = temp +
|
|
||||||
marker->start_5mhz * fft_bin_size;
|
|
||||||
params.pwr_count_5mhz = marker->num_5mhz;
|
|
||||||
params.bin_pwr_data_sec80 = temp +
|
params.bin_pwr_data_sec80 = temp +
|
||||||
marker->start_sec80 * fft_bin_size;
|
marker->start_sec80 * fft_bin_size;
|
||||||
params.pwr_count_sec80 = marker->num_sec80;
|
params.pwr_count_sec80 = marker->num_sec80;
|
||||||
} else {
|
if (spectral->ch_width[spectral_mode] ==
|
||||||
params.bin_pwr_data = temp;
|
CH_WIDTH_80P80MHZ && wlan_psoc_nif_fw_ext_cap_get(
|
||||||
params.pwr_count = fft_bin_count / 2;
|
psoc, WLAN_SOC_RESTRICTED_80P80_SUPPORT)) {
|
||||||
params.pwr_count_sec80 = fft_bin_count / 2;
|
params.bin_pwr_data_5mhz = temp +
|
||||||
params.bin_pwr_data_sec80 = temp +
|
marker->start_5mhz * fft_bin_size;
|
||||||
(fft_bin_count / 2) * fft_bin_size;
|
params.pwr_count_5mhz = marker->num_5mhz;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
params.bin_pwr_data = temp;
|
params.bin_pwr_data = temp;
|
||||||
|
@@ -574,11 +574,14 @@ struct wlan_lmac_if_cfr_tx_ops {
|
|||||||
#endif /* WLAN_CFR_ENABLE */
|
#endif /* WLAN_CFR_ENABLE */
|
||||||
|
|
||||||
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
struct wmi_spectral_cmd_ops;
|
struct spectral_wmi_ops;
|
||||||
|
struct spectral_tgt_ops;
|
||||||
/**
|
/**
|
||||||
* struct wlan_lmac_if_sptrl_tx_ops - Spectral south bound Tx operations
|
* struct wlan_lmac_if_sptrl_tx_ops - Spectral south bound Tx operations
|
||||||
* @sptrlto_spectral_init: Initialize LMAC/target_if Spectral
|
* @sptrlto_pdev_spectral_init: Initialize target_if pdev Spectral object
|
||||||
* @sptrlto_spectral_deinit: De-initialize LMAC/target_if Spectral
|
* @sptrlto_pdev_spectral_deinit: De-initialize target_if pdev Spectral object
|
||||||
|
* @sptrlto_psoc_spectral_init: Initialize target_if psoc Spectral object
|
||||||
|
* @sptrlto_psoc_spectral_deinit: De-initialize target_if psoc Spectral object
|
||||||
* @sptrlto_set_spectral_config: Set Spectral configuration
|
* @sptrlto_set_spectral_config: Set Spectral configuration
|
||||||
* @sptrlto_get_spectral_config: Get Spectral configuration
|
* @sptrlto_get_spectral_config: Get Spectral configuration
|
||||||
* @sptrlto_start_spectral_scan: Start Spectral Scan
|
* @sptrlto_start_spectral_scan: Start Spectral Scan
|
||||||
@@ -595,6 +598,8 @@ struct wmi_spectral_cmd_ops;
|
|||||||
* @sptrlto_clear_chaninfo: Clear channel information
|
* @sptrlto_clear_chaninfo: Clear channel information
|
||||||
* @sptrlto_get_spectral_capinfo: Get Spectral capability information
|
* @sptrlto_get_spectral_capinfo: Get Spectral capability information
|
||||||
* @sptrlto_get_spectral_diagstats: Get Spectral diagnostic statistics
|
* @sptrlto_get_spectral_diagstats: Get Spectral diagnostic statistics
|
||||||
|
* @sptrlto_register_spectral_wmi_ops: Register Spectral WMI operations
|
||||||
|
* @sptrlto_register_spectral_tgt_ops: Register Spectral target operations
|
||||||
* @sptrlto_register_netlink_cb: Register Spectral Netlink callbacks
|
* @sptrlto_register_netlink_cb: Register Spectral Netlink callbacks
|
||||||
* @sptrlto_use_nl_bcast: Get whether to use Netlink broadcast/unicast
|
* @sptrlto_use_nl_bcast: Get whether to use Netlink broadcast/unicast
|
||||||
* @sptrlto_deregister_netlink_cb: De-register Spectral Netlink callbacks
|
* @sptrlto_deregister_netlink_cb: De-register Spectral Netlink callbacks
|
||||||
@@ -605,10 +610,14 @@ struct wmi_spectral_cmd_ops;
|
|||||||
* on the previous state
|
* on the previous state
|
||||||
* @sptrlto_check_and_do_dbr_buff_debug: Start/Stop Spectral buffer debug based
|
* @sptrlto_check_and_do_dbr_buff_debug: Start/Stop Spectral buffer debug based
|
||||||
* on the previous state
|
* on the previous state
|
||||||
|
* @sptrlto_register_events: Registration of WMI events for Spectral
|
||||||
|
* @sptrlto_unregister_events: Unregistration of WMI events for Spectral
|
||||||
**/
|
**/
|
||||||
struct wlan_lmac_if_sptrl_tx_ops {
|
struct wlan_lmac_if_sptrl_tx_ops {
|
||||||
void *(*sptrlto_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
|
void *(*sptrlto_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
|
||||||
void (*sptrlto_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev);
|
void (*sptrlto_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev);
|
||||||
|
void *(*sptrlto_psoc_spectral_init)(struct wlan_objmgr_psoc *psoc);
|
||||||
|
void (*sptrlto_psoc_spectral_deinit)(struct wlan_objmgr_psoc *psoc);
|
||||||
QDF_STATUS (*sptrlto_set_spectral_config)
|
QDF_STATUS (*sptrlto_set_spectral_config)
|
||||||
(struct wlan_objmgr_pdev *pdev,
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
const struct spectral_cp_param *param,
|
const struct spectral_cp_param *param,
|
||||||
@@ -639,9 +648,12 @@ struct wlan_lmac_if_sptrl_tx_ops {
|
|||||||
QDF_STATUS (*sptrlto_get_spectral_diagstats)
|
QDF_STATUS (*sptrlto_get_spectral_diagstats)
|
||||||
(struct wlan_objmgr_pdev *pdev,
|
(struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_diag_stats *stats);
|
struct spectral_diag_stats *stats);
|
||||||
void (*sptrlto_register_wmi_spectral_cmd_ops)(
|
QDF_STATUS (*sptrlto_register_spectral_wmi_ops)(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_psoc *psoc,
|
||||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
struct spectral_wmi_ops *wmi_ops);
|
||||||
|
QDF_STATUS (*sptrlto_register_spectral_tgt_ops)(
|
||||||
|
struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct spectral_tgt_ops *tgt_ops);
|
||||||
void (*sptrlto_register_netlink_cb)(
|
void (*sptrlto_register_netlink_cb)(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_nl_cb *nl_cb);
|
struct spectral_nl_cb *nl_cb);
|
||||||
@@ -659,7 +671,8 @@ struct wlan_lmac_if_sptrl_tx_ops {
|
|||||||
struct wlan_objmgr_pdev *pdev);
|
struct wlan_objmgr_pdev *pdev);
|
||||||
QDF_STATUS (*sptrlto_check_and_do_dbr_buff_debug)(
|
QDF_STATUS (*sptrlto_check_and_do_dbr_buff_debug)(
|
||||||
struct wlan_objmgr_pdev *pdev);
|
struct wlan_objmgr_pdev *pdev);
|
||||||
|
QDF_STATUS (*sptrlto_register_events)(struct wlan_objmgr_psoc *psoc);
|
||||||
|
QDF_STATUS (*sptrlto_unregister_events)(struct wlan_objmgr_psoc *psoc);
|
||||||
};
|
};
|
||||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
@@ -1371,12 +1384,16 @@ struct wlan_lmac_if_cfr_rx_ops {
|
|||||||
/**
|
/**
|
||||||
* struct wlan_lmac_if_sptrl_rx_ops - Spectral south bound Rx operations
|
* struct wlan_lmac_if_sptrl_rx_ops - Spectral south bound Rx operations
|
||||||
*
|
*
|
||||||
* @sptrlro_get_target_handle: Get Spectral handle for target/LMAC private data
|
* @sptrlro_get_pdev_target_handle: Get Spectral handle for pdev target
|
||||||
|
* private data
|
||||||
|
* @sptrlro_get_psoc_target_handle: Get Spectral handle for psoc target
|
||||||
|
* private data
|
||||||
* @sptrlro_vdev_get_chan_freq_seg2: Get secondary 80 center frequency
|
* @sptrlro_vdev_get_chan_freq_seg2: Get secondary 80 center frequency
|
||||||
* @sptrlro_spectral_is_feature_disabled: Check if spectral feature is disabled
|
* @sptrlro_spectral_is_feature_disabled: Check if spectral feature is disabled
|
||||||
*/
|
*/
|
||||||
struct wlan_lmac_if_sptrl_rx_ops {
|
struct wlan_lmac_if_sptrl_rx_ops {
|
||||||
void * (*sptrlro_get_target_handle)(struct wlan_objmgr_pdev *pdev);
|
void * (*sptrlro_get_pdev_target_handle)(struct wlan_objmgr_pdev *pdev);
|
||||||
|
void * (*sptrlro_get_psoc_target_handle)(struct wlan_objmgr_psoc *psoc);
|
||||||
int16_t (*sptrlro_vdev_get_chan_freq)(struct wlan_objmgr_vdev *vdev);
|
int16_t (*sptrlro_vdev_get_chan_freq)(struct wlan_objmgr_vdev *vdev);
|
||||||
int16_t (*sptrlro_vdev_get_chan_freq_seg2)
|
int16_t (*sptrlro_vdev_get_chan_freq_seg2)
|
||||||
(struct wlan_objmgr_vdev *vdev);
|
(struct wlan_objmgr_vdev *vdev);
|
||||||
|
@@ -2026,6 +2026,36 @@ QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(
|
|||||||
wmi_unified_t wmi_handle,
|
wmi_unified_t wmi_handle,
|
||||||
struct vdev_spectral_enable_params *param);
|
struct vdev_spectral_enable_params *param);
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
/**
|
||||||
|
* wmi_extract_pdev_sscan_fw_cmd_fixed_param() - Extract fixed params
|
||||||
|
* from start scan response event
|
||||||
|
* @wmi_handle: handle to WMI.
|
||||||
|
* @evt_buf: Event buffer
|
||||||
|
* @param: pointer to hold fixed params from fw params event
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_pdev_sscan_fw_cmd_fixed_param(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_startscan_resp_params *param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_extract_pdev_sscan_fft_bin_index() - Extract FFT bin indexes
|
||||||
|
* from start scan response event
|
||||||
|
* @wmi_handle: handle to WMI.
|
||||||
|
* @evt_buf: Event buffer
|
||||||
|
* @param: pointer to hold FFT bin indexes from fw params event
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_pdev_sscan_fft_bin_index(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *param);
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
#if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
|
#if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
|
||||||
/**
|
/**
|
||||||
* wmi_unified_vdev_fils_enable_cmd_send() - WMI send fils enable command
|
* wmi_unified_vdev_fils_enable_cmd_send() - WMI send fils enable command
|
||||||
|
@@ -28,6 +28,9 @@
|
|||||||
#ifdef FEATURE_WLAN_TDLS
|
#ifdef FEATURE_WLAN_TDLS
|
||||||
#include <wlan_tdls_public_structs.h>
|
#include <wlan_tdls_public_structs.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
#include <wlan_spectral_public_structs.h>
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
#define MAC_MAX_KEY_LENGTH 32
|
#define MAC_MAX_KEY_LENGTH 32
|
||||||
#define MAC_PN_LENGTH 8
|
#define MAC_PN_LENGTH 8
|
||||||
@@ -2956,7 +2959,8 @@ struct simulation_test_params {
|
|||||||
* @dbm_adj: DBM adjust
|
* @dbm_adj: DBM adjust
|
||||||
* @chn_mask: chain mask
|
* @chn_mask: chain mask
|
||||||
* @mode: Mode
|
* @mode: Mode
|
||||||
* @center_freq: Center frequency
|
* @center_freq1: Center frequency 1
|
||||||
|
* @center_freq2: Center frequency 2
|
||||||
* @chan_freq: Primary channel frequency
|
* @chan_freq: Primary channel frequency
|
||||||
* @chan_width: Channel width
|
* @chan_width: Channel width
|
||||||
*/
|
*/
|
||||||
@@ -2981,7 +2985,8 @@ struct vdev_spectral_configure_params {
|
|||||||
uint16_t dbm_adj;
|
uint16_t dbm_adj;
|
||||||
uint16_t chn_mask;
|
uint16_t chn_mask;
|
||||||
uint16_t mode;
|
uint16_t mode;
|
||||||
uint16_t center_freq;
|
uint16_t center_freq1;
|
||||||
|
uint16_t center_freq2;
|
||||||
uint16_t chan_freq;
|
uint16_t chan_freq;
|
||||||
uint16_t chan_width;
|
uint16_t chan_width;
|
||||||
};
|
};
|
||||||
@@ -3004,6 +3009,49 @@ struct vdev_spectral_enable_params {
|
|||||||
uint8_t mode;
|
uint8_t mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
/**
|
||||||
|
* struct spectral_fft_bin_markers_160_165mhz - Stores the start index
|
||||||
|
* and length of FFT bins in 165 MHz/Restricted 80p80 or 160 MHz
|
||||||
|
* mode in targets with a single Spectral detector
|
||||||
|
* @is_valid: Indicates whether this structure holds valid data
|
||||||
|
* @start_pri80: Starting index of FFT bins corresponding to primary 80 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 or 160 MHz mode
|
||||||
|
* @num_pri80: Number of FFT bins corresponding to primary 80 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 or 160 MHz mode
|
||||||
|
* @start_5mhz: Starting index of FFT bins corresponding to extra 5 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 mode
|
||||||
|
* @num_5mhz: Number of FFT bins corresponding to extra 5 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 mode
|
||||||
|
* @start_sec80: Starting index of FFT bins corresponding to secondary 80 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 or 160 MHz mode
|
||||||
|
* @num_sec80: Number of FFT bins corresponding to secondary 80 MHz
|
||||||
|
* in 165 MHz/Restricted 80p80 or 160 MHz mode
|
||||||
|
*/
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz {
|
||||||
|
bool is_valid;
|
||||||
|
uint16_t start_pri80;
|
||||||
|
uint16_t num_pri80;
|
||||||
|
uint16_t start_5mhz;
|
||||||
|
uint16_t num_5mhz;
|
||||||
|
uint16_t start_sec80;
|
||||||
|
uint16_t num_sec80;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct spectral_startscan_resp_params - Params from the event send by
|
||||||
|
* FW as a response to the scan start command
|
||||||
|
* @pdev_id: Pdev id
|
||||||
|
* @smode: Spectral scan mode
|
||||||
|
* @num_fft_bin_index: Number of TLVs with FFT bin start and end indices
|
||||||
|
*/
|
||||||
|
struct spectral_startscan_resp_params {
|
||||||
|
uint32_t pdev_id;
|
||||||
|
enum spectral_scan_mode smode;
|
||||||
|
uint8_t num_fft_bin_index;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct pdev_set_regdomain_params - PDEV set reg domain params
|
* struct pdev_set_regdomain_params - PDEV set reg domain params
|
||||||
* @currentRDinuse: Current Reg domain
|
* @currentRDinuse: Current Reg domain
|
||||||
@@ -4648,6 +4696,7 @@ typedef enum {
|
|||||||
#endif
|
#endif
|
||||||
wmi_roam_scan_chan_list_id,
|
wmi_roam_scan_chan_list_id,
|
||||||
wmi_muedca_params_config_eventid,
|
wmi_muedca_params_config_eventid,
|
||||||
|
wmi_pdev_sscan_fw_param_eventid,
|
||||||
wmi_events_max,
|
wmi_events_max,
|
||||||
} wmi_conv_event_id;
|
} wmi_conv_event_id;
|
||||||
|
|
||||||
|
@@ -77,6 +77,10 @@
|
|||||||
#include "wlan_pkt_capture_public_structs.h"
|
#include "wlan_pkt_capture_public_structs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
#include "wlan_spectral_public_structs.h"
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
#define WMI_UNIFIED_MAX_EVENT 0x100
|
#define WMI_UNIFIED_MAX_EVENT 0x100
|
||||||
|
|
||||||
#ifdef WMI_EXT_DBG
|
#ifdef WMI_EXT_DBG
|
||||||
@@ -1207,6 +1211,18 @@ QDF_STATUS (*send_simulation_test_cmd)(wmi_unified_t wmi_handle,
|
|||||||
QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct smart_ant_enable_tx_feedback_params *param);
|
struct smart_ant_enable_tx_feedback_params *param);
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
QDF_STATUS (*extract_pdev_sscan_fw_cmd_fixed_param)(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_startscan_resp_params *params);
|
||||||
|
|
||||||
|
QDF_STATUS (*extract_pdev_sscan_fft_bin_index)(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *params);
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct vdev_spectral_configure_params *param);
|
struct vdev_spectral_configure_params *param);
|
||||||
|
|
||||||
|
@@ -2522,6 +2522,34 @@ QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext2(
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
QDF_STATUS wmi_extract_pdev_sscan_fw_cmd_fixed_param(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_startscan_resp_params *param)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->extract_pdev_sscan_fw_cmd_fixed_param)
|
||||||
|
return wmi_handle->ops->extract_pdev_sscan_fw_cmd_fixed_param(
|
||||||
|
wmi_handle,
|
||||||
|
evt_buf, param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_pdev_sscan_fft_bin_index(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *param)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->extract_pdev_sscan_fft_bin_index)
|
||||||
|
return wmi_handle->ops->extract_pdev_sscan_fft_bin_index(
|
||||||
|
wmi_handle,
|
||||||
|
evt_buf, param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
|
QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
|
||||||
wmi_unified_t wmi_handle,
|
wmi_unified_t wmi_handle,
|
||||||
uint8_t *evt_buf, uint8_t idx,
|
uint8_t *evt_buf, uint8_t idx,
|
||||||
|
@@ -6512,10 +6512,11 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
cmd->spectral_scan_dBm_adj = param->dbm_adj;
|
cmd->spectral_scan_dBm_adj = param->dbm_adj;
|
||||||
cmd->spectral_scan_chn_mask = param->chn_mask;
|
cmd->spectral_scan_chn_mask = param->chn_mask;
|
||||||
cmd->spectral_scan_mode = param->mode;
|
cmd->spectral_scan_mode = param->mode;
|
||||||
cmd->spectral_scan_center_freq = param->center_freq;
|
cmd->spectral_scan_center_freq1 = param->center_freq1;
|
||||||
|
cmd->spectral_scan_center_freq2 = param->center_freq2;
|
||||||
|
cmd->spectral_scan_chan_width = param->chan_width;
|
||||||
/* Not used, fill with zeros */
|
/* Not used, fill with zeros */
|
||||||
cmd->spectral_scan_chan_freq = 0;
|
cmd->spectral_scan_chan_freq = 0;
|
||||||
cmd->spectral_scan_chan_width = 0;
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, cmd->vdev_id, 0);
|
wmi_mtrace(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, cmd->vdev_id, 0);
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||||
@@ -6549,7 +6550,8 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
WMI_LOGI("spectral_scan_dBm_adj = %u", param->dbm_adj);
|
WMI_LOGI("spectral_scan_dBm_adj = %u", param->dbm_adj);
|
||||||
WMI_LOGI("spectral_scan_chn_mask = %u", param->chn_mask);
|
WMI_LOGI("spectral_scan_chn_mask = %u", param->chn_mask);
|
||||||
WMI_LOGI("spectral_scan_mode = %u", param->mode);
|
WMI_LOGI("spectral_scan_mode = %u", param->mode);
|
||||||
WMI_LOGI("spectral_scan_center_freq = %u", param->center_freq);
|
WMI_LOGI("spectral_scan_center_freq1 = %u", param->center_freq1);
|
||||||
|
WMI_LOGI("spectral_scan_center_freq2 = %u", param->center_freq2);
|
||||||
WMI_LOGI("spectral_scan_chan_freq = %u", param->chan_freq);
|
WMI_LOGI("spectral_scan_chan_freq = %u", param->chan_freq);
|
||||||
WMI_LOGI("spectral_scan_chan_width = %u", param->chan_width);
|
WMI_LOGI("spectral_scan_chan_width = %u", param->chan_width);
|
||||||
WMI_LOGI("%s: Status: %d", __func__, ret);
|
WMI_LOGI("%s: Status: %d", __func__, ret);
|
||||||
@@ -6622,6 +6624,87 @@ static QDF_STATUS send_vdev_spectral_enable_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
static QDF_STATUS
|
||||||
|
extract_pdev_sscan_fw_cmd_fixed_param_tlv(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *event, struct spectral_startscan_resp_params *param)
|
||||||
|
{
|
||||||
|
WMI_PDEV_SSCAN_FW_PARAM_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_pdev_sscan_fw_cmd_fixed_param *ev;
|
||||||
|
|
||||||
|
if (!wmi_handle) {
|
||||||
|
WMI_LOGE("WMI handle is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!event) {
|
||||||
|
WMI_LOGE("WMI event is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!param) {
|
||||||
|
WMI_LOGE("Spectral startscan response params is null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
param_buf = (WMI_PDEV_SSCAN_FW_PARAM_EVENTID_param_tlvs *)event;
|
||||||
|
if (!param_buf)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
ev = param_buf->fixed_param;
|
||||||
|
if (!ev)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
param->pdev_id = wmi_handle->ops->convert_target_pdev_id_to_host(
|
||||||
|
wmi_handle,
|
||||||
|
ev->pdev_id);
|
||||||
|
param->smode = ev->spectral_scan_mode;
|
||||||
|
param->num_fft_bin_index = param_buf->num_fft_bin_index;
|
||||||
|
WMI_LOGD("%s:pdev id %u scan mode %u num_fft_bin_index %u", __func__,
|
||||||
|
param->pdev_id, param->smode, param->num_fft_bin_index);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
extract_pdev_sscan_fft_bin_index_tlv(
|
||||||
|
wmi_unified_t wmi_handle, uint8_t *event,
|
||||||
|
struct spectral_fft_bin_markers_160_165mhz *param)
|
||||||
|
{
|
||||||
|
WMI_PDEV_SSCAN_FW_PARAM_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_pdev_sscan_fft_bin_index *ev;
|
||||||
|
|
||||||
|
param_buf = (WMI_PDEV_SSCAN_FW_PARAM_EVENTID_param_tlvs *)event;
|
||||||
|
if (!param_buf)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
ev = param_buf->fft_bin_index;
|
||||||
|
if (!ev)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
param->start_pri80 = WMI_SSCAN_PRI80_START_BIN_GET(ev->pri80_bins);
|
||||||
|
param->num_pri80 = WMI_SSCAN_PRI80_END_BIN_GET(ev->pri80_bins) -
|
||||||
|
param->start_pri80 + 1;
|
||||||
|
param->start_sec80 = WMI_SSCAN_SEC80_START_BIN_GET(ev->sec80_bins);
|
||||||
|
param->num_sec80 = WMI_SSCAN_SEC80_END_BIN_GET(ev->sec80_bins) -
|
||||||
|
param->start_sec80 + 1;
|
||||||
|
param->start_5mhz = WMI_SSCAN_MID_5MHZ_START_BIN_GET(ev->mid_5mhz_bins);
|
||||||
|
param->num_5mhz = WMI_SSCAN_MID_5MHZ_END_BIN_GET(ev->mid_5mhz_bins) -
|
||||||
|
param->start_5mhz + 1;
|
||||||
|
param->is_valid = true;
|
||||||
|
|
||||||
|
WMI_LOGD("%s:start_pri80 %u, num_pri80 %u", __func__,
|
||||||
|
param->start_pri80, param->num_pri80);
|
||||||
|
WMI_LOGD("%s:start_sec80 %u, num_sec80 %u", __func__,
|
||||||
|
param->start_sec80, param->num_sec80);
|
||||||
|
WMI_LOGD("%s:start_5mhz %u, num_5mhz %u", __func__,
|
||||||
|
param->start_5mhz, param->num_5mhz);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send_thermal_mitigation_param_cmd_tlv() - configure thermal mitigation params
|
* send_thermal_mitigation_param_cmd_tlv() - configure thermal mitigation params
|
||||||
* @param wmi_handle : handle to WMI.
|
* @param wmi_handle : handle to WMI.
|
||||||
@@ -13846,6 +13929,12 @@ struct wmi_ops tlv_ops = {
|
|||||||
send_vdev_spectral_configure_cmd_tlv,
|
send_vdev_spectral_configure_cmd_tlv,
|
||||||
.send_vdev_spectral_enable_cmd =
|
.send_vdev_spectral_enable_cmd =
|
||||||
send_vdev_spectral_enable_cmd_tlv,
|
send_vdev_spectral_enable_cmd_tlv,
|
||||||
|
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||||
|
.extract_pdev_sscan_fw_cmd_fixed_param =
|
||||||
|
extract_pdev_sscan_fw_cmd_fixed_param_tlv,
|
||||||
|
.extract_pdev_sscan_fft_bin_index =
|
||||||
|
extract_pdev_sscan_fft_bin_index_tlv,
|
||||||
|
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||||
.send_thermal_mitigation_param_cmd =
|
.send_thermal_mitigation_param_cmd =
|
||||||
send_thermal_mitigation_param_cmd_tlv,
|
send_thermal_mitigation_param_cmd_tlv,
|
||||||
.send_process_update_edca_param_cmd =
|
.send_process_update_edca_param_cmd =
|
||||||
@@ -14415,6 +14504,8 @@ event_ids[wmi_roam_scan_chan_list_id] =
|
|||||||
WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID;
|
WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID;
|
||||||
event_ids[wmi_muedca_params_config_eventid] =
|
event_ids[wmi_muedca_params_config_eventid] =
|
||||||
WMI_MUEDCA_PARAMS_CONFIG_EVENTID;
|
WMI_MUEDCA_PARAMS_CONFIG_EVENTID;
|
||||||
|
event_ids[wmi_pdev_sscan_fw_param_eventid] =
|
||||||
|
WMI_PDEV_SSCAN_FW_PARAM_EVENTID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user