qcacmn: Enable spectral registration to direct dma
Enable registration of spectral feature to direct dma CRs-Fixed: 2219121 Change-Id: I483e87b9a6c7dcd297bc8b88d24c49e8d80ed547
This commit is contained in:

committed by
nshrivas

parent
24a08f2ad9
commit
01b4921127
@@ -1447,8 +1447,10 @@ target_if_init_spectral_ops_gen2(void)
|
||||
static void
|
||||
target_if_init_spectral_ops_gen3(void)
|
||||
{
|
||||
/* Placeholder */
|
||||
spectral_debug("Placeholder for gen3 spectral ops registration");
|
||||
struct target_if_spectral_ops *p_sops = &spectral_ops;
|
||||
|
||||
p_sops->process_spectral_report =
|
||||
target_if_spectral_process_report_gen3;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1626,6 +1628,13 @@ null_spectral_process_phyerr(struct target_if_spectral *spectral,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
null_process_spectral_report(struct wlan_objmgr_pdev *pdev,
|
||||
void *payload)
|
||||
{
|
||||
spectral_ops_not_registered("process_spectral_report");
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* target_if_spectral_init_dummy_function_table() -
|
||||
* Initialize target_if internal
|
||||
@@ -1661,6 +1670,7 @@ target_if_spectral_init_dummy_function_table(struct target_if_spectral *ps)
|
||||
p_sops->reset_hw = null_reset_hw;
|
||||
p_sops->get_chain_noise_floor = null_get_chain_noise_floor;
|
||||
p_sops->spectral_process_phyerr = null_spectral_process_phyerr;
|
||||
p_sops->process_spectral_report = null_process_spectral_report;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1697,6 +1707,7 @@ target_if_spectral_register_funcs(struct target_if_spectral *spectral,
|
||||
p_sops->reset_hw = p->reset_hw;
|
||||
p_sops->get_chain_noise_floor = p->get_chain_noise_floor;
|
||||
p_sops->spectral_process_phyerr = p->spectral_process_phyerr;
|
||||
p_sops->process_spectral_report = p->process_spectral_report;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2823,6 +2834,19 @@ target_if_deregister_netlink_cb(struct wlan_objmgr_pdev *pdev)
|
||||
qdf_mem_zero(&spectral->nl_cb, sizeof(struct spectral_nl_cb));
|
||||
}
|
||||
|
||||
static int
|
||||
target_if_process_spectral_report(struct wlan_objmgr_pdev *pdev,
|
||||
void *payload)
|
||||
{
|
||||
struct target_if_spectral *spectral = NULL;
|
||||
struct target_if_spectral_ops *p_sops = NULL;
|
||||
|
||||
spectral = get_target_if_spectral_handle_from_pdev(pdev);
|
||||
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
|
||||
|
||||
return p_sops->process_spectral_report(pdev, payload);
|
||||
}
|
||||
|
||||
void
|
||||
target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
@@ -2858,6 +2882,8 @@ target_if_sptrl_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
target_if_use_nl_bcast;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_deregister_netlink_cb =
|
||||
target_if_deregister_netlink_cb;
|
||||
tx_ops->sptrl_tx_ops.sptrlto_process_spectral_report =
|
||||
target_if_process_spectral_report;
|
||||
}
|
||||
qdf_export_symbol(target_if_sptrl_register_tx_ops);
|
||||
|
||||
|
@@ -27,8 +27,9 @@
|
||||
#include <qdf_lock.h>
|
||||
#include <wlan_spectral_public_structs.h>
|
||||
#include <reg_services_public_struct.h>
|
||||
#ifdef DIRECT_BUF_RX_ENABLE
|
||||
#include <target_if_direct_buf_rx_api.h>
|
||||
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#pragma pack(push, target_if_spectral, 1)
|
||||
#define __ATTRIB_PACK
|
||||
@@ -443,6 +444,7 @@ struct target_if_spectral_rfqual_info {
|
||||
* @reset_hw: Reset HW
|
||||
* @get_chain_noise_floor: Get Channel noise floor
|
||||
* @spectral_process_phyerr: Process phyerr event
|
||||
* @process_spectral_report: Process spectral report
|
||||
*/
|
||||
struct target_if_spectral_ops {
|
||||
uint64_t (*get_tsf64)(void *arg);
|
||||
@@ -474,6 +476,8 @@ struct target_if_spectral_ops {
|
||||
struct target_if_spectral_chan_info *p_chaninfo,
|
||||
uint64_t tsf64,
|
||||
struct target_if_spectral_acs_stats *acs_stats);
|
||||
int (*process_spectral_report)(struct wlan_objmgr_pdev *pdev,
|
||||
void *payload);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -945,9 +949,9 @@ void target_if_spectral_create_samp_msg(
|
||||
*
|
||||
* Return: Success/Failure
|
||||
*/
|
||||
int target_if_spectral_process_phyerr_gen3(
|
||||
int target_if_spectral_process_report_gen3(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct direct_buf_rx_data *payload);
|
||||
void *buf);
|
||||
|
||||
/**
|
||||
* target_if_process_phyerr_gen2() - Process PHY Error for gen2
|
||||
@@ -1568,6 +1572,18 @@ void target_if_register_wmi_spectral_cmd_ops(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct wmi_spectral_cmd_ops *cmd_ops);
|
||||
|
||||
/**
|
||||
* target_if_consume_sfft_report_gen3() - Process fft report for gen3
|
||||
* @spectral: Pointer to spectral object
|
||||
* @data: Pointer to phyerror data
|
||||
*
|
||||
* Process fft report for gen3
|
||||
*
|
||||
* Return: Success/Failure
|
||||
*/
|
||||
int
|
||||
target_if_consume_spectral_report_gen3(struct target_if_spectral *spectral,
|
||||
uint8_t *data);
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma pack(pop, target_if_spectral)
|
||||
|
@@ -1311,16 +1311,7 @@ target_if_verify_sig_and_tag_gen3(struct target_if_spectral *spectral,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_consume_sfft_report_gen3() - Process fft report for gen3
|
||||
* @spectral: Pointer to spectral object
|
||||
* @data: Pointer to phyerror data
|
||||
*
|
||||
* Process fft report for gen3
|
||||
*
|
||||
* Return: Success/Failure
|
||||
*/
|
||||
static int
|
||||
int
|
||||
target_if_consume_spectral_report_gen3(
|
||||
struct target_if_spectral *spectral,
|
||||
uint8_t *data)
|
||||
@@ -1581,11 +1572,13 @@ target_if_consume_spectral_report_gen3(
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
int target_if_spectral_process_phyerr_gen3(
|
||||
#ifdef DIRECT_BUF_RX_ENABLE
|
||||
int target_if_spectral_process_report_gen3(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct direct_buf_rx_data *payload)
|
||||
void *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
struct direct_buf_rx_data *payload = buf;
|
||||
uint8_t *data = (uint8_t *)payload->vaddr;
|
||||
struct target_if_spectral *spectral;
|
||||
|
||||
@@ -1612,7 +1605,16 @@ int target_if_spectral_process_phyerr_gen3(
|
||||
|
||||
return ret;
|
||||
}
|
||||
qdf_export_symbol(target_if_spectral_process_phyerr_gen3);
|
||||
#else
|
||||
int target_if_spectral_process_report_gen3(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
void *buf)
|
||||
{
|
||||
spectral_err("Direct dma support is not enabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
qdf_export_symbol(target_if_spectral_process_report_gen3);
|
||||
/* END of spectral GEN III HW specific functions */
|
||||
|
||||
#endif /* WLAN_SPECTRAL_ENABLE */
|
||||
|
Reference in New Issue
Block a user