1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 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: offload lmac interface APIs for green ap 22 */ 23 #ifndef __TARGET_IF_GREEN_AP_H__ 24 #define __TARGET_IF_GREEN_AP_H__ 25 26 #include <wlan_objmgr_cmn.h> 27 #include <wlan_objmgr_pdev_obj.h> 28 #include <qdf_status.h> 29 #include <wlan_lmac_if_def.h> 30 31 struct wlan_green_ap_egap_params; 32 33 /** 34 * target_if_register_green_ap_tx_ops() - lmac handler to register 35 * green ap tx_ops callback functions 36 * @tx_ops: wlan_lmac_if_tx_ops object 37 * 38 * Return: QDF_STATUS in case of success 39 */ 40 QDF_STATUS target_if_register_green_ap_tx_ops( 41 struct wlan_lmac_if_tx_ops *tx_ops); 42 43 /** 44 * target_if_green_ap_register_egap_event_handler() - registers enhanced 45 * green ap event handler 46 * @pdev: objmgr pdev 47 * 48 * Return: QDF_STATUS in case of success 49 */ 50 QDF_STATUS target_if_green_ap_register_egap_event_handler( 51 struct wlan_objmgr_pdev *pdev); 52 53 /** 54 * target_if_green_ap_enable_egap() - enable enhanced green ap 55 * @pdev: pdev pointer 56 * @egap_params: enhanced green ap params 57 * 58 * @Return: QDF_STATUS_SUCCESS in case of success 59 */ 60 QDF_STATUS target_if_green_ap_enable_egap( 61 struct wlan_objmgr_pdev *pdev, 62 struct wlan_green_ap_egap_params *egap_params); 63 64 /** 65 * target_if_green_ap_set_ps_on_off() - Green AP PS toggle 66 * @pdev: pdev pointer 67 * @value: Value to send PS on/off to FW 68 * @pdev_id: pdev id 69 * 70 * @Return: QDF_STATUS_SUCCESS in case of success 71 */ 72 QDF_STATUS target_if_green_ap_set_ps_on_off(struct wlan_objmgr_pdev *pdev, 73 bool value, uint8_t pdev_id); 74 75 /** 76 * target_if_green_ap_get_current_channel() - Get current channel 77 * @pdev: pdev pointer 78 * 79 * @Return: current channel freq 80 */ 81 uint16_t target_if_green_ap_get_current_channel(struct wlan_objmgr_pdev *pdev); 82 83 /** 84 * target_if_green_ap_get_current_channel_flags() - Get current channel flags 85 * @pdev: pdev pointer 86 * 87 * @Return: current channel flags 88 */ 89 uint64_t target_if_green_ap_get_current_channel_flags( 90 struct wlan_objmgr_pdev *pdev); 91 92 /** 93 * target_if_green_ap_reset_dev() - Reset dev 94 * @pdev: pdev pointer 95 * 96 * @Return: QDF_STATUS_SUCCESS if device reset 97 */ 98 QDF_STATUS target_if_green_ap_reset_dev(struct wlan_objmgr_pdev *pdev); 99 100 #endif 101