qcacmn: Fix spectral scan compilation errors
Fix spectral scan component compilation errors on MCL build system. Change-Id: I903431fba923859e796e0786354608cac2841b0c CRs-Fixed: 2160819
This commit is contained in:

committed by
snandini

parent
9403463db3
commit
4fe1d4b0ee
@@ -296,7 +296,7 @@ int wlan_cfg80211_spectral_scan_config_and_start(struct wiphy *wiphy,
|
|||||||
uint64_t cookie;
|
uint64_t cookie;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
uint32_t spectral_dbg_level;
|
uint32_t spectral_dbg_level;
|
||||||
uint32_t scan_req_type;
|
uint32_t scan_req_type = 0;
|
||||||
|
|
||||||
if (wlan_cfg80211_nla_parse(
|
if (wlan_cfg80211_nla_parse(
|
||||||
tb,
|
tb,
|
||||||
@@ -636,7 +636,7 @@ int wlan_cfg80211_spectral_scan_get_status(struct wiphy *wiphy,
|
|||||||
const void *data,
|
const void *data,
|
||||||
int data_len)
|
int data_len)
|
||||||
{
|
{
|
||||||
struct spectral_scan_state sscan_state;
|
struct spectral_scan_state sscan_state = { 0 };
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, 2 * sizeof(u32) +
|
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, 2 * sizeof(u32) +
|
||||||
|
@@ -104,6 +104,25 @@ int spectral_control_cmn(
|
|||||||
u_int32_t insize,
|
u_int32_t insize,
|
||||||
void *outdata, u_int32_t *outsize);
|
void *outdata, u_int32_t *outsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spectral_control_ol(): Offload handler for demultiplexing requests from
|
||||||
|
* higher layer
|
||||||
|
* @pdev: reference to global pdev object
|
||||||
|
* @id: spectral config command id
|
||||||
|
* @indata: reference to input data
|
||||||
|
* @insize: input data size
|
||||||
|
* @outdata: reference to output data
|
||||||
|
* @outsize: reference to output data size
|
||||||
|
*
|
||||||
|
* This function processes the spectral config command
|
||||||
|
* and appropriate handlers are invoked.
|
||||||
|
*
|
||||||
|
* Return: 0 success else failure
|
||||||
|
*/
|
||||||
|
int spectral_control_ol(
|
||||||
|
struct wlan_objmgr_pdev *pdev, u_int id,
|
||||||
|
void *indata, u_int32_t insize, void *outdata, u_int32_t *outsize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spectral_get_spectral_ctx_from_pdev() - API to get spectral context object
|
* spectral_get_spectral_ctx_from_pdev() - API to get spectral context object
|
||||||
* from pdev
|
* from pdev
|
||||||
|
@@ -22,9 +22,11 @@
|
|||||||
#include "spectral_ol_api_i.h"
|
#include "spectral_ol_api_i.h"
|
||||||
#include <qdf_mem.h>
|
#include <qdf_mem.h>
|
||||||
#include <qdf_types.h>
|
#include <qdf_types.h>
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
#include <osif_private.h>
|
#include <osif_private.h>
|
||||||
#include <wlan_spectral_public_structs.h>
|
|
||||||
#include <wlan_mlme_dispatcher.h>
|
#include <wlan_mlme_dispatcher.h>
|
||||||
|
#endif /*CONFIG_WIN*/
|
||||||
|
#include <wlan_spectral_public_structs.h>
|
||||||
#include <wlan_cfg80211_spectral.h>
|
#include <wlan_cfg80211_spectral.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
*
|
*
|
||||||
* Return: Pointer to vdev on success, NULL on failure
|
* Return: Pointer to vdev on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
struct wlan_objmgr_vdev*
|
static struct wlan_objmgr_vdev*
|
||||||
spectral_get_vdev(struct wlan_objmgr_pdev *pdev)
|
spectral_get_vdev(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct wlan_objmgr_vdev *vdev = NULL;
|
struct wlan_objmgr_vdev *vdev = NULL;
|
||||||
@@ -497,10 +499,12 @@ wlan_spectral_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
|
|||||||
}
|
}
|
||||||
qdf_mem_zero(sc, sizeof(struct spectral_context));
|
qdf_mem_zero(sc, sizeof(struct spectral_context));
|
||||||
sc->psoc_obj = psoc;
|
sc->psoc_obj = psoc;
|
||||||
if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_DA)
|
if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_OL)
|
||||||
spectral_ctx_init_da(sc);
|
|
||||||
else if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_OL)
|
|
||||||
spectral_ctx_init_ol(sc);
|
spectral_ctx_init_ol(sc);
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
|
else if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_DA)
|
||||||
|
spectral_ctx_init_da(sc);
|
||||||
|
#endif
|
||||||
wlan_objmgr_psoc_component_obj_attach(psoc, WLAN_UMAC_COMP_SPECTRAL,
|
wlan_objmgr_psoc_component_obj_attach(psoc, WLAN_UMAC_COMP_SPECTRAL,
|
||||||
(void *)sc, QDF_STATUS_SUCCESS);
|
(void *)sc, QDF_STATUS_SUCCESS);
|
||||||
|
|
||||||
|
@@ -30,7 +30,9 @@
|
|||||||
#include <qdf_util.h>
|
#include <qdf_util.h>
|
||||||
#include <wlan_spectral_public_structs.h>
|
#include <wlan_spectral_public_structs.h>
|
||||||
#include <wlan_spectral_utils_api.h>
|
#include <wlan_spectral_utils_api.h>
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
#include <if_athioctl.h>
|
#include <if_athioctl.h>
|
||||||
|
#endif /*CONFIG_WIN*/
|
||||||
#include <spectral_ioctl.h>
|
#include <spectral_ioctl.h>
|
||||||
|
|
||||||
#define spectral_log(level, args...) \
|
#define spectral_log(level, args...) \
|
||||||
@@ -91,7 +93,7 @@ struct spectral_context {
|
|||||||
void *indata, u_int32_t insize,
|
void *indata, u_int32_t insize,
|
||||||
void *outdata, u_int32_t *outsize);
|
void *outdata, u_int32_t *outsize);
|
||||||
int (*sptrlc_ucfg_phyerr_config)(struct wlan_objmgr_pdev *pdev,
|
int (*sptrlc_ucfg_phyerr_config)(struct wlan_objmgr_pdev *pdev,
|
||||||
struct ath_diag *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);
|
||||||
int (*sptrlc_set_spectral_config)(
|
int (*sptrlc_set_spectral_config)(
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "spectral_cmn_api_i.h"
|
#include "spectral_cmn_api_i.h"
|
||||||
|
#include "spectral_ol_api_i.h"
|
||||||
|
|
||||||
int spectral_control_ol(
|
int spectral_control_ol(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
|
@@ -81,9 +81,41 @@ struct spectral_legacy_cbacks {
|
|||||||
uint16_t *sec20chan_freq);
|
uint16_t *sec20chan_freq);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spectral_register_legacy_cb - Register legacy callbacks
|
||||||
|
* @psoc: psoc object
|
||||||
|
* @legacy_cbacks: legacy callback structure
|
||||||
|
*
|
||||||
|
* Return: SUCCESS,
|
||||||
|
* Failure
|
||||||
|
*/
|
||||||
QDF_STATUS spectral_register_legacy_cb(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS spectral_register_legacy_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
struct spectral_legacy_cbacks *legacy_cbacks);
|
struct spectral_legacy_cbacks *legacy_cbacks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spectral_vdev_get_chan_freq - Get vdev channel frequency
|
||||||
|
* @vdev: vdev object
|
||||||
|
*
|
||||||
|
* Return: vdev operating frequency
|
||||||
|
*/
|
||||||
|
int16_t spectral_vdev_get_chan_freq(struct wlan_objmgr_vdev *vdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spectral_vdev_get_ch_width - Get vdev channel band width
|
||||||
|
* @vdev: vdev object
|
||||||
|
*
|
||||||
|
* Return: phy channel width
|
||||||
|
*/
|
||||||
enum phy_ch_width spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev);
|
enum phy_ch_width spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spectral_vdev_get_sec20chan_freq_mhz - Get vdev secondary channel frequncy
|
||||||
|
* @vdev: vdev object
|
||||||
|
* @sec20chan_freq: secondary channel frequency
|
||||||
|
*
|
||||||
|
* Return: secondary channel freq
|
||||||
|
*/
|
||||||
|
int spectral_vdev_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
|
||||||
|
uint16_t *sec20chan_freq);
|
||||||
|
|
||||||
#endif /* _WLAN_SPECTRAL_UTILS_API_H_*/
|
#endif /* _WLAN_SPECTRAL_UTILS_API_H_*/
|
||||||
|
@@ -25,7 +25,10 @@
|
|||||||
#include <wlan_lmac_if_def.h>
|
#include <wlan_lmac_if_def.h>
|
||||||
#include <wlan_osif_priv.h>
|
#include <wlan_osif_priv.h>
|
||||||
#include <reg_services_public_struct.h>
|
#include <reg_services_public_struct.h>
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
#include <wlan_mlme_dispatcher.h>
|
#include <wlan_mlme_dispatcher.h>
|
||||||
|
#endif /*CONFIG_WIN*/
|
||||||
|
#include <reg_services_public_struct.h>
|
||||||
#include <target_if_spectral_sim.h>
|
#include <target_if_spectral_sim.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +38,7 @@
|
|||||||
* module.
|
* module.
|
||||||
*/
|
*/
|
||||||
struct target_if_spectral_ops spectral_ops;
|
struct target_if_spectral_ops spectral_ops;
|
||||||
|
int spectral_debug_level = ATH_DEBUG_SPECTRAL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* target_if_spectral_get_vdev() - Get pointer to vdev to be used for Spectral
|
* target_if_spectral_get_vdev() - Get pointer to vdev to be used for Spectral
|
||||||
@@ -86,7 +90,7 @@ target_if_spectral_get_vdev(struct target_if_spectral *spectral)
|
|||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
||||||
*/
|
*/
|
||||||
int target_if_send_vdev_spectral_configure_cmd(
|
static int target_if_send_vdev_spectral_configure_cmd(
|
||||||
struct target_if_spectral *spectral,
|
struct target_if_spectral *spectral,
|
||||||
struct spectral_config *param)
|
struct spectral_config *param)
|
||||||
{
|
{
|
||||||
@@ -144,7 +148,7 @@ int target_if_send_vdev_spectral_configure_cmd(
|
|||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
||||||
*/
|
*/
|
||||||
int target_if_send_vdev_spectral_enable_cmd(
|
static int target_if_send_vdev_spectral_enable_cmd(
|
||||||
struct target_if_spectral *spectral,
|
struct target_if_spectral *spectral,
|
||||||
u_int8_t is_spectral_active_valid,
|
u_int8_t is_spectral_active_valid,
|
||||||
u_int8_t is_spectral_active,
|
u_int8_t is_spectral_active,
|
||||||
@@ -191,7 +195,7 @@ int target_if_send_vdev_spectral_enable_cmd(
|
|||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
* Return: QDF_STATUS_SUCCESS on success, negative error code on failure
|
||||||
*/
|
*/
|
||||||
int target_if_spectral_info_init_defaults(struct target_if_spectral *spectral)
|
static int target_if_spectral_info_init_defaults(struct target_if_spectral *spectral)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_param_state_info *info = &spectral->ol_info;
|
struct target_if_spectral_param_state_info *info = &spectral->ol_info;
|
||||||
struct wlan_objmgr_vdev *vdev = NULL;
|
struct wlan_objmgr_vdev *vdev = NULL;
|
||||||
@@ -280,7 +284,7 @@ int target_if_spectral_info_init_defaults(struct target_if_spectral *spectral)
|
|||||||
*
|
*
|
||||||
* Return: 0 on success, negative error code on failure
|
* Return: 0 on success, negative error code on failure
|
||||||
*/
|
*/
|
||||||
int ol_spectral_info_read(struct target_if_spectral *spectral,
|
static int ol_spectral_info_read(struct target_if_spectral *spectral,
|
||||||
enum ol_spectral_info_spec specifier,
|
enum ol_spectral_info_spec specifier,
|
||||||
void *output,
|
void *output,
|
||||||
int output_len)
|
int output_len)
|
||||||
@@ -533,7 +537,7 @@ int ol_spectral_info_read(struct target_if_spectral *spectral,
|
|||||||
*
|
*
|
||||||
* Return: 0 on success, negative error code on failure
|
* Return: 0 on success, negative error code on failure
|
||||||
*/
|
*/
|
||||||
int ol_spectral_info_write(struct target_if_spectral *spectral,
|
static int ol_spectral_info_write(struct target_if_spectral *spectral,
|
||||||
enum ol_spectral_info_spec specifier,
|
enum ol_spectral_info_spec specifier,
|
||||||
void *input,
|
void *input,
|
||||||
int input_len)
|
int input_len)
|
||||||
@@ -1163,7 +1167,7 @@ void init_spectral_capability(struct target_if_spectral *spectral)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_init_spectral_ops_common(void)
|
static void target_if_init_spectral_ops_common(void)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
||||||
|
|
||||||
@@ -1171,7 +1175,7 @@ void target_if_init_spectral_ops_common(void)
|
|||||||
p_sops->get_capability = target_if_spectral_get_capability;
|
p_sops->get_capability = target_if_spectral_get_capability;
|
||||||
p_sops->set_rxfilter = target_if_spectral_set_rxfilter;
|
p_sops->set_rxfilter = target_if_spectral_set_rxfilter;
|
||||||
p_sops->get_rxfilter = target_if_spectral_get_rxfilter;
|
p_sops->get_rxfilter = target_if_spectral_get_rxfilter;
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
/* Spectral simulation is currently intended for platform transitions
|
/* Spectral simulation is currently intended for platform transitions
|
||||||
* where underlying HW support may not be available for some time.
|
* where underlying HW support may not be available for some time.
|
||||||
* Hence, we do not currently provide a runtime switch to turn the
|
* Hence, we do not currently provide a runtime switch to turn the
|
||||||
@@ -1217,7 +1221,7 @@ void target_if_init_spectral_ops_common(void)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_init_spectral_ops_gen2(void)
|
static void target_if_init_spectral_ops_gen2(void)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
||||||
|
|
||||||
@@ -1230,7 +1234,7 @@ void target_if_init_spectral_ops_gen2(void)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_init_spectral_ops_gen3(void)
|
static void target_if_init_spectral_ops_gen3(void)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
||||||
|
|
||||||
@@ -1244,7 +1248,7 @@ void target_if_init_spectral_ops_gen3(void)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_init_spectral_ops(struct target_if_spectral *spectral)
|
static void target_if_init_spectral_ops(struct target_if_spectral *spectral)
|
||||||
{
|
{
|
||||||
target_if_init_spectral_ops_common();
|
target_if_init_spectral_ops_common();
|
||||||
if (spectral->spectral_gen == SPECTRAL_GEN2)
|
if (spectral->spectral_gen == SPECTRAL_GEN2)
|
||||||
@@ -1401,7 +1405,7 @@ static int null_spectral_process_phyerr(
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_spectral_init_dummy_function_table(
|
static void target_if_spectral_init_dummy_function_table(
|
||||||
struct target_if_spectral *ps)
|
struct target_if_spectral *ps)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = GET_TIF_SPECTRAL_OPS(ps);
|
struct target_if_spectral_ops *p_sops = GET_TIF_SPECTRAL_OPS(ps);
|
||||||
@@ -1435,7 +1439,7 @@ void target_if_spectral_init_dummy_function_table(
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_spectral_register_funcs(
|
static void target_if_spectral_register_funcs(
|
||||||
struct target_if_spectral *spectral,
|
struct target_if_spectral *spectral,
|
||||||
struct target_if_spectral_ops *p)
|
struct target_if_spectral_ops *p)
|
||||||
{
|
{
|
||||||
@@ -1468,7 +1472,7 @@ void target_if_spectral_register_funcs(
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void target_if_spectral_clear_stats(struct target_if_spectral *spectral)
|
static void target_if_spectral_clear_stats(struct target_if_spectral *spectral)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = GET_TIF_SPECTRAL_OPS(spectral);
|
struct target_if_spectral_ops *p_sops = GET_TIF_SPECTRAL_OPS(spectral);
|
||||||
|
|
||||||
@@ -1485,7 +1489,8 @@ void target_if_spectral_clear_stats(struct target_if_spectral *spectral)
|
|||||||
*
|
*
|
||||||
* Return: True if HW supports Spectral, false if HW does not support Spectral
|
* Return: True if HW supports Spectral, false if HW does not support Spectral
|
||||||
*/
|
*/
|
||||||
int target_if_spectral_check_hw_capability(struct target_if_spectral *spectral)
|
static int target_if_spectral_check_hw_capability(
|
||||||
|
struct target_if_spectral *spectral)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
struct spectral_caps *pcap = NULL;
|
struct spectral_caps *pcap = NULL;
|
||||||
@@ -1586,7 +1591,7 @@ static void target_if_spectral_detach(struct target_if_spectral *spectral)
|
|||||||
qdf_print("spectral detach\n");
|
qdf_print("spectral detach\n");
|
||||||
qdf_spinlock_destroy(&spectral->ol_info.osps_lock);
|
qdf_spinlock_destroy(&spectral->ol_info.osps_lock);
|
||||||
|
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
target_if_spectral_sim_detach(spectral);
|
target_if_spectral_sim_detach(spectral);
|
||||||
#endif /* QCA_SUPPORT_SPECTRAL_SIMULATION */
|
#endif /* QCA_SUPPORT_SPECTRAL_SIMULATION */
|
||||||
|
|
||||||
@@ -1615,16 +1620,19 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
struct ol_ath_softc_net80211 *scn = NULL;
|
struct ol_ath_softc_net80211 *scn = NULL;
|
||||||
|
#endif
|
||||||
struct pdev_osif_priv *osif_priv = NULL;
|
struct pdev_osif_priv *osif_priv = NULL;
|
||||||
|
|
||||||
osif_priv = wlan_pdev_get_ospriv(pdev);
|
osif_priv = wlan_pdev_get_ospriv(pdev);
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
scn = (struct ol_ath_softc_net80211 *)osif_priv->legacy_osif_priv;
|
scn = (struct ol_ath_softc_net80211 *)osif_priv->legacy_osif_priv;
|
||||||
if (!scn) {
|
if (!scn) {
|
||||||
qdf_print("%s: scn is NULL!\n", __func__);
|
qdf_print("%s: scn is NULL!\n", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
spectral = (struct target_if_spectral *)qdf_mem_malloc(
|
spectral = (struct target_if_spectral *)qdf_mem_malloc(
|
||||||
sizeof(struct target_if_spectral));
|
sizeof(struct target_if_spectral));
|
||||||
if (!spectral) {
|
if (!spectral) {
|
||||||
@@ -1666,7 +1674,7 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
|
|
||||||
/* Set the default values for spectral parameters */
|
/* Set the default values for spectral parameters */
|
||||||
target_if_spectral_init_param_defaults(spectral);
|
target_if_spectral_init_param_defaults(spectral);
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
if ((scn->soc->target_type == TARGET_TYPE_QCA8074) || (
|
if ((scn->soc->target_type == TARGET_TYPE_QCA8074) || (
|
||||||
scn->soc->target_type == TARGET_TYPE_QCA6290)) {
|
scn->soc->target_type == TARGET_TYPE_QCA6290)) {
|
||||||
spectral->spectral_gen = SPECTRAL_GEN3;
|
spectral->spectral_gen = SPECTRAL_GEN3;
|
||||||
@@ -1683,8 +1691,15 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
spectral->tag_sscan_fft_exp = TLV_TAG_SEARCH_FFT_REPORT_GEN2;
|
spectral->tag_sscan_fft_exp = TLV_TAG_SEARCH_FFT_REPORT_GEN2;
|
||||||
spectral->tlvhdr_size = sizeof(SPECTRAL_PHYERR_TLV_GEN2);
|
spectral->tlvhdr_size = sizeof(SPECTRAL_PHYERR_TLV_GEN2);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
spectral->spectral_gen = SPECTRAL_GEN3;
|
||||||
|
spectral->hdr_sig_exp = SPECTRAL_PHYERR_SIGNATURE_GEN3;
|
||||||
|
spectral->tag_sscan_summary_exp =
|
||||||
|
TLV_TAG_SPECTRAL_SUMMARY_REPORT_GEN3;
|
||||||
|
spectral->tag_sscan_fft_exp = TLV_TAG_SEARCH_FFT_REPORT_GEN3;
|
||||||
|
spectral->tlvhdr_size = SPECTRAL_PHYERR_TLVSIZE_GEN3;
|
||||||
|
#endif
|
||||||
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
if (target_if_spectral_sim_attach(spectral)) {
|
if (target_if_spectral_sim_attach(spectral)) {
|
||||||
qdf_mem_free(spectral);
|
qdf_mem_free(spectral);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1707,7 +1722,7 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
spectral->is_160_format = false;
|
spectral->is_160_format = false;
|
||||||
spectral->is_lb_edge_extrabins_format = false;
|
spectral->is_lb_edge_extrabins_format = false;
|
||||||
spectral->is_rb_edge_extrabins_format = false;
|
spectral->is_rb_edge_extrabins_format = false;
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
if (scn->soc->target_type == TARGET_TYPE_QCA9984 ||
|
if (scn->soc->target_type == TARGET_TYPE_QCA9984 ||
|
||||||
scn->soc->target_type == TARGET_TYPE_QCA9888) {
|
scn->soc->target_type == TARGET_TYPE_QCA9888) {
|
||||||
spectral->is_160_format = true;
|
spectral->is_160_format = true;
|
||||||
@@ -1721,6 +1736,11 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
if (scn->soc->target_type == TARGET_TYPE_QCA9984 ||
|
if (scn->soc->target_type == TARGET_TYPE_QCA9984 ||
|
||||||
scn->soc->target_type == TARGET_TYPE_QCA9888)
|
scn->soc->target_type == TARGET_TYPE_QCA9888)
|
||||||
spectral->is_sec80_rssi_war_required = true;
|
spectral->is_sec80_rssi_war_required = true;
|
||||||
|
#else
|
||||||
|
spectral->is_160_format = true;
|
||||||
|
spectral->is_lb_edge_extrabins_format = true;
|
||||||
|
spectral->is_rb_edge_extrabins_format = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return spectral;
|
return spectral;
|
||||||
@@ -1733,7 +1753,7 @@ void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
static void target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
|
void target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
|
|
||||||
@@ -1743,6 +1763,8 @@ static void target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
target_if_spectral_detach(spectral);
|
target_if_spectral_detach(spectral);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1755,7 +1777,7 @@ static void target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: 1 on success, 0 on failure
|
* Return: 1 on success, 0 on failure
|
||||||
*/
|
*/
|
||||||
static int target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
int target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||||
const u_int32_t threshtype,
|
const u_int32_t threshtype,
|
||||||
const u_int32_t value)
|
const u_int32_t value)
|
||||||
{
|
{
|
||||||
@@ -1911,7 +1933,7 @@ static void init_upper_lower_flags(struct target_if_spectral *spectral)
|
|||||||
*
|
*
|
||||||
* Return: 1 on success, 0 on failure.
|
* Return: 1 on success, 0 on failure.
|
||||||
*/
|
*/
|
||||||
static void target_if_get_spectral_config(struct wlan_objmgr_pdev *pdev,
|
void target_if_get_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||||
struct spectral_config *param)
|
struct spectral_config *param)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
@@ -1935,7 +1957,7 @@ static void target_if_get_spectral_config(struct wlan_objmgr_pdev *pdev,
|
|||||||
*
|
*
|
||||||
* Return: 0 on success, 1 on failure
|
* Return: 0 on success, 1 on failure
|
||||||
*/
|
*/
|
||||||
static int target_if_spectral_scan_enable_params(
|
int target_if_spectral_scan_enable_params(
|
||||||
struct target_if_spectral *spectral,
|
struct target_if_spectral *spectral,
|
||||||
struct spectral_config *spectral_params)
|
struct spectral_config *spectral_params)
|
||||||
{
|
{
|
||||||
@@ -1987,7 +2009,7 @@ static int target_if_spectral_scan_enable_params(
|
|||||||
spectral->rb_edge_extrabins = 4;
|
spectral->rb_edge_extrabins = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spectral->ch_width == IEEE80211_CWM_WIDTH20) {
|
if (spectral->ch_width == CH_WIDTH_20MHZ) {
|
||||||
/* qdf_print("SPECTRAL : (11AC) 20MHz Channel Width
|
/* qdf_print("SPECTRAL : (11AC) 20MHz Channel Width
|
||||||
* (Channel = %d)\n", current_channel);
|
* (Channel = %d)\n", current_channel);
|
||||||
*/
|
*/
|
||||||
@@ -2006,7 +2028,7 @@ static int target_if_spectral_scan_enable_params(
|
|||||||
current_channel;
|
current_channel;
|
||||||
spectral->classifier_params.upper_chan_in_mhz = 0;
|
spectral->classifier_params.upper_chan_in_mhz = 0;
|
||||||
|
|
||||||
} else if (spectral->ch_width == IEEE80211_CWM_WIDTH40) {
|
} else if (spectral->ch_width == CH_WIDTH_40MHZ) {
|
||||||
/* qdf_print("SPECTRAL : (11AC) 40MHz Channel Width
|
/* qdf_print("SPECTRAL : (11AC) 40MHz Channel Width
|
||||||
* (Channel = %d)\n", current_channel);
|
* (Channel = %d)\n", current_channel);
|
||||||
*/
|
*/
|
||||||
@@ -2034,7 +2056,7 @@ static int target_if_spectral_scan_enable_params(
|
|||||||
extension_channel;
|
extension_channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (spectral->ch_width == IEEE80211_CWM_WIDTH80) {
|
} else if (spectral->ch_width == CH_WIDTH_80MHZ) {
|
||||||
/* qdf_print("SPECTRAL : (11AC) 80MHz Channel Width
|
/* qdf_print("SPECTRAL : (11AC) 80MHz Channel Width
|
||||||
* (Channel = %d)\n", current_channel);
|
* (Channel = %d)\n", current_channel);
|
||||||
*/
|
*/
|
||||||
@@ -2070,7 +2092,7 @@ static int target_if_spectral_scan_enable_params(
|
|||||||
extension_channel;
|
extension_channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (spectral->ch_width == IEEE80211_CWM_WIDTH160) {
|
} else if (spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||||
/* qdf_print("SPECTRAL : (11AC) 160MHz Channel Width
|
/* qdf_print("SPECTRAL : (11AC) 160MHz Channel Width
|
||||||
* (Channel = %d)\n", current_channel);
|
* (Channel = %d)\n", current_channel);
|
||||||
*/
|
*/
|
||||||
@@ -2243,7 +2265,7 @@ static int target_if_spectral_scan_enable_params(
|
|||||||
*
|
*
|
||||||
* Return: 0 in case of success, -1 on failure
|
* Return: 0 in case of success, -1 on failure
|
||||||
*/
|
*/
|
||||||
static int target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev)
|
int target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
@@ -2315,7 +2337,7 @@ void target_if_stop_spectral_scan(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: True if Spectral is active, false if Spectral is not active
|
* Return: True if Spectral is active, false if Spectral is not active
|
||||||
*/
|
*/
|
||||||
static bool target_if_is_spectral_active(struct wlan_objmgr_pdev *pdev)
|
bool target_if_is_spectral_active(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
@@ -2331,7 +2353,7 @@ static bool target_if_is_spectral_active(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: True if Spectral is enabled, false if Spectral is not enabled
|
* Return: True if Spectral is enabled, false if Spectral is not enabled
|
||||||
*/
|
*/
|
||||||
static bool target_if_is_spectral_enabled(struct wlan_objmgr_pdev *pdev)
|
bool target_if_is_spectral_enabled(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
struct target_if_spectral_ops *p_sops = NULL;
|
struct target_if_spectral_ops *p_sops = NULL;
|
||||||
@@ -2348,7 +2370,7 @@ static bool target_if_is_spectral_enabled(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: 0 in case of success
|
* Return: 0 in case of success
|
||||||
*/
|
*/
|
||||||
static int target_if_set_debug_level(struct wlan_objmgr_pdev *pdev,
|
int target_if_set_debug_level(struct wlan_objmgr_pdev *pdev,
|
||||||
u_int32_t debug_level)
|
u_int32_t debug_level)
|
||||||
{
|
{
|
||||||
spectral_debug_level = (ATH_DEBUG_SPECTRAL << debug_level);
|
spectral_debug_level = (ATH_DEBUG_SPECTRAL << debug_level);
|
||||||
@@ -2361,7 +2383,7 @@ static int target_if_set_debug_level(struct wlan_objmgr_pdev *pdev,
|
|||||||
*
|
*
|
||||||
* Return: Current debug level
|
* Return: Current debug level
|
||||||
*/
|
*/
|
||||||
static u_int32_t target_if_get_debug_level(struct wlan_objmgr_pdev *pdev)
|
u_int32_t target_if_get_debug_level(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
return spectral_debug_level;
|
return spectral_debug_level;
|
||||||
}
|
}
|
||||||
@@ -2373,7 +2395,7 @@ static u_int32_t target_if_get_debug_level(struct wlan_objmgr_pdev *pdev)
|
|||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
static void target_if_get_spectral_capinfo(
|
void target_if_get_spectral_capinfo(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
void *outdata)
|
void *outdata)
|
||||||
{
|
{
|
||||||
@@ -2391,7 +2413,7 @@ static void target_if_get_spectral_capinfo(
|
|||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
static void target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
void target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
||||||
void *outdata)
|
void *outdata)
|
||||||
{
|
{
|
||||||
struct target_if_spectral *spectral = NULL;
|
struct target_if_spectral *spectral = NULL;
|
||||||
|
@@ -23,12 +23,11 @@
|
|||||||
#include <wlan_objmgr_cmn.h>
|
#include <wlan_objmgr_cmn.h>
|
||||||
#include <wlan_objmgr_psoc_obj.h>
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
#include <wlan_objmgr_pdev_obj.h>
|
#include <wlan_objmgr_pdev_obj.h>
|
||||||
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
#include <qdf_lock.h>
|
#include <qdf_lock.h>
|
||||||
#include <wlan_spectral_public_structs.h>
|
#include <wlan_spectral_public_structs.h>
|
||||||
#include <reg_services_public_struct.h>
|
#include <reg_services_public_struct.h>
|
||||||
|
|
||||||
extern int spectral_debug_level;
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#pragma pack(push, target_if_spectral, 1)
|
#pragma pack(push, target_if_spectral, 1)
|
||||||
#define __ATTRIB_PACK
|
#define __ATTRIB_PACK
|
||||||
@@ -771,7 +770,7 @@ struct target_if_spectral {
|
|||||||
bool is_lb_edge_extrabins_format;
|
bool is_lb_edge_extrabins_format;
|
||||||
bool is_rb_edge_extrabins_format;
|
bool is_rb_edge_extrabins_format;
|
||||||
bool is_sec80_rssi_war_required;
|
bool is_sec80_rssi_war_required;
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
void *simctx;
|
void *simctx;
|
||||||
#endif
|
#endif
|
||||||
enum spectral_gen spectral_gen;
|
enum spectral_gen spectral_gen;
|
||||||
@@ -843,6 +842,15 @@ struct target_if_samp_msg_params {
|
|||||||
#endif /* VERSION CHECK */
|
#endif /* VERSION CHECK */
|
||||||
#endif /* SPECTRAL_USE_NETLINK_SOCKETS defined */
|
#endif /* SPECTRAL_USE_NETLINK_SOCKETS defined */
|
||||||
|
|
||||||
|
#if (KERNEL_VERSION(2, 6, 31) > LINUX_VERSION_CODE)
|
||||||
|
void target_if_spectral_nl_data_ready(struct sock *sk, int len);
|
||||||
|
#else
|
||||||
|
void target_if_spectral_nl_data_ready(struct sk_buff *skb);
|
||||||
|
#endif
|
||||||
|
int target_if_spectral_dump_fft(u_int8_t *pfft, int fftlen);
|
||||||
|
void target_if_dbg_print_SAMP_param(struct target_if_samp_msg_params *p);
|
||||||
|
uint32_t target_if_get_offset_swar_sec80(uint32_t channel_width);
|
||||||
|
|
||||||
void target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
|
void target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
|
||||||
extern struct net init_net;
|
extern struct net init_net;
|
||||||
int target_if_spectral_init_netlink(struct target_if_spectral *spectral);
|
int target_if_spectral_init_netlink(struct target_if_spectral *spectral);
|
||||||
@@ -1024,6 +1032,315 @@ void target_if_spectral_process_phyerr(
|
|||||||
tsf64, acs_stats);
|
tsf64, acs_stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_if_is_spectral_enabled() - Get whether Spectral is enabled
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: True if Spectral is enabled, false if Spectral is not enabled
|
||||||
|
*/
|
||||||
|
u_int32_t tgt_if_is_spectral_enabled(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_if_is_spectral_active() - Get whether Spectral is active
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: True if Spectral is active, false if Spectral is not active
|
||||||
|
*/
|
||||||
|
u_int32_t tgt_if_is_spectral_active(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_if_start_spectral_scan() - Start Spectral scan
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure
|
||||||
|
*/
|
||||||
|
u_int32_t tgt_if_start_spectral_scan(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tgt_if_stop_spectral_scan() - Stop Spectral scan
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure
|
||||||
|
*/
|
||||||
|
u_int32_t tgt_if_stop_spectral_scan(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_extension_channel() - Get the current Extension
|
||||||
|
* channel (in MHz)
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: Current Extension channel (in MHz) on success, 0 on failure or if
|
||||||
|
* extension channel is not present.
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_extension_channel(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_current_channel() - Get the current channel (in MHz)
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Return: Current channel (in MHz) on success, 0 on failure
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_current_channel(void *arg);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_reset_hw() - Reset the hardware
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* This is only a placeholder since it is not currently required in the offload
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_reset_hw(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_chain_noise_floor() - Get the Chain noise floor from
|
||||||
|
* Noisefloor history buffer
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
* @nf_buf: Pointer to buffer into which chain Noise Floor data should be copied
|
||||||
|
*
|
||||||
|
* This is only a placeholder since it is not currently required in the offload
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_chain_noise_floor(void *arg, int16_t *nf_buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_ext_noisefloor() - Get the extension channel
|
||||||
|
* noisefloor
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* This is only a placeholder since it is not currently required in the offload
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
int8_t target_if_spectral_get_ext_noisefloor(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_ctl_noisefloor() - Get the control channel noisefloor
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* This is only a placeholder since it is not currently required in the offload
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
int8_t target_if_spectral_get_ctl_noisefloor(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_capability() - Get whether a given Spectral hardware
|
||||||
|
* capability is available
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
* @type: Spectral hardware capability type
|
||||||
|
*
|
||||||
|
* Return: True if the capability is available, false if the capability is not
|
||||||
|
* available
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_capability(
|
||||||
|
void *arg, SPECTRAL_CAPABILITY_TYPE type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_set_rxfilter() - Set the RX Filter before Spectral start
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
* @rxfilter: Rx filter to be used
|
||||||
|
*
|
||||||
|
* Note: This is only a placeholder function. It is not currently required since
|
||||||
|
* FW should be taking care of setting the required filters.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_set_rxfilter(void *arg, int rxfilter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_configure_params() - Configure user supplied Spectral
|
||||||
|
* parameters
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
* @params: Spectral parameters
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure.
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_configure_params(
|
||||||
|
void *arg, struct spectral_config *params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_rxfilter() - Get the current RX Filter settings
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* Note: This is only a placeholder function. It is not currently required since
|
||||||
|
* FW should be taking care of setting the required filters.
|
||||||
|
*
|
||||||
|
* Return: 0
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_rxfilter(void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_pdev_spectral_deinit() - De-initialize target_if Spectral
|
||||||
|
* functionality for the given pdev
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_set_spectral_config() - Set spectral config
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @threshtype: config type
|
||||||
|
* @value: config value
|
||||||
|
*
|
||||||
|
* API to set spectral configurations
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure
|
||||||
|
*/
|
||||||
|
int target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||||
|
const u_int32_t threshtype,
|
||||||
|
const u_int32_t value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_pdev_spectral_init() - Initialize target_if Spectral
|
||||||
|
* functionality for the given pdev
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: On success, pointer to Spectral target_if internal private data, on
|
||||||
|
* failure, NULL
|
||||||
|
*/
|
||||||
|
void *target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_get_params() - Get user configured Spectral parameters
|
||||||
|
* @arg: Pointer to handle for Spectral target_if internal private data
|
||||||
|
* @params: Pointer to buffer into which Spectral parameters should be copied
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure.
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_spectral_get_params(
|
||||||
|
void *arg, struct spectral_config *params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* init_spectral_capability() - Initialize Spectral capability
|
||||||
|
* @spectral: Pointer to Spectral target_if internal private data
|
||||||
|
*
|
||||||
|
* This is a workaround.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void init_spectral_capability(
|
||||||
|
struct target_if_spectral *spectral);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_start_spectral_scan() - Start spectral scan
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* API to start spectral scan
|
||||||
|
*
|
||||||
|
* Return: 0 in case of success, -1 on failure
|
||||||
|
*/
|
||||||
|
int target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev);
|
||||||
|
/**
|
||||||
|
* target_if_get_spectral_config() - Get spectral configuration
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @param: Pointer to spectral_config structure in which the configuration
|
||||||
|
* should be returned
|
||||||
|
*
|
||||||
|
* API to get the current spectral configuration
|
||||||
|
*
|
||||||
|
* Return: 1 on success, 0 on failure.
|
||||||
|
*/
|
||||||
|
void target_if_get_spectral_config(struct wlan_objmgr_pdev *pdev,
|
||||||
|
struct spectral_config *param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_spectral_scan_enable_params() - Enable use of desired Spectral
|
||||||
|
* parameters
|
||||||
|
* @spectral: Pointer to Spectral target_if internal private data
|
||||||
|
* @spectral_params: Pointer to Spectral parameters
|
||||||
|
*
|
||||||
|
* Enable use of desired Spectral parameters by configuring them into HW, and
|
||||||
|
* starting Spectral scan
|
||||||
|
*
|
||||||
|
* Return: 0 on success, 1 on failure
|
||||||
|
*/
|
||||||
|
int target_if_spectral_scan_enable_params(
|
||||||
|
struct target_if_spectral *spectral, struct spectral_config *spectral_params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_is_spectral_active() - Get whether Spectral is active
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: True if Spectral is active, false if Spectral is not active
|
||||||
|
*/
|
||||||
|
bool target_if_is_spectral_active(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_is_spectral_enabled() - Get whether Spectral is enabled
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: True if Spectral is enabled, false if Spectral is not enabled
|
||||||
|
*/
|
||||||
|
bool target_if_is_spectral_enabled(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_set_debug_level() - Set debug level for Spectral
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @debug_level: Debug level
|
||||||
|
*
|
||||||
|
* Return: 0 in case of success
|
||||||
|
*/
|
||||||
|
int target_if_set_debug_level(struct wlan_objmgr_pdev *pdev,
|
||||||
|
u_int32_t debug_level);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_get_debug_level() - Get debug level for Spectral
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
*
|
||||||
|
* Return: Current debug level
|
||||||
|
*/
|
||||||
|
u_int32_t target_if_get_debug_level(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_get_spectral_capinfo() - Get Spectral capability information
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @outdata: Buffer into which data should be copied
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void target_if_get_spectral_capinfo(
|
||||||
|
struct wlan_objmgr_pdev *pdev,
|
||||||
|
void *outdata);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_get_spectral_diagstats() - Get Spectral diagnostic statistics
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @outdata: Buffer into which data should be copied
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void target_if_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev,
|
||||||
|
void *outdata);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* target_if_spectral_send_tlv_to_host - target_if_spectral_send_tlv_to_host
|
||||||
|
* @spectral: Send the TLV information to Host
|
||||||
|
* @data: Pointer to the TLV
|
||||||
|
* @datalen: tlv length
|
||||||
|
*
|
||||||
|
* Return: Success/Failure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int target_if_spectral_send_tlv_to_host(
|
||||||
|
struct target_if_spectral *spectral,
|
||||||
|
u_int8_t *data, u_int32_t datalen);
|
||||||
|
|
||||||
|
void target_if_register_wmi_spectral_cmd_ops(
|
||||||
|
struct wlan_objmgr_pdev *pdev,
|
||||||
|
struct wmi_spectral_cmd_ops *cmd_ops);
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#pragma pack(pop, target_if_spectral)
|
#pragma pack(pop, target_if_spectral)
|
||||||
#endif
|
#endif
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
#include <target_if_spectral.h>
|
#include <target_if_spectral.h>
|
||||||
#include <wlan_lmac_if_def.h>
|
#include <wlan_lmac_if_def.h>
|
||||||
#include <wlan_osif_priv.h>
|
#include <wlan_osif_priv.h>
|
||||||
|
#include <reg_services_public_struct.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef SPECTRAL_USE_NETLINK_SOCKETS
|
#ifdef SPECTRAL_USE_NETLINK_SOCKETS
|
||||||
struct sock *target_if_spectral_nl_sock;
|
struct sock *target_if_spectral_nl_sock;
|
||||||
@@ -247,7 +249,7 @@ void target_if_spectral_create_samp_msg(
|
|||||||
temp_samp_msg_len = sizeof(SPECTRAL_SAMP_MSG) -
|
temp_samp_msg_len = sizeof(SPECTRAL_SAMP_MSG) -
|
||||||
(MAX_NUM_BINS * sizeof(u_int8_t));
|
(MAX_NUM_BINS * sizeof(u_int8_t));
|
||||||
temp_samp_msg_len += (params->pwr_count * sizeof(u_int8_t));
|
temp_samp_msg_len += (params->pwr_count * sizeof(u_int8_t));
|
||||||
if (spectral->ch_width == IEEE80211_CWM_WIDTH160)
|
if (spectral->ch_width == CH_WIDTH_160MHZ)
|
||||||
temp_samp_msg_len +=
|
temp_samp_msg_len +=
|
||||||
(params->pwr_count_sec80 * sizeof(u_int8_t));
|
(params->pwr_count_sec80 * sizeof(u_int8_t));
|
||||||
bin_pwr_data = params->bin_pwr_data;
|
bin_pwr_data = params->bin_pwr_data;
|
||||||
@@ -337,7 +339,7 @@ void target_if_spectral_create_samp_msg(
|
|||||||
spec_samp_msg.vhtop_ch_freq_seg2 =
|
spec_samp_msg.vhtop_ch_freq_seg2 =
|
||||||
params->vhtop_ch_freq_seg2;
|
params->vhtop_ch_freq_seg2;
|
||||||
|
|
||||||
if (spectral->ch_width == IEEE80211_CWM_WIDTH160) {
|
if (spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||||
spec_samp_msg.samp_data.spectral_rssi_sec80 = params->rssi_sec80;
|
spec_samp_msg.samp_data.spectral_rssi_sec80 = params->rssi_sec80;
|
||||||
spec_samp_msg.samp_data.noise_floor_sec80 = params->noise_floor_sec80;
|
spec_samp_msg.samp_data.noise_floor_sec80 = params->noise_floor_sec80;
|
||||||
|
|
||||||
|
@@ -26,7 +26,12 @@
|
|||||||
#include <target_if_spectral.h>
|
#include <target_if_spectral.h>
|
||||||
#include <wlan_lmac_if_def.h>
|
#include <wlan_lmac_if_def.h>
|
||||||
#include <wlan_osif_priv.h>
|
#include <wlan_osif_priv.h>
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
#include <osif_rawmode_sim.h>
|
#include <osif_rawmode_sim.h>
|
||||||
|
#endif /*CONFIG_WIN*/
|
||||||
|
#include <reg_services_public_struct.h>
|
||||||
|
extern int spectral_debug_level;
|
||||||
|
|
||||||
/* START of spectral GEN II HW specific function declarations */
|
/* START of spectral GEN II HW specific function declarations */
|
||||||
static int dump_summary_report_gen2(
|
static int dump_summary_report_gen2(
|
||||||
SPECTRAL_PHYERR_TLV_GEN2 *ptlv,
|
SPECTRAL_PHYERR_TLV_GEN2 *ptlv,
|
||||||
@@ -206,16 +211,16 @@ uint32_t target_if_get_offset_swar_sec80(uint32_t channel_width)
|
|||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
|
|
||||||
switch (channel_width) {
|
switch (channel_width) {
|
||||||
case IEEE80211_CWM_WIDTH20:
|
case CH_WIDTH_20MHZ:
|
||||||
offset = OFFSET_CH_WIDTH_20;
|
offset = OFFSET_CH_WIDTH_20;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_CWM_WIDTH40:
|
case CH_WIDTH_40MHZ:
|
||||||
offset = OFFSET_CH_WIDTH_40;
|
offset = OFFSET_CH_WIDTH_40;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_CWM_WIDTH80:
|
case CH_WIDTH_80MHZ:
|
||||||
offset = OFFSET_CH_WIDTH_80;
|
offset = OFFSET_CH_WIDTH_80;
|
||||||
break;
|
break;
|
||||||
case IEEE80211_CWM_WIDTH160:
|
case CH_WIDTH_160MHZ:
|
||||||
offset = OFFSET_CH_WIDTH_160;
|
offset = OFFSET_CH_WIDTH_160;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -890,7 +895,7 @@ int spectral_process_phyerr_gen2(
|
|||||||
acs_stats->nfc_ext_rssi = extension_rssi;
|
acs_stats->nfc_ext_rssi = extension_rssi;
|
||||||
|
|
||||||
if (spectral->is_160_format &&
|
if (spectral->is_160_format &&
|
||||||
spectral->ch_width == IEEE80211_CWM_WIDTH160) {
|
spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||||
/* We expect to see one more Search FFT report, and it should
|
/* We expect to see one more Search FFT report, and it should
|
||||||
* be equal in size to the current one.
|
* be equal in size to the current one.
|
||||||
*/
|
*/
|
||||||
@@ -1293,7 +1298,7 @@ int spectral_dump_fft_report_gen3(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int consume_searchfft_report_gen3(
|
static int consume_searchfft_report_gen3(
|
||||||
struct target_if_spectral *spectral,
|
struct target_if_spectral *spectral,
|
||||||
struct phyerr_info *pinfo)
|
struct phyerr_info *pinfo)
|
||||||
{
|
{
|
||||||
@@ -1469,7 +1474,7 @@ int consume_searchfft_report_gen3(
|
|||||||
acs_stats->nfc_ctl_rssi = control_rssi;
|
acs_stats->nfc_ctl_rssi = control_rssi;
|
||||||
acs_stats->nfc_ext_rssi = extension_rssi;
|
acs_stats->nfc_ext_rssi = extension_rssi;
|
||||||
|
|
||||||
if (spectral->ch_width == IEEE80211_CWM_WIDTH160) {
|
if (spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||||
/* We expect to see one more Search FFT report, and it should be
|
/* We expect to see one more Search FFT report, and it should be
|
||||||
* equal in size to the current one.
|
* equal in size to the current one.
|
||||||
*/
|
*/
|
||||||
@@ -1595,7 +1600,9 @@ int spectral_process_phyerr_gen3(
|
|||||||
"purpose\n");
|
"purpose\n");
|
||||||
qdf_print("Dalalength of buffer = 0x%x(%d)\n",
|
qdf_print("Dalalength of buffer = 0x%x(%d)\n",
|
||||||
datalen, datalen);
|
datalen, datalen);
|
||||||
|
#ifdef CONFIG_WIN
|
||||||
RAWSIM_PKT_HEXDUMP(data, datalen);
|
RAWSIM_PKT_HEXDUMP(data, datalen);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Peek into the data to figure out whether
|
/* Peek into the data to figure out whether
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
#include "target_if_spectral.h"
|
#include "target_if_spectral.h"
|
||||||
#include "target_if_spectral_sim.h"
|
#include "target_if_spectral_sim.h"
|
||||||
#include "target_if_spectral_sim_int.h"
|
#include "target_if_spectral_sim_int.h"
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef _SPECTRAL_SIM_H_
|
#ifndef _SPECTRAL_SIM_H_
|
||||||
#define _SPECTRAL_SIM_H_
|
#define _SPECTRAL_SIM_H_
|
||||||
|
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
#include "target_if_spectral.h"
|
#include "target_if_spectral.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef _SPECTRAL_SIM_INTERNAL_H_
|
#ifndef _SPECTRAL_SIM_INTERNAL_H_
|
||||||
#define _SPECTRAL_SIM_INTERNAL_H_
|
#define _SPECTRAL_SIM_INTERNAL_H_
|
||||||
|
|
||||||
#if QCA_SUPPORT_SPECTRAL_SIMULATION
|
#ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
|
||||||
#include "target_if_spectral.h"
|
#include "target_if_spectral.h"
|
||||||
|
|
||||||
/* #define SPECTRAL_SIM_DUMP_PARAM_DATA 1 */
|
/* #define SPECTRAL_SIM_DUMP_PARAM_DATA 1 */
|
||||||
|
Reference in New Issue
Block a user