1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
3*5113495bSYour Name *
4*5113495bSYour Name *
5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name * above copyright notice and this permission notice appear in all
8*5113495bSYour Name * copies.
9*5113495bSYour Name *
10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name */
19*5113495bSYour Name
20*5113495bSYour Name /**
21*5113495bSYour Name * DOC: target_if_dfs_partial_offload.h
22*5113495bSYour Name * This file contains dfs target interface for partial offload.
23*5113495bSYour Name */
24*5113495bSYour Name
25*5113495bSYour Name #ifndef _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_
26*5113495bSYour Name #define _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_
27*5113495bSYour Name
28*5113495bSYour Name /**
29*5113495bSYour Name * target_if_dfs_reg_phyerr_events() - register phyerror events.
30*5113495bSYour Name * @psoc: Pointer to psoc object.
31*5113495bSYour Name *
32*5113495bSYour Name * Return: QDF_STATUS
33*5113495bSYour Name */
34*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
35*5113495bSYour Name QDF_STATUS target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc);
36*5113495bSYour Name #else
37*5113495bSYour Name static QDF_STATUS
target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc * psoc)38*5113495bSYour Name target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc)
39*5113495bSYour Name {
40*5113495bSYour Name return QDF_STATUS_SUCCESS;
41*5113495bSYour Name }
42*5113495bSYour Name #endif
43*5113495bSYour Name
44*5113495bSYour Name /**
45*5113495bSYour Name * target_if_dfs_get_caps() - get dfs caps.
46*5113495bSYour Name * @pdev: Pointer to DFS pdev object.
47*5113495bSYour Name * @dfs_caps: Pointer to dfs_caps structure.
48*5113495bSYour Name *
49*5113495bSYour Name * Return: QDF_STATUS
50*5113495bSYour Name */
51*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
52*5113495bSYour Name QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev,
53*5113495bSYour Name struct wlan_dfs_caps *dfs_caps);
54*5113495bSYour Name #else
target_if_dfs_get_caps(struct wlan_objmgr_pdev * pdev,struct wlan_dfs_caps * dfs_caps)55*5113495bSYour Name static inline QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev,
56*5113495bSYour Name struct wlan_dfs_caps *dfs_caps)
57*5113495bSYour Name {
58*5113495bSYour Name return QDF_STATUS_SUCCESS;
59*5113495bSYour Name }
60*5113495bSYour Name #endif
61*5113495bSYour Name
62*5113495bSYour Name /**
63*5113495bSYour Name * target_if_dfs_status_check_event_handler() - Host dfs confirmation event
64*5113495bSYour Name * handler.
65*5113495bSYour Name * @scn: Handle to HIF context
66*5113495bSYour Name * @data: radar event buffer
67*5113495bSYour Name * @datalen: radar event buffer length
68*5113495bSYour Name *
69*5113495bSYour Name * Return: 0 on success
70*5113495bSYour Name */
71*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
72*5113495bSYour Name int target_if_dfs_status_check_event_handler(ol_scn_t scn,
73*5113495bSYour Name uint8_t *data,
74*5113495bSYour Name uint32_t datalen);
75*5113495bSYour Name #else
76*5113495bSYour Name static inline
target_if_dfs_status_check_event_handler(ol_scn_t scn,uint8_t * data,uint32_t datalen)77*5113495bSYour Name int target_if_dfs_status_check_event_handler(ol_scn_t scn,
78*5113495bSYour Name uint8_t *data,
79*5113495bSYour Name uint32_t datalen)
80*5113495bSYour Name {
81*5113495bSYour Name return 0;
82*5113495bSYour Name }
83*5113495bSYour Name #endif
84*5113495bSYour Name
85*5113495bSYour Name /**
86*5113495bSYour Name * target_if_dfs_send_avg_params_to_fw() - Send average parameters to FW.
87*5113495bSYour Name * @pdev: pdev pointer
88*5113495bSYour Name * @params: Pointer to dfs_radar_found_params structure.
89*5113495bSYour Name *
90*5113495bSYour Name * Return: QDF_STATUS
91*5113495bSYour Name */
92*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
93*5113495bSYour Name QDF_STATUS target_if_dfs_send_avg_params_to_fw(
94*5113495bSYour Name struct wlan_objmgr_pdev *pdev,
95*5113495bSYour Name struct dfs_radar_found_params *params);
96*5113495bSYour Name #else
97*5113495bSYour Name static inline
target_if_dfs_send_avg_params_to_fw(struct wlan_objmgr_pdev * pdev,struct dfs_radar_found_params * params)98*5113495bSYour Name QDF_STATUS target_if_dfs_send_avg_params_to_fw(
99*5113495bSYour Name struct wlan_objmgr_pdev *pdev,
100*5113495bSYour Name struct dfs_radar_found_params *params)
101*5113495bSYour Name {
102*5113495bSYour Name return QDF_STATUS_SUCCESS;
103*5113495bSYour Name }
104*5113495bSYour Name #endif
105*5113495bSYour Name #endif /* _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_ */
106