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: Contains green ap north bound interface definitions 21 */ 22 23 #ifndef _WLAN_GREEN_AP_UCFG_API_H_ 24 #define _WLAN_GREEN_AP_UCFG_API_H_ 25 26 #include <wlan_objmgr_cmn.h> 27 #include <wlan_objmgr_pdev_obj.h> 28 #include <qdf_status.h> 29 #include "wlan_utility.h" 30 31 /** 32 * struct green_ap_user_cfg - green ap user cfg 33 * @host_enable_egap: HOST enhance green ap support 34 * @egap_inactivity_time: inactivity time 35 * @egap_wait_time: wait time 36 * @egap_feature_flags: feature flags 37 */ 38 struct green_ap_user_cfg { 39 bool host_enable_egap; 40 uint32_t egap_inactivity_time; 41 uint32_t egap_wait_time; 42 uint32_t egap_feature_flags; 43 }; 44 45 /** 46 * ucfg_green_ap_update_user_config() - Updates user cfg for green ap 47 * @pdev: pdev pointer 48 * @green_ap_cfg: pointer to green ap user cfg structure 49 * 50 * Return: Success or Failure 51 */ 52 QDF_STATUS ucfg_green_ap_update_user_config( 53 struct wlan_objmgr_pdev *pdev, 54 struct green_ap_user_cfg *green_ap_cfg); 55 56 /** 57 * ucfg_green_ap_enable_egap() - Enable enhanced green ap 58 * @pdev: pdev pointer 59 * 60 * Return: Success or Failure 61 */ 62 QDF_STATUS ucfg_green_ap_enable_egap(struct wlan_objmgr_pdev *pdev); 63 64 /** 65 * ucfg_green_ap_set_ps_config() - Set ps value 66 * @pdev: pdev pointer 67 * @value - value to be set 68 * 69 * Return: Success or Failure 70 */ 71 QDF_STATUS ucfg_green_ap_set_ps_config(struct wlan_objmgr_pdev *pdev, 72 uint8_t value); 73 /** 74 * ucfg_green_ap_get_ps_config() - Check if ps is enabled or not 75 * @pdev: pdev pointer 76 * @ps_enable: pointer to ps enable config value 77 * 78 * Return: Success or Failure 79 */ 80 QDF_STATUS ucfg_green_ap_get_ps_config(struct wlan_objmgr_pdev *pdev, 81 uint8_t *ps_enable); 82 83 /** 84 * ucfg_green_ap_set_transition_time() - Set transition time 85 * @pdev: pdev pointer 86 * @val: transition time 87 * 88 * This API sets custom transition time 89 * 90 * Return: Success or Failure 91 */ 92 QDF_STATUS ucfg_green_ap_set_transition_time(struct wlan_objmgr_pdev *pdev, 93 uint32_t val); 94 95 /** 96 * ucfg_green_ap_get_transition_time() - Get transition time 97 * @pdev: pdev pointer 98 * @ps_trans_time: pointer to transition time 99 * 100 * This API gets transition time 101 * 102 * Return: Success or Failure 103 */ 104 QDF_STATUS ucfg_green_ap_get_transition_time(struct wlan_objmgr_pdev *pdev, 105 uint32_t *ps_trans_time); 106 107 /** 108 * ucfg_green_ap_config() - Config green AP 109 * @pdev: pdev pointer 110 * 111 * Return: Success or Failure 112 */ 113 QDF_STATUS ucfg_green_ap_config(struct wlan_objmgr_pdev *pdev, uint8_t val); 114 115 /** 116 * ucfg_green_ap_enable_debug_prints() - Enable debugs 117 * @pdev: pdev pointer 118 * 119 * Return: None 120 */ 121 void ucfg_green_ap_enable_debug_prints(struct wlan_objmgr_pdev *pdev, 122 uint32_t val); 123 124 /** 125 * ucfg_green_ap_get_debug_prints() - Check if debug enabled 126 * @pdev: pdev pointer 127 * 128 * Return: Debug value 129 */ 130 bool ucfg_green_ap_get_debug_prints(struct wlan_objmgr_pdev *pdev); 131 #endif /* _WLAN_GREEN_AP_UCFG_API_H_ */ 132