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: Implements public API for pmo to interact with target/WMI
19  */
20 
21 #include "wlan_pmo_tgt_api.h"
22 #include "wlan_pmo_obj_mgmt_public_struct.h"
23 #include "wlan_pmo_main.h"
24 
25 QDF_STATUS
pmo_tgt_config_icmp_offload_req(struct wlan_objmgr_psoc * psoc,struct pmo_icmp_offload * pmo_icmp_req)26 pmo_tgt_config_icmp_offload_req(struct wlan_objmgr_psoc *psoc,
27 				struct pmo_icmp_offload *pmo_icmp_req)
28 {
29 	QDF_STATUS status;
30 	struct wlan_pmo_tx_ops pmo_tx_ops;
31 
32 	pmo_debug("vdev_id: %d: ICMP offload %d", pmo_icmp_req->vdev_id,
33 		  pmo_icmp_req->enable);
34 
35 	pmo_tx_ops = GET_PMO_TX_OPS_FROM_PSOC(psoc);
36 	if (!pmo_tx_ops.send_icmp_offload_req) {
37 		pmo_err("send_icmp_offload_req is null");
38 		status = QDF_STATUS_E_NULL_VALUE;
39 		return status;
40 	}
41 
42 	status = pmo_tx_ops.send_icmp_offload_req(psoc, pmo_icmp_req);
43 
44 	return status;
45 }
46