qcacmn: Add WMI API to Spectral module's interface
Add WMI API "wmi_service_enabled" to Spectral module's interface. CRs-Fixed: 2840141 Change-Id: I2cb6363fd37c858f2a84ba1904c89033720d1a0a
This commit is contained in:
parent
962647ba6c
commit
b3e677f722
@ -43,6 +43,59 @@ struct target_if_spectral_ops spectral_ops;
|
||||
int spectral_debug_level = DEBUG_SPECTRAL;
|
||||
struct spectral_tgt_ops ops_tgt;
|
||||
|
||||
#ifdef SPECTRAL_MODULIZED_ENABLE
|
||||
/**
|
||||
* target_if_spectral_wmi_service_enabled() - API to check whether a
|
||||
* given WMI service is enabled
|
||||
* @psoc: Pointer to psoc
|
||||
* @wmi_handle: WMI handle
|
||||
* @service_id: service id
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool target_if_spectral_wmi_service_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
wmi_unified_t wmi_handle,
|
||||
uint32_t service_id)
|
||||
{
|
||||
struct target_if_psoc_spectral *psoc_spectral;
|
||||
|
||||
if (!psoc) {
|
||||
spectral_err("psoc is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!wmi_handle) {
|
||||
spectral_err("wmi handle is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
psoc_spectral = get_target_if_spectral_handle_from_psoc(psoc);
|
||||
if (!psoc_spectral) {
|
||||
spectral_err("psoc spectral object is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
return psoc_spectral->wmi_ops.wmi_service_enabled(wmi_handle,
|
||||
service_id);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* target_if_spectral_wmi_service_enabled() - API to check whether a
|
||||
* given WMI service is enabled
|
||||
* @psoc: Pointer to psoc
|
||||
* @wmi_handle: WMI handle
|
||||
* @service_id: service id
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool target_if_spectral_wmi_service_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
wmi_unified_t wmi_handle,
|
||||
uint32_t service_id)
|
||||
{
|
||||
return wmi_service_enabled(wmi_handle, service_id);
|
||||
}
|
||||
#endif /* SPECTRAL_MODULIZED_ENABLE */
|
||||
|
||||
static void target_if_spectral_get_firstvdev_pdev(struct wlan_objmgr_pdev *pdev,
|
||||
void *obj, void *arg)
|
||||
{
|
||||
|
@ -829,6 +829,7 @@ struct vdev_spectral_enable_params;
|
||||
* 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
|
||||
* @wmi_service_enabled: API to check whether a given WMI service is enabled
|
||||
*/
|
||||
struct spectral_wmi_ops {
|
||||
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
|
||||
@ -853,6 +854,8 @@ struct spectral_wmi_ops {
|
||||
QDF_STATUS (*wmi_unified_unregister_event_handler)(
|
||||
wmi_unified_t wmi_handle,
|
||||
wmi_conv_event_id event_id);
|
||||
bool (*wmi_service_enabled)(wmi_unified_t wmi_handle,
|
||||
uint32_t service_id);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user