Files
android_kernel_samsung_sm86…/wmi/src/wmi_unified_dfs_api.c
Shashikala Prabhu 7517a8d7b9 qcacmn: Call regdb wrapper functions from other components
Do not call regdb core functions from other components directly.
Instead, call regdb dispatcher  functions.

Also, wlan_objmgr_vdev_obj.h file is removed from reg_services.h file in
Ie43acc03a5c35200f3e43bc978b792d5047eeb77 and reg_services.h is removed
from wlan_reg_services_api.h in I891b14fac7a4eddf2697d2ecdc0ac4a82046f532.
Therefore to fix "'struct wlan_channel' declared inside parameter list"
error in wlan_dfs_utils_api.h file, I have included wlan_objmgr_vdev_obj.h
file before wlan_dfs_utils_api.h in scan, dfs and wmi component.

Change-Id: Id8816f5137c3b1f9200c59fc3f9041980631f22f
CRs-Fixed: 2349173
2019-01-23 15:14:32 -08:00

119 lines
3.5 KiB
C

/*
* Copyright (c) 2017-2019 The Linux Foundation. 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
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: Implement API's specific to DFS component.
*/
#include <qdf_status.h>
#include <qdf_module.h>
#include <wmi_unified_api.h>
#include <wmi_unified_priv.h>
#include <wlan_objmgr_vdev_obj.h>
#include <wlan_dfs_utils_api.h>
#include <wmi_unified_dfs_api.h>
#include <init_deinit_lmac.h>
QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
uint8_t *evt_buf,
uint32_t *vdev_id,
uint32_t len)
{
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
if (wmi_handle && wmi_handle->ops->extract_dfs_cac_complete_event)
return wmi_handle->ops->extract_dfs_cac_complete_event(
wmi_handle, evt_buf, vdev_id, len);
return QDF_STATUS_E_FAILURE;
}
qdf_export_symbol(wmi_extract_dfs_cac_complete_event);
QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl,
uint8_t *evt_buf,
struct radar_found_info *radar_found,
uint32_t len)
{
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
if (wmi_handle && wmi_handle->ops->extract_dfs_radar_detection_event)
return wmi_handle->ops->extract_dfs_radar_detection_event(
wmi_handle, evt_buf, radar_found, len);
return QDF_STATUS_E_FAILURE;
}
#ifdef QCA_MCL_DFS_SUPPORT
QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
uint8_t *evt_buf,
struct radar_event_info *wlan_radar_event,
uint32_t len)
{
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
if (wmi_handle->ops->extract_wlan_radar_event_info)
return wmi_handle->ops->extract_wlan_radar_event_info(
wmi_handle, evt_buf, wlan_radar_event, len);
return QDF_STATUS_E_FAILURE;
}
qdf_export_symbol(wmi_extract_dfs_radar_detection_event);
#endif
#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
struct wlan_objmgr_pdev *pdev)
{
struct pdev_params pparam;
int pdev_idx;
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
pdev_idx = lmac_get_pdev_idx(pdev);
if (pdev_idx < 0)
return QDF_STATUS_E_FAILURE;
qdf_mem_set(&pparam, sizeof(pparam), 0);
pparam.param_id = wmi_pdev_param_use_nol;
pparam.param_value = usenol;
return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx);
}
QDF_STATUS
wmi_send_subchan_marking_pdev_param(void *wmi_hdl,
bool subchanmark,
struct wlan_objmgr_pdev *pdev)
{
struct pdev_params pparam;
int pdev_idx;
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
pdev_idx = lmac_get_pdev_idx(pdev);
if (pdev_idx < 0)
return QDF_STATUS_E_FAILURE;
qdf_mem_set(&pparam, sizeof(pparam), 0);
pparam.param_id = wmi_pdev_param_sub_channel_marking;
pparam.param_value = subchanmark;
return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx);
}
#endif