xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_fwol_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: Implement API's specific to fw offload component.
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #ifndef _WMI_UNIFIED_FWOL_API_H_
24*5113495bSYour Name #define _WMI_UNIFIED_FWOL_API_H_
25*5113495bSYour Name #include "wlan_fwol_public_structs.h"
26*5113495bSYour Name 
27*5113495bSYour Name #ifdef WLAN_FEATURE_ELNA
28*5113495bSYour Name /**
29*5113495bSYour Name  * wmi_unified_send_set_elna_bypass_cmd() - Send WMI set eLNA bypass cmd
30*5113495bSYour Name  * @wmi_handle: wmi handle
31*5113495bSYour Name  * @req: set eLNA bypass request
32*5113495bSYour Name  *
33*5113495bSYour Name  * Send WMI set eLNA bypass command to firmware.
34*5113495bSYour Name  *
35*5113495bSYour Name  * Return: QDF_STATUS
36*5113495bSYour Name  */
37*5113495bSYour Name QDF_STATUS
38*5113495bSYour Name wmi_unified_send_set_elna_bypass_cmd(struct wmi_unified *wmi_handle,
39*5113495bSYour Name 				     struct set_elna_bypass_request *req);
40*5113495bSYour Name 
41*5113495bSYour Name /**
42*5113495bSYour Name  * wmi_unified_send_get_elna_bypass_cmd() - Send WMI get eLNA bypass cmd
43*5113495bSYour Name  * @wmi_handle: wmi handle
44*5113495bSYour Name  * @req: get eLNA bypass request
45*5113495bSYour Name  *
46*5113495bSYour Name  * Send WMI get eLNA bypass command to firmware.
47*5113495bSYour Name  *
48*5113495bSYour Name  * Return: QDF_STATUS
49*5113495bSYour Name  */
50*5113495bSYour Name QDF_STATUS
51*5113495bSYour Name wmi_unified_send_get_elna_bypass_cmd(struct wmi_unified *wmi_handle,
52*5113495bSYour Name 				     struct get_elna_bypass_request *req);
53*5113495bSYour Name 
54*5113495bSYour Name /**
55*5113495bSYour Name  * wmi_extract_get_elna_bypass_resp() - Extract WMI get eLNA bypass response
56*5113495bSYour Name  * @wmi_handle: wmi handle
57*5113495bSYour Name  * @resp_buf: response buffer
58*5113495bSYour Name  * @resp: get eLNA bypass response
59*5113495bSYour Name  *
60*5113495bSYour Name  * Extract WMI get eLNA bypass response from firmware.
61*5113495bSYour Name  *
62*5113495bSYour Name  * Return: QDF_STATUS
63*5113495bSYour Name  */
64*5113495bSYour Name QDF_STATUS
65*5113495bSYour Name wmi_extract_get_elna_bypass_resp(struct wmi_unified *wmi_handle, void *resp_buf,
66*5113495bSYour Name 				 struct get_elna_bypass_response *resp);
67*5113495bSYour Name #endif /* WLAN_FEATURE_ELNA */
68*5113495bSYour Name 
69*5113495bSYour Name #ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
70*5113495bSYour Name /**
71*5113495bSYour Name  * wmi_unified_send_dscp_tip_map_cmd() - Send dscp-to-tid map values cmd
72*5113495bSYour Name  * @wmi_handle: wmi handle
73*5113495bSYour Name  * @dscp_to_tid_map: array of dscp_tid map values
74*5113495bSYour Name  *
75*5113495bSYour Name  * Send dscp-to-tid map values to FW.
76*5113495bSYour Name  *
77*5113495bSYour Name  * Return: QDF_STATUS
78*5113495bSYour Name  */
79*5113495bSYour Name QDF_STATUS
80*5113495bSYour Name wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
81*5113495bSYour Name 				  uint32_t *dscp_to_tid_map);
82*5113495bSYour Name #else
83*5113495bSYour Name static inline QDF_STATUS
wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified * wmi_handle,uint32_t * dscp_to_tid_map)84*5113495bSYour Name wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
85*5113495bSYour Name 				  uint32_t *dscp_to_tid_map)
86*5113495bSYour Name {
87*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
88*5113495bSYour Name }
89*5113495bSYour Name #endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
90*5113495bSYour Name 
91*5113495bSYour Name #ifdef WLAN_FEATURE_MDNS_OFFLOAD
92*5113495bSYour Name /**
93*5113495bSYour Name  * wmi_unified_send_set_mdns_config_cmd() - Send WMI set mDNS config cmd
94*5113495bSYour Name  * @wmi_handle: wmi handle
95*5113495bSYour Name  * @mdns_info: mdns config info
96*5113495bSYour Name  *
97*5113495bSYour Name  * Send WMI set mDNS config command to firmware.
98*5113495bSYour Name  *
99*5113495bSYour Name  * Return: QDF_STATUS
100*5113495bSYour Name  */
101*5113495bSYour Name QDF_STATUS
102*5113495bSYour Name wmi_unified_send_set_mdns_config_cmd(struct wmi_unified *wmi_handle,
103*5113495bSYour Name 				     struct mdns_config_info *mdns_info);
104*5113495bSYour Name #endif /* WLAN_FEATURE_MDNS_OFFLOAD */
105*5113495bSYour Name 
106*5113495bSYour Name /**
107*5113495bSYour Name  * wmi_unified_send_get_thermal_stats_cmd() - Send WMI get thermal stats req
108*5113495bSYour Name  * @wmi_handle: wmi handle
109*5113495bSYour Name  * @req_type: Request type
110*5113495bSYour Name  * @temp_offset: temperature offset for setting the range for thermal stats
111*5113495bSYour Name  *
112*5113495bSYour Name  * Send WMI get thermal stats req command to firmware.
113*5113495bSYour Name  *
114*5113495bSYour Name  * Return: QDF_STATUS
115*5113495bSYour Name  */
116*5113495bSYour Name #ifdef THERMAL_STATS_SUPPORT
117*5113495bSYour Name QDF_STATUS
118*5113495bSYour Name wmi_unified_send_get_thermal_stats_cmd(struct wmi_unified *wmi_handle,
119*5113495bSYour Name 				       enum thermal_stats_request_type req_type,
120*5113495bSYour Name 				       uint8_t temp_offset);
121*5113495bSYour Name #endif /* THERMAL_STATS_SUPPORT */
122*5113495bSYour Name 
123*5113495bSYour Name #endif /* _WMI_UNIFIED_FWOL_API_H_ */
124