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