xref: /wlan-driver/qca-wifi-host-cmn/wmi/src/wmi_unified_fwol_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name /**
19*5113495bSYour Name  * DOC: Implement API's specific to fw offload component.
20*5113495bSYour Name  */
21*5113495bSYour Name 
22*5113495bSYour Name #include "wmi_unified_priv.h"
23*5113495bSYour Name #include "wlan_fwol_public_structs.h"
24*5113495bSYour Name #include "wmi_unified_fwol_api.h"
25*5113495bSYour Name 
26*5113495bSYour Name #ifdef WLAN_FEATURE_ELNA
27*5113495bSYour Name QDF_STATUS
wmi_unified_send_set_elna_bypass_cmd(struct wmi_unified * wmi_handle,struct set_elna_bypass_request * req)28*5113495bSYour Name wmi_unified_send_set_elna_bypass_cmd(struct wmi_unified *wmi_handle,
29*5113495bSYour Name 				     struct set_elna_bypass_request *req)
30*5113495bSYour Name {
31*5113495bSYour Name 	if (wmi_handle->ops->send_set_elna_bypass_cmd)
32*5113495bSYour Name 		return wmi_handle->ops->send_set_elna_bypass_cmd(wmi_handle,
33*5113495bSYour Name 								 req);
34*5113495bSYour Name 
35*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
36*5113495bSYour Name }
37*5113495bSYour Name 
38*5113495bSYour Name QDF_STATUS
wmi_unified_send_get_elna_bypass_cmd(struct wmi_unified * wmi_handle,struct get_elna_bypass_request * req)39*5113495bSYour Name wmi_unified_send_get_elna_bypass_cmd(struct wmi_unified *wmi_handle,
40*5113495bSYour Name 				     struct get_elna_bypass_request *req)
41*5113495bSYour Name {
42*5113495bSYour Name 	if (wmi_handle->ops->send_get_elna_bypass_cmd)
43*5113495bSYour Name 		return wmi_handle->ops->send_get_elna_bypass_cmd(wmi_handle,
44*5113495bSYour Name 								 req);
45*5113495bSYour Name 
46*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
47*5113495bSYour Name }
48*5113495bSYour Name 
49*5113495bSYour Name QDF_STATUS
wmi_extract_get_elna_bypass_resp(struct wmi_unified * wmi_handle,void * resp_buf,struct get_elna_bypass_response * resp)50*5113495bSYour Name wmi_extract_get_elna_bypass_resp(struct wmi_unified *wmi_handle, void *resp_buf,
51*5113495bSYour Name 				 struct get_elna_bypass_response *resp)
52*5113495bSYour Name {
53*5113495bSYour Name 	if (wmi_handle->ops->extract_get_elna_bypass_resp)
54*5113495bSYour Name 		return wmi_handle->ops->extract_get_elna_bypass_resp(wmi_handle,
55*5113495bSYour Name 								     resp_buf,
56*5113495bSYour Name 								     resp);
57*5113495bSYour Name 
58*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
59*5113495bSYour Name }
60*5113495bSYour Name #endif /* WLAN_FEATURE_ELNA */
61*5113495bSYour Name 
62*5113495bSYour Name #ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
63*5113495bSYour Name QDF_STATUS
wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified * wmi_handle,uint32_t * dscp_to_tid_map)64*5113495bSYour Name wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
65*5113495bSYour Name 				  uint32_t *dscp_to_tid_map)
66*5113495bSYour Name {
67*5113495bSYour Name 	if (wmi_handle->ops->send_dscp_tid_map_cmd)
68*5113495bSYour Name 		return wmi_handle->ops->send_dscp_tid_map_cmd(wmi_handle,
69*5113495bSYour Name 							      dscp_to_tid_map);
70*5113495bSYour Name 
71*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
72*5113495bSYour Name }
73*5113495bSYour Name #endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
74*5113495bSYour Name 
75*5113495bSYour Name #ifdef WLAN_FEATURE_MDNS_OFFLOAD
76*5113495bSYour Name QDF_STATUS
wmi_unified_send_set_mdns_config_cmd(struct wmi_unified * wmi_handle,struct mdns_config_info * mdns_info)77*5113495bSYour Name wmi_unified_send_set_mdns_config_cmd(struct wmi_unified *wmi_handle,
78*5113495bSYour Name 				     struct mdns_config_info *mdns_info)
79*5113495bSYour Name {
80*5113495bSYour Name 	if (wmi_handle->ops->send_set_mdns_config_cmd)
81*5113495bSYour Name 		return wmi_handle->ops->send_set_mdns_config_cmd(wmi_handle,
82*5113495bSYour Name 								 mdns_info);
83*5113495bSYour Name 
84*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
85*5113495bSYour Name }
86*5113495bSYour Name #endif /* WLAN_FEATURE_MDNS_OFFLOAD */
87*5113495bSYour Name 
88*5113495bSYour Name #ifdef THERMAL_STATS_SUPPORT
89*5113495bSYour Name QDF_STATUS
wmi_unified_send_get_thermal_stats_cmd(struct wmi_unified * wmi_handle,enum thermal_stats_request_type req_type,uint8_t temp_offset)90*5113495bSYour Name wmi_unified_send_get_thermal_stats_cmd(struct wmi_unified *wmi_handle,
91*5113495bSYour Name 				       enum thermal_stats_request_type req_type,
92*5113495bSYour Name 				       uint8_t temp_offset)
93*5113495bSYour Name {
94*5113495bSYour Name 	if (wmi_handle->ops->send_get_thermal_stats_cmd)
95*5113495bSYour Name 		return wmi_handle->ops->send_get_thermal_stats_cmd(wmi_handle,
96*5113495bSYour Name 								   req_type,
97*5113495bSYour Name 								   temp_offset);
98*5113495bSYour Name 
99*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
100*5113495bSYour Name }
101*5113495bSYour Name #endif /* THERMAL_STATS_SUPPORT */