1 /*
2  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 /**
20  * DOC: Target interface file for denylist manager component to
21  * Implement api's which shall be used by denylist manager component
22  * in target if internally.
23  */
24 
25 #include <target_if_dlm.h>
26 #include "target_if.h"
27 
28 #if defined(WLAN_FEATURE_ROAM_OFFLOAD)
29 QDF_STATUS
target_if_dlm_send_reject_ap_list(struct wlan_objmgr_pdev * pdev,struct reject_ap_params * reject_params)30 target_if_dlm_send_reject_ap_list(struct wlan_objmgr_pdev *pdev,
31 				  struct reject_ap_params *reject_params)
32 {
33 	struct wmi_unified *wmi_handle;
34 
35 	wmi_handle = get_wmi_unified_hdl_from_pdev(pdev);
36 	if (!wmi_handle) {
37 		target_if_err("Invalid wmi handle");
38 		return QDF_STATUS_E_INVAL;
39 	}
40 
41 	return wmi_unified_send_reject_ap_list(wmi_handle, reject_params);
42 }
43 
target_if_dlm_register_tx_ops(struct wlan_dlm_tx_ops * dlm_tx_ops)44 void target_if_dlm_register_tx_ops(struct wlan_dlm_tx_ops *dlm_tx_ops)
45 {
46 	if (!dlm_tx_ops) {
47 		target_if_err("dlm_tx_ops is null");
48 		return;
49 	}
50 
51 	dlm_tx_ops->dlm_send_reject_ap_list = target_if_dlm_send_reject_ap_list;
52 }
53 #endif
54