1 /*
2 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 /**
18 * DOC: Public API implementation of pre cac called from SAP module
19 */
20
21 #include "wlan_pre_cac_main.h"
22 #include "wlan_pre_cac_api.h"
23
wlan_pre_cac_get_status(struct wlan_objmgr_psoc * psoc)24 bool wlan_pre_cac_get_status(struct wlan_objmgr_psoc *psoc)
25 {
26 return pre_cac_is_active(psoc);
27 }
28
wlan_pre_cac_set_status(struct wlan_objmgr_vdev * vdev,bool status)29 QDF_STATUS wlan_pre_cac_set_status(struct wlan_objmgr_vdev *vdev, bool status)
30 {
31 return pre_cac_set_status(vdev, status);
32 }
33
wlan_pre_cac_set_freq_before_pre_cac(struct wlan_objmgr_vdev * vdev,qdf_freq_t freq)34 void wlan_pre_cac_set_freq_before_pre_cac(struct wlan_objmgr_vdev *vdev,
35 qdf_freq_t freq)
36 {
37 pre_cac_set_freq_before_pre_cac(vdev, freq);
38 }
39
wlan_pre_cac_get_freq_before_pre_cac(struct wlan_objmgr_vdev * vdev)40 qdf_freq_t wlan_pre_cac_get_freq_before_pre_cac(struct wlan_objmgr_vdev *vdev)
41 {
42 return pre_cac_get_freq_before_pre_cac(vdev);
43 }
44
wlan_pre_cac_complete_set(struct wlan_objmgr_vdev * vdev,bool status)45 void wlan_pre_cac_complete_set(struct wlan_objmgr_vdev *vdev,
46 bool status)
47 {
48 pre_cac_complete_set(vdev, status);
49 }
50
wlan_pre_cac_complete_get(struct wlan_objmgr_vdev * vdev)51 bool wlan_pre_cac_complete_get(struct wlan_objmgr_vdev *vdev)
52 {
53 return pre_cac_complete_get(vdev);
54 }
55
wlan_pre_cac_handle_radar_ind(struct wlan_objmgr_vdev * vdev)56 void wlan_pre_cac_handle_radar_ind(struct wlan_objmgr_vdev *vdev)
57 {
58 pre_cac_handle_radar_ind(vdev);
59 }
60
wlan_pre_cac_handle_cac_end(struct wlan_objmgr_vdev * vdev)61 void wlan_pre_cac_handle_cac_end(struct wlan_objmgr_vdev *vdev)
62 {
63 pre_cac_handle_cac_end(vdev);
64 }
65
66