1 /*
2 * Copyright (c) 2021, The Linux Foundation. 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: target_if_pmo_icmp.c
19 *
20 * Target interface file for pmo component to
21 * send icmp offload related cmd and process event.
22 */
23
24 #include "target_if.h"
25 #include "target_if_pmo.h"
26 #include "wmi_unified_api.h"
27
28 QDF_STATUS
target_if_pmo_send_icmp_offload_req(struct wlan_objmgr_psoc * psoc,struct pmo_icmp_offload * pmo_icmp_req)29 target_if_pmo_send_icmp_offload_req(struct wlan_objmgr_psoc *psoc,
30 struct pmo_icmp_offload *pmo_icmp_req)
31 {
32 QDF_STATUS status;
33 wmi_unified_t wmi_handle;
34
35 if (!psoc) {
36 target_if_err("psoc handle is NULL");
37 return QDF_STATUS_E_INVAL;
38 }
39
40 wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
41 if (!wmi_handle) {
42 target_if_err("Invalid wmi handle");
43 return QDF_STATUS_E_INVAL;
44 }
45
46 status = wmi_unified_config_icmp_offload_cmd(wmi_handle, pmo_icmp_req);
47
48 return status;
49 }
50