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: Implements public API for denylist manager to interact with target/WMI
21 */
22
23 #include "wlan_dlm_tgt_api.h"
24
25 #if defined(WLAN_FEATURE_ROAM_OFFLOAD)
26 QDF_STATUS
tgt_dlm_send_reject_list_to_fw(struct wlan_objmgr_pdev * pdev,struct reject_ap_params * reject_params)27 tgt_dlm_send_reject_list_to_fw(struct wlan_objmgr_pdev *pdev,
28 struct reject_ap_params *reject_params)
29 {
30 struct wlan_dlm_tx_ops *dlm_tx_ops;
31 struct dlm_pdev_priv_obj *dlm_priv;
32
33 dlm_priv = dlm_get_pdev_obj(pdev);
34
35 if (!dlm_priv) {
36 dlm_err("dlm_priv is NULL");
37 return QDF_STATUS_E_FAILURE;
38 }
39 dlm_tx_ops = &dlm_priv->dlm_tx_ops;
40 if (!dlm_tx_ops) {
41 dlm_err("dlm_tx_ops is NULL");
42 return QDF_STATUS_E_FAILURE;
43 }
44
45 if (dlm_tx_ops->dlm_send_reject_ap_list)
46 return dlm_tx_ops->dlm_send_reject_ap_list(pdev, reject_params);
47 dlm_err("Tx ops not registered, failed to send reject list to FW");
48
49 return QDF_STATUS_E_FAILURE;
50 }
51 #endif
52