1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022-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: Contains green ap north bound interface definitions 22 */ 23 24 #ifndef _WLAN_GREEN_AP_UCFG_API_H_ 25 #define _WLAN_GREEN_AP_UCFG_API_H_ 26 27 #include <wlan_objmgr_cmn.h> 28 #include <wlan_objmgr_pdev_obj.h> 29 #include <qdf_status.h> 30 #include "wlan_utility.h" 31 #include "../../core/src/wlan_green_ap_main_i.h" 32 33 /** 34 * ucfg_green_ap_enable_egap() - Enable enhanced green ap 35 * @pdev: pdev pointer 36 * 37 * Return: Success or Failure 38 */ 39 QDF_STATUS ucfg_green_ap_enable_egap(struct wlan_objmgr_pdev *pdev); 40 41 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE 42 /** 43 * ucfg_green_ap_ll_ps() - Enable/ Disable green ap low latency power save mode 44 * @pdev: pdev pointer 45 * @vdev: vdev pointer 46 * @state: low power state. refer enum wlan_green_ap_ll_ps_state 47 * @bcn_interval: beacon interval(in ms) 48 * @cookie_id: Unique identifier generated for each command. 49 * cookie_id is generated by wlan_green_ap_get_cookie_id() api 50 * 51 * Return: QDF_STATUS_SUCCESS on success or appropriate error status 52 */ 53 QDF_STATUS ucfg_green_ap_ll_ps(struct wlan_objmgr_pdev *pdev, 54 struct wlan_objmgr_vdev *vdev, 55 enum wlan_green_ap_ll_ps_state state, 56 uint32_t bcn_interval, 57 uint64_t *cookie_id); 58 #endif 59 60 /** 61 * ucfg_green_ap_set_ps_config() - Set ps value 62 * @pdev: pdev pointer 63 * @value: value to be set 64 * 65 * Return: Success or Failure 66 */ 67 QDF_STATUS ucfg_green_ap_set_ps_config(struct wlan_objmgr_pdev *pdev, 68 uint8_t value); 69 /** 70 * ucfg_green_ap_get_ps_config() - Check if ps is enabled or not 71 * @pdev: pdev pointer 72 * @ps_enable: pointer to ps enable config value 73 * 74 * Return: Success or Failure 75 */ 76 QDF_STATUS ucfg_green_ap_get_ps_config(struct wlan_objmgr_pdev *pdev, 77 uint8_t *ps_enable); 78 79 /** 80 * ucfg_green_ap_set_transition_time() - Set transition time 81 * @pdev: pdev pointer 82 * @val: transition time 83 * 84 * This API sets custom transition time 85 * 86 * Return: Success or Failure 87 */ 88 QDF_STATUS ucfg_green_ap_set_transition_time(struct wlan_objmgr_pdev *pdev, 89 uint32_t val); 90 91 /** 92 * ucfg_green_ap_get_transition_time() - Get transition time 93 * @pdev: pdev pointer 94 * @ps_trans_time: pointer to transition time 95 * 96 * This API gets transition time 97 * 98 * Return: Success or Failure 99 */ 100 QDF_STATUS ucfg_green_ap_get_transition_time(struct wlan_objmgr_pdev *pdev, 101 uint32_t *ps_trans_time); 102 103 /** 104 * ucfg_green_ap_config() - Config green AP 105 * @pdev: pdev pointer 106 * @val: config value 107 * 108 * Return: Success or Failure 109 */ 110 QDF_STATUS ucfg_green_ap_config(struct wlan_objmgr_pdev *pdev, uint8_t val); 111 112 /** 113 * ucfg_green_ap_enable_debug_prints() - Enable debugs 114 * @pdev: pdev pointer 115 * @val: debug value 116 * 117 * Return: None 118 */ 119 void ucfg_green_ap_enable_debug_prints(struct wlan_objmgr_pdev *pdev, 120 uint32_t val); 121 122 /** 123 * ucfg_green_ap_get_debug_prints() - Check if debug enabled 124 * @pdev: pdev pointer 125 * 126 * Return: Debug value 127 */ 128 bool ucfg_green_ap_get_debug_prints(struct wlan_objmgr_pdev *pdev); 129 #endif /* _WLAN_GREEN_AP_UCFG_API_H_ */ 130