1 /*
2 * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 /**
20 * DOC: Target interface file for action_oui component to
21 * Implement api's which shall be used by action_oui component
22 * in target_if internally.
23 */
24
25 #include "target_if_action_oui.h"
26 #include "wlan_action_oui_tgt_api.h"
27 #include "wlan_action_oui_public_struct.h"
28
29 static QDF_STATUS
target_if_action_oui_send_req(struct wlan_objmgr_psoc * psoc,struct action_oui_request * req)30 target_if_action_oui_send_req(struct wlan_objmgr_psoc *psoc,
31 struct action_oui_request *req)
32 {
33 void *wmi_hdl;
34
35 wmi_hdl = GET_WMI_HDL_FROM_PSOC(psoc);
36 if (!wmi_hdl)
37 return QDF_STATUS_E_FAILURE;
38
39 return wmi_unified_send_action_oui_cmd(wmi_hdl, req);
40 }
41
42 void
target_if_action_oui_register_tx_ops(struct action_oui_tx_ops * tx_ops)43 target_if_action_oui_register_tx_ops(struct action_oui_tx_ops *tx_ops)
44 {
45 if (!tx_ops) {
46 target_if_err("action_oui tx_ops is null");
47 return;
48 }
49
50 tx_ops->send_req = target_if_action_oui_send_req;
51 }
52