1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: offload lmac interface APIs for green ap 21 */ 22 #ifndef __TARGET_IF_GREEN_AP_H__ 23 #define __TARGET_IF_GREEN_AP_H__ 24 25 #include <wlan_objmgr_cmn.h> 26 #include <wlan_objmgr_pdev_obj.h> 27 #include <qdf_status.h> 28 #include <wlan_lmac_if_def.h> 29 30 struct wlan_green_ap_egap_params; 31 32 /** 33 * target_if_register_green_ap_tx_ops() - lmac handler to register 34 * green ap tx_ops callback functions 35 * @tx_ops: wlan_lmac_if_tx_ops object 36 * 37 * Return: QDF_STATUS in case of success 38 */ 39 QDF_STATUS target_if_register_green_ap_tx_ops( 40 struct wlan_lmac_if_tx_ops *tx_ops); 41 42 /** 43 * target_if_green_ap_register_egap_event_handler() - registers enhanced 44 * green ap event handler 45 * @pdev: objmgr pdev 46 * 47 * Return: QDF_STATUS in case of success 48 */ 49 QDF_STATUS target_if_green_ap_register_egap_event_handler( 50 struct wlan_objmgr_pdev *pdev); 51 52 /** 53 * target_if_green_ap_enable_egap() - enable enhanced green ap 54 * @pdev: pdev pointer 55 * @egap_params: enhanced green ap params 56 * 57 * @Return: QDF_STATUS_SUCCESS in case of success 58 */ 59 QDF_STATUS target_if_green_ap_enable_egap( 60 struct wlan_objmgr_pdev *pdev, 61 struct wlan_green_ap_egap_params *egap_params); 62 63 /** 64 * target_if_green_ap_set_ps_on_off() - Green AP PS toggle 65 * @pdev: pdev pointer 66 * @value: Value to send PS on/off to FW 67 * @pdev_id: pdev id 68 * 69 * @Return: QDF_STATUS_SUCCESS in case of success 70 */ 71 QDF_STATUS target_if_green_ap_set_ps_on_off(struct wlan_objmgr_pdev *pdev, 72 bool value, uint8_t pdev_id); 73 74 /** 75 * target_if_green_ap_get_current_channel() - Get current channel 76 * @pdev: pdev pointer 77 * 78 * @Return: current channel freq 79 */ 80 uint16_t target_if_green_ap_get_current_channel(struct wlan_objmgr_pdev *pdev); 81 82 /** 83 * target_if_green_ap_get_current_channel_flags() - Get current channel flags 84 * @pdev: pdev pointer 85 * 86 * @Return: current channel flags 87 */ 88 uint64_t target_if_green_ap_get_current_channel_flags( 89 struct wlan_objmgr_pdev *pdev); 90 91 /** 92 * target_if_green_ap_reset_dev() - Reset dev 93 * @pdev: pdev pointer 94 * 95 * @Return: QDF_STATUS_SUCCESS if device resetted 96 */ 97 QDF_STATUS target_if_green_ap_reset_dev(struct wlan_objmgr_pdev *pdev); 98 99 #endif 100