1 /*
2 * Copyright (c) 2019 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 /**
21 * DOC: target interface APIs for fw offload
22 *
23 */
24
25 #ifndef __TARGET_IF_FWOL_H__
26 #define __TARGET_IF_FWOL_H__
27
28 /**
29 * target_if_fwol_register_event_handler() - register fw offload event handler
30 * @psoc: psoc object
31 * @arg: argument passed to lmac
32 *
33 * Return: QDF_STATUS
34 */
35 QDF_STATUS target_if_fwol_register_event_handler(struct wlan_objmgr_psoc *psoc,
36 void *arg);
37
38 /**
39 * target_if_fwol_unregister_event_handler() - unregister fw offload event
40 * handler
41 * @psoc: psoc object
42 * @arg: argument passed to lmac
43 *
44 * Return: QDF_STATUS
45 */
46 QDF_STATUS
47 target_if_fwol_unregister_event_handler(struct wlan_objmgr_psoc *psoc,
48 void *arg);
49
50 /**
51 * target_if_fwol_register_tx_ops() - register fw offload tx ops callback
52 * functions
53 * @tx_ops: fw offload tx operations
54 *
55 * Return: QDF_STATUS
56 */
57 QDF_STATUS target_if_fwol_register_tx_ops(struct wlan_fwol_tx_ops *tx_ops);
58
59 /**
60 * target_if_fwol_notify_thermal_throttle() - Notify thermal throttle level
61 * to upper layer
62 * @psoc: PSOC object manager
63 * @info: Thermal throttle information from target
64 *
65 * This function is used to notify thermal throttle level to upper layer
66 * when thermal management event receive.
67 *
68 * Return: QDF_STATUS_SUCCESS for success otherwise failure
69 */
70 #ifdef FW_THERMAL_THROTTLE_SUPPORT
71 QDF_STATUS
72 target_if_fwol_notify_thermal_throttle(struct wlan_objmgr_psoc *psoc,
73 struct thermal_throttle_info *info);
74 #else
75 static inline QDF_STATUS
target_if_fwol_notify_thermal_throttle(struct wlan_objmgr_psoc * psoc,struct thermal_throttle_info * info)76 target_if_fwol_notify_thermal_throttle(struct wlan_objmgr_psoc *psoc,
77 struct thermal_throttle_info *info)
78 {
79 return QDF_STATUS_E_INVAL;
80 }
81 #endif
82 #endif /* __TARGET_IF_FWOL_H__ */
83