qcacmn: Removing WIN specific structures from spectral
Removing WIN specific structures 'scn' and 'ic' from the spectral module in cmn_dev CRs-Fixed: 2146258 Change-Id: Ie4def4dfb401f4b1a5920277f8fa79acb67dd46b
This commit is contained in:

committed by
snandini

parent
de0cb20d07
commit
a3d50e8a85
@@ -244,11 +244,11 @@ int spectral_control_cmn(
|
||||
error = -EINVAL;
|
||||
}
|
||||
|
||||
if (sp_in->ss_dBm_adj != SPECTRAL_PHYERR_PARAM_NOVAL) {
|
||||
if (sp_in->ss_dbm_adj != SPECTRAL_PHYERR_PARAM_NOVAL) {
|
||||
if (!sc->sptrlc_set_spectral_config(
|
||||
pdev,
|
||||
SPECTRAL_PARAM_DBM_ADJ,
|
||||
sp_in->ss_dBm_adj))
|
||||
sp_in->ss_dbm_adj))
|
||||
error = -EINVAL;
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ int spectral_control_cmn(
|
||||
spectralparams->ss_pwr_format = sp_out.ss_pwr_format;
|
||||
spectralparams->ss_rpt_mode = sp_out.ss_rpt_mode;
|
||||
spectralparams->ss_bin_scale = sp_out.ss_bin_scale;
|
||||
spectralparams->ss_dBm_adj = sp_out.ss_dBm_adj;
|
||||
spectralparams->ss_dbm_adj = sp_out.ss_dbm_adj;
|
||||
spectralparams->ss_chn_mask = sp_out.ss_chn_mask;
|
||||
}
|
||||
break;
|
||||
|
@@ -61,6 +61,7 @@ struct pdev_spectral {
|
||||
void *psptrl_target_handle;
|
||||
};
|
||||
|
||||
struct wmi_spectral_cmd_ops;
|
||||
/**
|
||||
* struct spectral_context : spectral global context
|
||||
*
|
||||
@@ -107,6 +108,9 @@ struct spectral_context {
|
||||
void *outdata);
|
||||
void (*sptrlc_get_spectral_diagstats)(struct wlan_objmgr_pdev *pdev,
|
||||
void *outdata);
|
||||
void (*sptrlc_register_wmi_spectral_cmd_ops)(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
||||
};
|
||||
|
||||
#endif /* _SPECTRAL_DEFS_I_H_ */
|
||||
|
@@ -186,6 +186,23 @@ static void get_spectral_diagstats_da(struct wlan_objmgr_pdev *pdev,
|
||||
outdata);
|
||||
}
|
||||
|
||||
static void register_wmi_spectral_cmd_ops_da(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops = NULL;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
|
||||
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||
|
||||
return psptrl_tx_ops->sptrlto_register_wmi_spectral_cmd_ops(
|
||||
pdev,
|
||||
cmd_ops);
|
||||
}
|
||||
|
||||
|
||||
void spectral_ctx_init_da(struct spectral_context *sc)
|
||||
{
|
||||
if (!sc) {
|
||||
@@ -205,5 +222,7 @@ void spectral_ctx_init_da(struct spectral_context *sc)
|
||||
sc->sptrlc_get_debug_level = get_debug_level_da;
|
||||
sc->sptrlc_get_spectral_capinfo = get_spectral_capinfo_da;
|
||||
sc->sptrlc_get_spectral_diagstats = get_spectral_diagstats_da;
|
||||
sc->sptrlc_register_wmi_spectral_cmd_ops =
|
||||
register_wmi_spectral_cmd_ops_da;
|
||||
}
|
||||
|
||||
|
@@ -154,6 +154,22 @@ static void get_spectral_diagstats_ol(struct wlan_objmgr_pdev *pdev,
|
||||
outdata);
|
||||
}
|
||||
|
||||
static void register_wmi_spectral_cmd_ops_ol(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
struct wlan_lmac_if_sptrl_tx_ops *psptrl_tx_ops = NULL;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
|
||||
psptrl_tx_ops = &psoc->soc_cb.tx_ops.sptrl_tx_ops;
|
||||
|
||||
return psptrl_tx_ops->sptrlto_register_wmi_spectral_cmd_ops(
|
||||
pdev,
|
||||
cmd_ops);
|
||||
}
|
||||
|
||||
void spectral_ctx_init_ol(struct spectral_context *sc)
|
||||
{
|
||||
if (!sc) {
|
||||
@@ -173,5 +189,7 @@ void spectral_ctx_init_ol(struct spectral_context *sc)
|
||||
sc->sptrlc_get_debug_level = get_debug_level_ol;
|
||||
sc->sptrlc_get_spectral_capinfo = get_spectral_capinfo_ol;
|
||||
sc->sptrlc_get_spectral_diagstats = get_spectral_diagstats_ol;
|
||||
sc->sptrlc_register_wmi_spectral_cmd_ops =
|
||||
register_wmi_spectral_cmd_ops_ol;
|
||||
}
|
||||
|
||||
|
@@ -258,7 +258,7 @@ struct spectral_caps {
|
||||
* 3: 2-dword summary + 2x-oversampled bins (all) per FFT
|
||||
* @ss_bin_scale: Number of LSBs to shift out to scale the FFT bins
|
||||
* for spectral scan triggered FFTs
|
||||
* @ss_dBm_adj: Set (with ss_pwr_format=1), to report bin
|
||||
* @ss_dbm_adj: Set (with ss_pwr_format=1), to report bin
|
||||
* magnitudes
|
||||
* converted to dBm power using the noisefloor
|
||||
* calibration results
|
||||
@@ -288,7 +288,7 @@ struct spectral_config {
|
||||
u_int16_t ss_pwr_format;
|
||||
u_int16_t ss_rpt_mode;
|
||||
u_int16_t ss_bin_scale;
|
||||
u_int16_t ss_dBm_adj;
|
||||
u_int16_t ss_dbm_adj;
|
||||
u_int16_t ss_chn_mask;
|
||||
int8_t ss_nf_cal[AH_MAX_CHAINS * 2];
|
||||
int8_t ss_nf_pwr[AH_MAX_CHAINS * 2];
|
||||
|
@@ -55,4 +55,16 @@ QDF_STATUS wlan_spectral_deinit(void);
|
||||
*/
|
||||
void 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
|
||||
commands on spectral parameters
|
||||
* @pdev - the physical device object
|
||||
* @cmd_ops - pointer to the structure holding the operations
|
||||
* related to wmi commands on spectral parameters
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_register_wmi_spectral_cmd_ops(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
||||
#endif /* _WLAN_SPECTRAL_UTILS_API_H_*/
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <qdf_module.h>
|
||||
#include "../../core/spectral_cmn_api_i.h"
|
||||
#include <wlan_spectral_tgt_api.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
QDF_STATUS wlan_spectral_init(void)
|
||||
{
|
||||
@@ -89,3 +90,23 @@ void wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
sptrl_rx_ops->sptrlro_send_phydata = tgt_send_phydata;
|
||||
sptrl_rx_ops->sptrlro_get_target_handle = tgt_get_target_handle;
|
||||
}
|
||||
|
||||
void wlan_register_wmi_spectral_cmd_ops(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
||||
{
|
||||
struct spectral_context *sc;
|
||||
|
||||
if (!pdev)
|
||||
spectral_err("PDEV is NULL!\n");
|
||||
|
||||
sc = spectral_get_spectral_ctx_from_pdev(pdev);
|
||||
if (!sc)
|
||||
spectral_err("spectral context is NULL!\n");
|
||||
|
||||
return sc->sptrlc_register_wmi_spectral_cmd_ops(
|
||||
pdev,
|
||||
cmd_ops
|
||||
);
|
||||
}
|
||||
EXPORT_SYMBOL(wlan_register_wmi_spectral_cmd_ops);
|
||||
|
@@ -79,18 +79,17 @@ target_if_spectral_get_vdev(struct target_if_spectral *spectral)
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_send_vdev_spectral_configure_cmd() - Send WMI command to configure
|
||||
* target_if_send_vdev_spectral_configure_cmd() - Send WMI command to configure
|
||||
* Spectral parameters
|
||||
* @spectral: Pointer to Spectral target_if internal private data
|
||||
* @param: Pointer to spectral_config giving the Spectral configuration
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
||||
*/
|
||||
int wmi_send_vdev_spectral_configure_cmd(struct target_if_spectral *spectral,
|
||||
int target_if_send_vdev_spectral_configure_cmd(
|
||||
struct target_if_spectral *spectral,
|
||||
struct spectral_config *param)
|
||||
{
|
||||
struct ol_ath_softc_net80211 *scn = NULL;
|
||||
struct pdev_osif_priv *osif_priv = NULL;
|
||||
struct vdev_spectral_configure_params sparam;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
struct wlan_objmgr_vdev *vdev = NULL;
|
||||
@@ -101,9 +100,6 @@ int wmi_send_vdev_spectral_configure_cmd(struct target_if_spectral *spectral,
|
||||
|
||||
qdf_assert_always(pdev);
|
||||
|
||||
osif_priv = wlan_pdev_get_ospriv(pdev);
|
||||
scn = (struct ol_ath_softc_net80211 *)osif_priv->legacy_osif_priv;
|
||||
|
||||
vdev = target_if_spectral_get_vdev(spectral);
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_NOENT;
|
||||
@@ -129,15 +125,16 @@ int wmi_send_vdev_spectral_configure_cmd(struct target_if_spectral *spectral,
|
||||
sparam.pwr_format = param->ss_pwr_format;
|
||||
sparam.rpt_mode = param->ss_rpt_mode;
|
||||
sparam.bin_scale = param->ss_bin_scale;
|
||||
sparam.dBm_adj = param->ss_dBm_adj;
|
||||
sparam.dBm_adj = param->ss_dbm_adj;
|
||||
sparam.chn_mask = param->ss_chn_mask;
|
||||
|
||||
return scn->wmi_spectral_configure_cmd_send(scn->wmi_handle, &sparam);
|
||||
return spectral->param_wmi_cmd_ops.wmi_spectral_configure_cmd_send(
|
||||
(wmi_unified_t)pdev->tgt_if_handle, &sparam);
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_send_vdev_spectral_enable_cmd() - Send WMI command to enable/disable
|
||||
* Spectral
|
||||
* target_if_send_vdev_spectral_enable_cmd() - Send WMI command to
|
||||
* enable/disable Spectral
|
||||
* @spectral: Pointer to Spectral target_if internal private data
|
||||
* @is_spectral_active_valid: Flag to indicate if spectral activate (trigger) is
|
||||
* valid
|
||||
@@ -147,15 +144,14 @@ int wmi_send_vdev_spectral_configure_cmd(struct target_if_spectral *spectral,
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
||||
*/
|
||||
int wmi_send_vdev_spectral_enable_cmd(struct target_if_spectral *spectral,
|
||||
int target_if_send_vdev_spectral_enable_cmd(
|
||||
struct target_if_spectral *spectral,
|
||||
u_int8_t is_spectral_active_valid,
|
||||
u_int8_t is_spectral_active,
|
||||
u_int8_t is_spectral_enabled_valid,
|
||||
u_int8_t is_spectral_enabled)
|
||||
{
|
||||
struct vdev_spectral_enable_params param;
|
||||
struct ol_ath_softc_net80211 *scn = NULL;
|
||||
struct pdev_osif_priv *osif_priv = NULL;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
struct wlan_objmgr_vdev *vdev = NULL;
|
||||
|
||||
@@ -165,8 +161,6 @@ int wmi_send_vdev_spectral_enable_cmd(struct target_if_spectral *spectral,
|
||||
|
||||
qdf_assert_always(pdev);
|
||||
|
||||
osif_priv = wlan_pdev_get_ospriv(pdev);
|
||||
scn = (struct ol_ath_softc_net80211 *)osif_priv->legacy_osif_priv;
|
||||
|
||||
vdev = target_if_spectral_get_vdev(spectral);
|
||||
if (!vdev)
|
||||
@@ -182,7 +176,8 @@ int wmi_send_vdev_spectral_enable_cmd(struct target_if_spectral *spectral,
|
||||
param.active = is_spectral_active;
|
||||
param.enabled = is_spectral_enabled;
|
||||
|
||||
return scn->wmi_spectral_enable_cmd_send(scn->wmi_handle, ¶m);
|
||||
return spectral->param_wmi_cmd_ops.wmi_spectral_enable_cmd_send(
|
||||
(wmi_unified_t)pdev->tgt_if_handle, ¶m);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +252,7 @@ int target_if_spectral_info_init_defaults(struct target_if_spectral *spectral)
|
||||
info->osps_cache.osc_params.ss_bin_scale =
|
||||
SPECTRAL_SCAN_BIN_SCALE_DEFAULT;
|
||||
|
||||
info->osps_cache.osc_params.ss_dBm_adj =
|
||||
info->osps_cache.osc_params.ss_dbm_adj =
|
||||
SPECTRAL_SCAN_DBM_ADJ_DEFAULT;
|
||||
|
||||
vdev = target_if_spectral_get_vdev(spectral);
|
||||
@@ -388,7 +383,7 @@ int ol_spectral_info_read(struct target_if_spectral *spectral,
|
||||
"ss_pwr_format = %u\n"
|
||||
"ss_rpt_mode = %u\n"
|
||||
"ss_bin_scale = %u\n"
|
||||
"ss_dBm_adj = %u\n"
|
||||
"ss_dbm_adj = %u\n"
|
||||
"ss_chn_mask = %u\n\n",
|
||||
__func__,
|
||||
pparam->ss_count,
|
||||
@@ -407,7 +402,7 @@ int ol_spectral_info_read(struct target_if_spectral *spectral,
|
||||
pparam->ss_pwr_format,
|
||||
pparam->ss_rpt_mode,
|
||||
pparam->ss_bin_scale,
|
||||
pparam->ss_dBm_adj,
|
||||
pparam->ss_dbm_adj,
|
||||
pparam->ss_chn_mask);
|
||||
}
|
||||
#endif /* OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS */
|
||||
@@ -491,7 +486,7 @@ int ol_spectral_info_read(struct target_if_spectral *spectral,
|
||||
"ss_pwr_format = %u\n"
|
||||
"ss_rpt_mode = %u\n"
|
||||
"ss_bin_scale = %u\n"
|
||||
"ss_dBm_adj = %u\n"
|
||||
"ss_dbm_adj = %u\n"
|
||||
"ss_chn_mask = %u\n\n",
|
||||
__func__,
|
||||
pparam->ss_count,
|
||||
@@ -510,7 +505,7 @@ int ol_spectral_info_read(struct target_if_spectral *spectral,
|
||||
pparam->ss_pwr_format,
|
||||
pparam->ss_rpt_mode,
|
||||
pparam->ss_bin_scale,
|
||||
pparam->ss_dBm_adj,
|
||||
pparam->ss_dbm_adj,
|
||||
pparam->ss_chn_mask);
|
||||
}
|
||||
#endif /* OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS */
|
||||
@@ -560,7 +555,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
pval = (u_int8_t *)input;
|
||||
|
||||
qdf_spin_lock(&info->osps_lock);
|
||||
ret = wmi_send_vdev_spectral_enable_cmd(
|
||||
ret = target_if_send_vdev_spectral_enable_cmd(
|
||||
spectral,
|
||||
1,
|
||||
*pval,
|
||||
@@ -577,7 +572,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
|
||||
if (ret < 0) {
|
||||
qdf_print(
|
||||
"%s: wmi_send_vdev_spectral_enable_cmd "
|
||||
"%s: target_if_send_vdev_spectral_enable_cmd "
|
||||
"failed with error=%d\n",
|
||||
__func__,
|
||||
ret);
|
||||
@@ -597,7 +592,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
pval = (u_int8_t *)input;
|
||||
|
||||
qdf_spin_lock(&info->osps_lock);
|
||||
ret = wmi_send_vdev_spectral_enable_cmd(
|
||||
ret = target_if_send_vdev_spectral_enable_cmd(
|
||||
spectral,
|
||||
0,
|
||||
0,
|
||||
@@ -614,7 +609,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
|
||||
if (ret < 0) {
|
||||
qdf_print(
|
||||
"%s: wmi_send_vdev_spectral_enable_cmd "
|
||||
"%s: target_if_send_vdev_spectral_enable_cmd "
|
||||
"failed with error=%d\n",
|
||||
__func__,
|
||||
ret);
|
||||
@@ -633,7 +628,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
param = (struct spectral_config *)input;
|
||||
|
||||
qdf_spin_lock(&info->osps_lock);
|
||||
ret = wmi_send_vdev_spectral_configure_cmd(
|
||||
ret = target_if_send_vdev_spectral_configure_cmd(
|
||||
spectral,
|
||||
param);
|
||||
|
||||
@@ -656,7 +651,7 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
"ss_pwr_format = %u\n"
|
||||
"ss_rpt_mode = %u\n"
|
||||
"ss_bin_scale = %u\n"
|
||||
"ss_dBm_adj = %u\n"
|
||||
"ss_dbm_adj = %u\n"
|
||||
"ss_chn_mask = %u\n"
|
||||
"status = %d\n\n",
|
||||
__func__,
|
||||
@@ -676,14 +671,15 @@ int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||
param->ss_pwr_format,
|
||||
param->ss_rpt_mode,
|
||||
param->ss_bin_scale,
|
||||
param->ss_dBm_adj,
|
||||
param->ss_dbm_adj,
|
||||
param->ss_chn_mask,
|
||||
ret);
|
||||
#endif /* OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS */
|
||||
|
||||
if (ret < 0) {
|
||||
qdf_print(
|
||||
"%s: wmi_send_vdev_spectral_configure_cmd "
|
||||
"%s: "
|
||||
"target_if_send_vdev_spectral_configure_cmd "
|
||||
"failed with error=%d\n",
|
||||
__func__,
|
||||
ret);
|
||||
@@ -1532,7 +1528,8 @@ int target_if_spectral_check_hw_capability(struct target_if_spectral *spectral)
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_pdev_spectral_init() - Initialize Spectral parameter defaults
|
||||
* target_if_spectral_init_param_defaults() - Initialize Spectral
|
||||
* parameter defaults
|
||||
* @spectral: Pointer to Spectral target_if internal private data
|
||||
*
|
||||
* It is the caller's responsibility to ensure that the Spectral parameters
|
||||
@@ -1562,7 +1559,7 @@ static void target_if_spectral_init_param_defaults(
|
||||
params->ss_pwr_format = SPECTRAL_SCAN_PWR_FORMAT_DEFAULT;
|
||||
params->ss_rpt_mode = SPECTRAL_SCAN_RPT_MODE_DEFAULT;
|
||||
params->ss_bin_scale = SPECTRAL_SCAN_BIN_SCALE_DEFAULT;
|
||||
params->ss_dBm_adj = SPECTRAL_SCAN_DBM_ADJ_DEFAULT;
|
||||
params->ss_dbm_adj = SPECTRAL_SCAN_DBM_ADJ_DEFAULT;
|
||||
/*
|
||||
* XXX
|
||||
* SPECTRAL_SCAN_CHN_MASK_DEFAULT (0x1) specifies that chain 0 is to be
|
||||
@@ -1730,7 +1727,7 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_pdev_spectral_init() - De-initialize target_if Spectral
|
||||
* target_if_pdev_spectral_deinit() - De-initialize target_if Spectral
|
||||
* functionality for the given pdev
|
||||
* @pdev: Pointer to pdev object
|
||||
*
|
||||
@@ -1829,7 +1826,7 @@ static int target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||
spectral->params.ss_bin_scale = value;
|
||||
break;
|
||||
case SPECTRAL_PARAM_DBM_ADJ:
|
||||
spectral->params.ss_dBm_adj = !!value;
|
||||
spectral->params.ss_dbm_adj = !!value;
|
||||
break;
|
||||
case SPECTRAL_PARAM_CHN_MASK:
|
||||
spectral->params.ss_chn_mask = value;
|
||||
@@ -1945,14 +1942,8 @@ static int target_if_spectral_scan_enable_params(
|
||||
int extension_channel = 0;
|
||||
int current_channel = 0;
|
||||
struct target_if_spectral_ops *p_sops = NULL;
|
||||
struct ol_ath_softc_net80211 *scn = NULL;
|
||||
struct pdev_osif_priv *osif_priv = NULL;
|
||||
struct wlan_objmgr_pdev *pdev = spectral->pdev_obj;
|
||||
struct wlan_objmgr_vdev *vdev = NULL;
|
||||
|
||||
osif_priv = wlan_pdev_get_ospriv(pdev);
|
||||
scn = (struct ol_ath_softc_net80211 *)osif_priv->legacy_osif_priv;
|
||||
|
||||
if (!spectral) {
|
||||
qdf_print("SPECTRAL : Spectral is NULL\n");
|
||||
return 1;
|
||||
@@ -2411,6 +2402,19 @@ static void target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
||||
sizeof(struct spectral_diag_stats));
|
||||
}
|
||||
|
||||
void target_if_register_wmi_spectral_cmd_ops(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops)
|
||||
{
|
||||
struct target_if_spectral *spectral = NULL;
|
||||
|
||||
spectral = get_target_if_spectral_handle_from_pdev(pdev);
|
||||
spectral->param_wmi_cmd_ops.wmi_spectral_configure_cmd_send =
|
||||
cmd_ops->wmi_spectral_configure_cmd_send;
|
||||
spectral->param_wmi_cmd_ops.wmi_spectral_enable_cmd_send =
|
||||
cmd_ops->wmi_spectral_enable_cmd_send;
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_sptrl_register_tx_ops() - Register Spectral target_if Tx Ops
|
||||
* @tx_ops: Tx Ops
|
||||
@@ -2443,17 +2447,11 @@ void target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
target_if_get_spectral_capinfo;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_get_spectral_diagstats =
|
||||
target_if_get_spectral_diagstats;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_register_wmi_spectral_cmd_ops =
|
||||
target_if_register_wmi_spectral_cmd_ops;
|
||||
}
|
||||
EXPORT_SYMBOL(target_if_sptrl_register_tx_ops);
|
||||
|
||||
#ifdef HOST_OFFLOAD
|
||||
extern void
|
||||
atd_spectral_msg_send(
|
||||
struct net_device *dev,
|
||||
SPECTRAL_SAMP_MSG * msg,
|
||||
uint16_t msg_len);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* target_if_spectral_send_intf_found_msg() - Send message to application layer
|
||||
* indicating that interference has been found
|
||||
@@ -2487,23 +2485,6 @@ void target_if_spectral_send_intf_found_msg(
|
||||
target_if_spectral_bcast_msg(spectral);
|
||||
}
|
||||
#endif
|
||||
#ifdef HOST_OFFLOAD
|
||||
{
|
||||
SPECTRAL_SAMP_MSG *buf = NULL;
|
||||
|
||||
buf = (SPECTRAL_SAMP_MSG *)OS_MALLOC(spectral->ic->ic_osdev,
|
||||
sizeof(struct ath_spectral),
|
||||
GFP_KERNEL);
|
||||
buf->int_type = cw_int ? SPECTRAL_DCS_INT_CW : SPECTRAL_DCS_INT_WIFI;
|
||||
buf->dcs_enabled = dcs_enabled;
|
||||
buf->signature = SPECTRAL_SIGNATURE;
|
||||
p_sops->get_mac_address(spectral, buf->macaddr);
|
||||
atd_spectral_msg_send(spectral->ic->ic_osdev->netdev,
|
||||
buf,
|
||||
sizeof(SPECTRAL_SAMP_MSG));
|
||||
OS_FREE(buf);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(target_if_spectral_send_intf_found_msg);
|
||||
|
||||
|
@@ -579,6 +579,23 @@ struct target_if_spectral_param_state_info {
|
||||
};
|
||||
#endif /* ATH_PERF_PWR_OFFLOAD */
|
||||
|
||||
struct vdev_spectral_configure_params;
|
||||
struct vdev_spectral_enable_params;
|
||||
/**
|
||||
* struct wmi_spectral_cmd_ops - structure used holding the operations
|
||||
* related to wmi commands on spectral parameters.
|
||||
* @wmi_spectral_configure_cmd_send:
|
||||
* @wmi_spectral_enable_cmd_send:
|
||||
*/
|
||||
struct wmi_spectral_cmd_ops {
|
||||
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
|
||||
void *wmi_hdl,
|
||||
struct vdev_spectral_configure_params *param);
|
||||
QDF_STATUS (*wmi_spectral_enable_cmd_send)(
|
||||
void *wmi_hdl,
|
||||
struct vdev_spectral_enable_params *param);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct target_if_spectral - main spectral structure
|
||||
* @pdev: Pointer to pdev
|
||||
@@ -762,6 +779,7 @@ struct target_if_spectral {
|
||||
u_int8_t tag_sscan_summary_exp;
|
||||
u_int8_t tag_sscan_fft_exp;
|
||||
u_int8_t tlvhdr_size;
|
||||
struct wmi_spectral_cmd_ops param_wmi_cmd_ops;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -26,14 +26,6 @@
|
||||
#include <wlan_lmac_if_def.h>
|
||||
#include <wlan_osif_priv.h>
|
||||
|
||||
#ifdef HOST_OFFLOAD
|
||||
extern void
|
||||
atd_spectral_msg_send(
|
||||
struct net_device *dev,
|
||||
SPECTRAL_SAMP_MSG *msg,
|
||||
uint16_t msg_len);
|
||||
#endif
|
||||
|
||||
#ifdef SPECTRAL_USE_NETLINK_SOCKETS
|
||||
struct sock *target_if_spectral_nl_sock;
|
||||
static atomic_t spectral_nl_users = ATOMIC_INIT(0);
|
||||
@@ -442,12 +434,6 @@ void target_if_spectral_create_samp_msg(
|
||||
}
|
||||
#endif /* SPECTRAL_USE_NETLINK_SOCKETS */
|
||||
|
||||
#ifdef HOST_OFFLOAD
|
||||
atd_spectral_msg_send(spectral->ic->ic_osdev->netdev,
|
||||
&spec_samp_msg,
|
||||
sizeof(SPECTRAL_SAMP_MSG));
|
||||
#endif
|
||||
|
||||
if (spectral->sc_spectral_noise_pwr_cal)
|
||||
spectral_process_noise_pwr_report(spectral, &spec_samp_msg);
|
||||
}
|
||||
|
@@ -98,14 +98,6 @@ int target_if_spectral_dump_fft(u_int8_t *pfft, int fftlen)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HOST_OFFLOAD
|
||||
extern void
|
||||
atd_spectral_msg_send(
|
||||
struct net_device *dev,
|
||||
SPECTRAL_SAMP_MSG *msg,
|
||||
uint16_t msg_len);
|
||||
#endif
|
||||
|
||||
int target_if_spectral_send_tlv_to_host(
|
||||
struct target_if_spectral *spectral,
|
||||
u_int8_t *data,
|
||||
@@ -122,11 +114,6 @@ int target_if_spectral_send_tlv_to_host(
|
||||
} else {
|
||||
status = false;
|
||||
}
|
||||
#ifdef HOST_OFFLOAD
|
||||
atd_spectral_msg_send(spectral->ic->ic_osdev->netdev,
|
||||
data,
|
||||
datalen);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -313,7 +300,7 @@ int dump_summary_report_gen2(
|
||||
|
||||
recent_rfsat = ((ss_summary_A >> 8) & 0x1);
|
||||
sscan_gidx = (ss_summary_A & 0xff);
|
||||
printf("sscan_gidx=%d, is_recent_rfsat=%d\n",
|
||||
qdf_print("sscan_gidx=%d, is_recent_rfsat=%d\n",
|
||||
sscan_gidx, recent_rfsat);
|
||||
|
||||
/* First segment */
|
||||
@@ -326,9 +313,9 @@ int dump_summary_report_gen2(
|
||||
peak_inx = peak_inx - 4096;
|
||||
peak_mag = ((ss_summary_C >> 12) & 0x3ff);
|
||||
|
||||
printf("agc_total_gain_segid0 = 0x%.2x, agc_mb_gain_segid0=%d\n",
|
||||
qdf_print("agc_total_gain_segid0 = 0x%.2x, agc_mb_gain_segid0=%d\n",
|
||||
agc_total_gain, agc_mb_gain);
|
||||
printf("nb_mask_segid0 = 0x%.2x, ob_flag_segid0=%d, "
|
||||
qdf_print("nb_mask_segid0 = 0x%.2x, ob_flag_segid0=%d, "
|
||||
"peak_index_segid0=%d, peak_mag_segid0=%d\n",
|
||||
nb_mask, ob_flag, peak_inx, peak_mag);
|
||||
|
||||
@@ -342,9 +329,9 @@ int dump_summary_report_gen2(
|
||||
peak_inx = peak_inx - 4096;
|
||||
peak_mag = ((ss_summary_E >> 12) & 0x3ff);
|
||||
|
||||
printf("agc_total_gain_segid1 = 0x%.2x, agc_mb_gain_segid1=%d\n",
|
||||
qdf_print("agc_total_gain_segid1 = 0x%.2x, agc_mb_gain_segid1=%d\n",
|
||||
agc_total_gain, agc_mb_gain);
|
||||
printf("nb_mask_segid1 = 0x%.2x, ob_flag_segid1=%d, "
|
||||
qdf_print("nb_mask_segid1 = 0x%.2x, ob_flag_segid1=%d, "
|
||||
"peak_index_segid1=%d, peak_mag_segid1=%d\n",
|
||||
nb_mask, ob_flag, peak_inx, peak_mag);
|
||||
} else {
|
||||
|
@@ -799,7 +799,7 @@ u_int32_t tif_spectral_sim_configure_params(
|
||||
"ss_pwr_format=%hu\n"
|
||||
"ss_rpt_mode=%hu\n"
|
||||
"ss_bin_scale=%hu\n"
|
||||
"ss_dBm_adj=%hu\n"
|
||||
"ss_dbm_adj=%hu\n"
|
||||
"ss_chn_mask=%hu\n"
|
||||
"ss_nf_temp_data=%d\n",
|
||||
params->ss_fft_period,
|
||||
@@ -821,7 +821,7 @@ u_int32_t tif_spectral_sim_configure_params(
|
||||
params->ss_pwr_format,
|
||||
params->ss_rpt_mode,
|
||||
params->ss_bin_scale,
|
||||
params->ss_dBm_adj,
|
||||
params->ss_dbm_adj,
|
||||
params->ss_chn_mask,
|
||||
params->ss_nf_temp_data);
|
||||
|
||||
|
@@ -242,7 +242,7 @@ static struct spectral_config config_20_1 = {
|
||||
.ss_pwr_format = 0,
|
||||
.ss_rpt_mode = 2,
|
||||
.ss_bin_scale = 1,
|
||||
.ss_dBm_adj = 1,
|
||||
.ss_dbm_adj = 1,
|
||||
.ss_chn_mask = 1,
|
||||
.ss_nf_cal[0] = 0,
|
||||
.ss_nf_cal[1] = 0,
|
||||
@@ -374,7 +374,7 @@ static struct spectral_config config_40_1 = {
|
||||
.ss_pwr_format = 0,
|
||||
.ss_rpt_mode = 2,
|
||||
.ss_bin_scale = 1,
|
||||
.ss_dBm_adj = 1,
|
||||
.ss_dbm_adj = 1,
|
||||
.ss_chn_mask = 1,
|
||||
.ss_nf_cal[0] = 0,
|
||||
.ss_nf_cal[1] = 0,
|
||||
@@ -516,7 +516,7 @@ static struct spectral_config config_80_1 = {
|
||||
.ss_pwr_format = 0,
|
||||
.ss_rpt_mode = 2,
|
||||
.ss_bin_scale = 1,
|
||||
.ss_dBm_adj = 1,
|
||||
.ss_dbm_adj = 1,
|
||||
.ss_chn_mask = 1,
|
||||
.ss_nf_cal[0] = 0,
|
||||
.ss_nf_cal[1] = 0,
|
||||
@@ -728,7 +728,7 @@ static struct spectral_config config_160_1 = {
|
||||
.ss_pwr_format = 0,
|
||||
.ss_rpt_mode = 2,
|
||||
.ss_bin_scale = 1,
|
||||
.ss_dBm_adj = 1,
|
||||
.ss_dbm_adj = 1,
|
||||
.ss_chn_mask = 1,
|
||||
.ss_nf_cal[0] = 0,
|
||||
.ss_nf_cal[1] = 0,
|
||||
@@ -940,7 +940,7 @@ static struct spectral_config config_80_80_1 = {
|
||||
.ss_pwr_format = 0,
|
||||
.ss_rpt_mode = 2,
|
||||
.ss_bin_scale = 1,
|
||||
.ss_dBm_adj = 1,
|
||||
.ss_dbm_adj = 1,
|
||||
.ss_chn_mask = 1,
|
||||
.ss_nf_cal[0] = 0,
|
||||
.ss_nf_cal[1] = 0,
|
||||
|
@@ -275,6 +275,7 @@ struct wlan_lmac_if_sa_api_tx_ops {
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||
struct wmi_spectral_cmd_ops;
|
||||
/**
|
||||
* struct wlan_lmac_if_sptrl_tx_ops - Spectral south bound Tx operations
|
||||
* @sptrlto_spectral_init: Initialize LMAC/target_if Spectral
|
||||
@@ -316,6 +317,9 @@ struct wlan_lmac_if_sptrl_tx_ops {
|
||||
void *outdata);
|
||||
void (*sptrlto_get_spectral_diagstats)(struct wlan_objmgr_pdev *pdev,
|
||||
void *outdata);
|
||||
void (*sptrlto_register_wmi_spectral_cmd_ops)(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
||||
};
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
|
Reference in New Issue
Block a user