qcacmn: Add support to extract fixed params from Spectral Caps event
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to indicated the different capabilities of the Spectral HW block. Add support to extract the fixed parameters from this event. Change-Id: Ib13108f078de008b6a76a25a010e85a7fdb6f5fe CRs-Fixed: 3098203
This commit is contained in:

committed by
Madan Koyyalamudi

parent
0ae42b09e4
commit
a9547b0f25
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011,2017-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -7022,6 +7022,46 @@ target_if_extract_pdev_spectral_session_detector_info(
|
||||
extract_pdev_spectral_session_detector_info(
|
||||
wmi_handle, evt_buf, det_info, det_info_idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_wmi_extract_spectral_caps_fixed_param() - Wrapper function to
|
||||
* extract fixed params from Spectral capabilities WMI event
|
||||
* @psoc: Pointer to psoc object
|
||||
* @evt_buf: Event buffer
|
||||
* @param: Spectral capabilities event parameters data structure to be filled
|
||||
* by this API
|
||||
*
|
||||
* Return: QDF_STATUS of operation
|
||||
*/
|
||||
QDF_STATUS
|
||||
target_if_wmi_extract_spectral_caps_fixed_param(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *evt_buf,
|
||||
struct spectral_capabilities_event_params *param)
|
||||
{
|
||||
struct target_if_psoc_spectral *psoc_spectral;
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
if (!psoc) {
|
||||
spectral_err("psoc is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
|
||||
if (!wmi_handle) {
|
||||
spectral_err("WMI handle is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
psoc_spectral = get_target_if_spectral_handle_from_psoc(psoc);
|
||||
if (!psoc_spectral) {
|
||||
spectral_err("spectral object is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return psoc_spectral->wmi_ops.extract_spectral_caps_fixed_param(
|
||||
wmi_handle, evt_buf, param);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* target_if_spectral_wmi_unified_register_event_handler() - Wrapper function to
|
||||
@@ -7261,6 +7301,24 @@ target_if_extract_pdev_spectral_session_detector_info(
|
||||
return wmi_extract_pdev_spectral_session_detector_info(
|
||||
wmi_handle, evt_buf, det_info, det_info_idx);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_wmi_extract_spectral_caps_fixed_param(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *evt_buf,
|
||||
struct spectral_capabilities_event_params *param)
|
||||
{
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
|
||||
if (!wmi_handle) {
|
||||
spectral_err("WMI handle is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return wmi_extract_spectral_caps_fixed_param(wmi_handle, evt_buf,
|
||||
param);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011,2017-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -942,6 +942,8 @@ struct vdev_spectral_enable_params;
|
||||
* channel information
|
||||
* @extract_pdev_spectral_session_detector_info: Extract Spectral scan session
|
||||
* detector information
|
||||
* @extract_spectral_caps_fixed_param: Extract fixed parameters from Spectral
|
||||
* capabilities event
|
||||
*/
|
||||
struct spectral_wmi_ops {
|
||||
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
|
||||
@@ -975,6 +977,9 @@ struct spectral_wmi_ops {
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_det_info *det_info,
|
||||
uint8_t det_info_idx);
|
||||
QDF_STATUS (*extract_spectral_caps_fixed_param)(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_capabilities_event_params *param);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2979,4 +2984,20 @@ target_if_spectral_copy_fft_bins(struct target_if_spectral *spectral,
|
||||
uint32_t *bytes_copied,
|
||||
uint16_t pwr_format);
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
struct spectral_capabilities_event_params;
|
||||
/**
|
||||
* target_if_wmi_extract_spectral_caps_fixed_param() - Wrapper function to
|
||||
* extract fixed params from Spectral capabilities WMI event
|
||||
* @psoc: Pointer to psoc object
|
||||
* @evt_buf: Event buffer
|
||||
* @param: Spectral capabilities event parameters data structure to be filled
|
||||
* by this API
|
||||
*
|
||||
* Return: QDF_STATUS of operation
|
||||
*/
|
||||
QDF_STATUS target_if_wmi_extract_spectral_caps_fixed_param(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *evt_buf,
|
||||
struct spectral_capabilities_event_params *param);
|
||||
#endif /* _TARGET_IF_SPECTRAL_H_ */
|
||||
|
Reference in New Issue
Block a user