Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Sandeep Puligilla | 43b6d1a | 2018-12-03 09:16:13 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 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 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #if !defined(HDD_CONFIG_H__) |
| 20 | #define HDD_CONFIG_H__ |
| 21 | |
| 22 | /** |
| 23 | * |
| 24 | * DOC: wlan_hdd_config.h |
| 25 | * |
| 26 | * WLAN Adapter Configuration functions |
| 27 | */ |
| 28 | |
| 29 | /* $HEADER$ */ |
| 30 | |
| 31 | /* Include files */ |
| 32 | #include <wlan_hdd_includes.h> |
| 33 | #include <wlan_hdd_wmm.h> |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 34 | #include <qdf_types.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | #include <csr_api.h> |
| 36 | #include <sap_api.h> |
Govind Singh | 5b48620 | 2016-06-09 18:29:42 +0530 | [diff] [blame] | 37 | #include "osapi_linux.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 38 | #include <wmi_unified.h> |
Dustin Brown | 1224e21 | 2017-05-12 14:02:12 -0700 | [diff] [blame] | 39 | #include "wlan_pmo_hw_filter_public_struct.h" |
Rajeev Kumar Sirasanagandla | 4725ae4 | 2018-05-24 22:33:34 +0530 | [diff] [blame] | 40 | #include "wlan_action_oui_public_struct.h" |
Dundi Raviteja | 8e33828 | 2018-09-25 17:16:04 +0530 | [diff] [blame] | 41 | #include "hdd_config.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 42 | |
Jeff Johnson | b6909be | 2017-08-28 12:07:19 -0700 | [diff] [blame] | 43 | struct hdd_context; |
| 44 | |
jitiphil | 869b9f7 | 2018-09-25 17:14:01 +0530 | [diff] [blame] | 45 | #define CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST_LEN 30 |
| 46 | |
Jiachao Wu | 6e9b9f9 | 2018-01-03 13:35:40 +0800 | [diff] [blame] | 47 | #define FW_MODULE_LOG_LEVEL_STRING_LENGTH (512) |
gbian | 62edd7e | 2017-03-07 13:12:13 +0800 | [diff] [blame] | 48 | #define TX_SCHED_WRR_PARAMS_NUM (5) |
Nirav Shah | bd36b06 | 2016-07-18 11:12:59 +0530 | [diff] [blame] | 49 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 50 | /* Number of items that can be configured */ |
Srinivas Girigowda | ba3091c | 2015-11-16 17:18:40 -0800 | [diff] [blame] | 51 | #define MAX_CFG_INI_ITEMS 1024 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 52 | |
| 53 | /* Defines for all of the things we read from the configuration (registry). */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 54 | |
Nirav Shah | d21a2e3 | 2018-04-20 16:34:43 +0530 | [diff] [blame] | 55 | #ifdef CONFIG_DP_TRACE |
Mohit Khanna | f8f9682 | 2017-05-17 17:11:59 -0700 | [diff] [blame] | 56 | /* Max length of gDptraceConfig string. e.g.- "1, 6, 1, 62" */ |
| 57 | #define DP_TRACE_CONFIG_STRING_LENGTH (20) |
| 58 | |
| 59 | /* At max 4 DP Trace config parameters are allowed. Refer - gDptraceConfig */ |
| 60 | #define DP_TRACE_CONFIG_NUM_PARAMS (4) |
| 61 | |
| 62 | /* |
| 63 | * Default value of live mode in case it cannot be determined from cfg string |
| 64 | * gDptraceConfig |
| 65 | */ |
| 66 | #define DP_TRACE_CONFIG_DEFAULT_LIVE_MODE (1) |
| 67 | |
| 68 | /* |
| 69 | * Default value of thresh (packets/second) beyond which DP Trace is disabled. |
| 70 | * Use this default in case the value cannot be determined from cfg string |
| 71 | * gDptraceConfig |
| 72 | */ |
Mohit Khanna | f7562c3 | 2018-07-05 17:42:36 -0700 | [diff] [blame] | 73 | #define DP_TRACE_CONFIG_DEFAULT_THRESH (6) |
Mohit Khanna | f8f9682 | 2017-05-17 17:11:59 -0700 | [diff] [blame] | 74 | |
| 75 | /* |
| 76 | * Number of intervals of BW timer to wait before enabling/disabling DP Trace. |
| 77 | * Since throughput threshold to disable live logging for DP Trace is very low, |
| 78 | * we calculate throughput based on # packets received in a second. |
Mohit Khanna | f7562c3 | 2018-07-05 17:42:36 -0700 | [diff] [blame] | 79 | * For example assuming bandwidth timer interval is 100ms, and if more than 6 |
| 80 | * prints are received in 10 * 100 ms interval, we want to disable DP Trace |
Mohit Khanna | f8f9682 | 2017-05-17 17:11:59 -0700 | [diff] [blame] | 81 | * live logging. DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT is the default |
| 82 | * value, to be used in case the real value cannot be derived from |
| 83 | * bw timer interval |
| 84 | */ |
| 85 | #define DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT (10) |
| 86 | |
| 87 | /* Default proto bitmap in case its missing in gDptraceConfig string */ |
| 88 | #define DP_TRACE_CONFIG_DEFAULT_BITMAP \ |
| 89 | (QDF_NBUF_PKT_TRAC_TYPE_EAPOL |\ |
| 90 | QDF_NBUF_PKT_TRAC_TYPE_DHCP |\ |
| 91 | QDF_NBUF_PKT_TRAC_TYPE_MGMT_ACTION |\ |
| 92 | QDF_NBUF_PKT_TRAC_TYPE_ARP |\ |
Poddar, Siddarth | 44aa5aa | 2017-07-10 17:30:22 +0530 | [diff] [blame] | 93 | QDF_NBUF_PKT_TRAC_TYPE_ICMP |\ |
| 94 | QDF_NBUF_PKT_TRAC_TYPE_ICMPv6)\ |
Mohit Khanna | f8f9682 | 2017-05-17 17:11:59 -0700 | [diff] [blame] | 95 | |
| 96 | /* Default verbosity, in case its missing in gDptraceConfig string*/ |
| 97 | #define DP_TRACE_CONFIG_DEFAULT_VERBOSTY QDF_DP_TRACE_VERBOSITY_LOW |
jitiphil | b03ae08 | 2018-11-09 17:41:59 +0530 | [diff] [blame] | 98 | |
Nirav Shah | d21a2e3 | 2018-04-20 16:34:43 +0530 | [diff] [blame] | 99 | #endif |
Mohit Khanna | f8f9682 | 2017-05-17 17:11:59 -0700 | [diff] [blame] | 100 | |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 101 | /* |
Ashish Kumar Dhanotiya | cb14b11 | 2018-01-19 19:26:44 +0530 | [diff] [blame] | 102 | * Type declarations |
| 103 | */ |
Naveen Rawat | 2b43089 | 2018-03-13 13:58:18 -0700 | [diff] [blame] | 104 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 105 | struct hdd_config { |
| 106 | /* Bitmap to track what is explicitly configured */ |
| 107 | DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS); |
| 108 | |
| 109 | /* Config parameters */ |
Srinivas Girigowda | 2fb677c | 2017-03-25 15:35:34 -0700 | [diff] [blame] | 110 | enum hdd_dot11_mode dot11Mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 112 | #ifdef FEATURE_WLAN_DYNAMIC_CVM |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 113 | /* Bitmap for operating voltage corner mode */ |
| 114 | uint32_t vc_mode_cfg_bitmap; |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 115 | #endif |
Ashish Kumar Dhanotiya | 12f6821 | 2018-09-04 22:00:14 +0530 | [diff] [blame] | 116 | #ifdef ENABLE_MTRACE_LOG |
| 117 | bool enable_mtrace; |
| 118 | #endif |
Jeff Johnson | a8fef4e | 2019-03-11 14:38:49 -0700 | [diff] [blame] | 119 | bool enable_snr_monitoring; |
Jeff Johnson | 15a88ac | 2019-03-11 14:35:25 -0700 | [diff] [blame] | 120 | bool advertise_concurrent_operation; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 121 | #ifdef DHCP_SERVER_OFFLOAD |
gaurank kathpalia | 566c81b | 2019-02-20 14:31:45 +0530 | [diff] [blame] | 122 | struct dhcp_server dhcp_server_ip; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 123 | #endif /* DHCP_SERVER_OFFLOAD */ |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 124 | bool apf_enabled; |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 125 | uint16_t sap_tx_leakage_threshold; |
Arun Khandavalli | cc544b3 | 2017-01-30 19:52:16 +0530 | [diff] [blame] | 126 | bool sap_internal_restart; |
Manjunathappa Prakash | dab74fa | 2017-06-19 12:11:03 -0700 | [diff] [blame] | 127 | bool tx_orphan_enable; |
Rachit Kankane | 0106e38 | 2018-05-16 18:59:28 +0530 | [diff] [blame] | 128 | bool is_11k_offload_supported; |
Rajeev Kumar Sirasanagandla | 4725ae4 | 2018-05-24 22:33:34 +0530 | [diff] [blame] | 129 | bool action_oui_enable; |
| 130 | uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN]; |
Rajeev Kumar | 15b40a2 | 2018-04-12 11:45:24 -0700 | [diff] [blame] | 131 | bool is_unit_test_framework_enabled; |
Ashish Kumar Dhanotiya | d63d686 | 2019-03-14 18:54:10 +0530 | [diff] [blame] | 132 | bool disable_channel; |
Dundi Raviteja | 8e33828 | 2018-09-25 17:16:04 +0530 | [diff] [blame] | 133 | |
| 134 | /* HDD converged ini items are listed below this*/ |
| 135 | bool bug_on_reinit_failure; |
| 136 | bool is_ramdump_enabled; |
| 137 | uint32_t iface_change_wait_time; |
| 138 | uint8_t multicast_host_fw_msgs; |
| 139 | enum hdd_wext_control private_wext_control; |
Dundi Raviteja | 8e33828 | 2018-09-25 17:16:04 +0530 | [diff] [blame] | 140 | bool enablefwprint; |
| 141 | uint8_t enable_fw_log; |
| 142 | |
| 143 | #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE |
| 144 | /* WLAN Logging */ |
| 145 | bool wlan_logging_enable; |
| 146 | bool wlan_logging_to_console; |
| 147 | #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ |
| 148 | |
| 149 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 150 | uint32_t wlan_auto_shutdown; |
| 151 | #endif |
| 152 | |
| 153 | #ifndef REMOVE_PKT_LOG |
| 154 | bool enable_packet_log; |
| 155 | #endif |
jitiphil | 869b9f7 | 2018-09-25 17:14:01 +0530 | [diff] [blame] | 156 | uint32_t rx_mode; |
Mohit Khanna | a8c9f56 | 2019-03-25 22:17:02 -0700 | [diff] [blame] | 157 | uint32_t tx_comp_loop_pkt_limit; |
| 158 | uint32_t rx_reap_loop_pkt_limit; |
| 159 | uint32_t rx_hp_oos_update_limit; |
| 160 | uint64_t rx_softirq_max_yield_duration_ns; |
Tiger Yu | 8b119e9 | 2019-04-09 13:55:07 +0800 | [diff] [blame] | 161 | #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH |
jitiphil | 869b9f7 | 2018-09-25 17:14:01 +0530 | [diff] [blame] | 162 | uint32_t bus_bw_high_threshold; |
| 163 | uint32_t bus_bw_medium_threshold; |
| 164 | uint32_t bus_bw_low_threshold; |
| 165 | uint32_t bus_bw_compute_interval; |
| 166 | uint32_t enable_tcp_delack; |
| 167 | bool enable_tcp_limit_output; |
| 168 | uint32_t enable_tcp_adv_win_scale; |
| 169 | uint32_t tcp_delack_thres_high; |
| 170 | uint32_t tcp_delack_thres_low; |
| 171 | uint32_t tcp_tx_high_tput_thres; |
| 172 | uint32_t tcp_delack_timer_count; |
Alok Kumar | 2fad644 | 2018-11-08 19:19:28 +0530 | [diff] [blame] | 173 | bool enable_tcp_param_update; |
Tiger Yu | 8b119e9 | 2019-04-09 13:55:07 +0800 | [diff] [blame] | 174 | #endif /*WLAN_FEATURE_DP_BUS_BANDWIDTH*/ |
| 175 | |
Tiger Yu | e40e783 | 2019-04-25 10:46:53 +0800 | [diff] [blame^] | 176 | #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK |
| 177 | bool del_ack_enable; |
| 178 | uint32_t del_ack_threshold_high; |
| 179 | uint32_t del_ack_threshold_low; |
| 180 | uint16_t del_ack_timer_value; |
| 181 | uint16_t del_ack_pkt_count; |
| 182 | #endif |
| 183 | |
jitiphil | 869b9f7 | 2018-09-25 17:14:01 +0530 | [diff] [blame] | 184 | #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL |
| 185 | uint32_t tx_flow_low_watermark; |
| 186 | uint32_t tx_flow_hi_watermark_offset; |
| 187 | uint32_t tx_flow_max_queue_depth; |
| 188 | uint32_t tx_lbw_flow_low_watermark; |
| 189 | uint32_t tx_lbw_flow_hi_watermark_offset; |
| 190 | uint32_t tx_lbw_flow_max_queue_depth; |
| 191 | uint32_t tx_hbw_flow_low_watermark; |
| 192 | uint32_t tx_hbw_flow_hi_watermark_offset; |
| 193 | uint32_t tx_hbw_flow_max_queue_depth; |
| 194 | #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */ |
| 195 | uint32_t napi_cpu_affinity_mask; |
| 196 | /* CPU affinity mask for rx_thread */ |
| 197 | uint32_t rx_thread_affinity_mask; |
| 198 | uint8_t cpu_map_list[CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST_LEN]; |
jitiphil | 296c23e | 2018-11-15 16:26:14 +0530 | [diff] [blame] | 199 | bool multicast_replay_filter; |
| 200 | uint32_t rx_wakelock_timeout; |
| 201 | uint8_t num_dp_rx_threads; |
jitiphil | b03ae08 | 2018-11-09 17:41:59 +0530 | [diff] [blame] | 202 | #ifdef CONFIG_DP_TRACE |
| 203 | bool enable_dp_trace; |
| 204 | uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH]; |
| 205 | #endif |
| 206 | #ifdef WLAN_NUD_TRACKING |
| 207 | bool enable_nud_tracking; |
| 208 | #endif |
Vignesh Viswanathan | a0358ff | 2018-11-27 09:53:07 +0530 | [diff] [blame] | 209 | uint8_t operating_channel; |
| 210 | uint8_t num_vdevs; |
| 211 | uint8_t enable_concurrent_sta[CFG_CONCURRENT_IFACE_MAX_LEN]; |
| 212 | uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH]; |
Sourav Mohapatra | 0dfe555 | 2018-11-16 11:29:54 +0530 | [diff] [blame] | 213 | #ifdef FEATURE_RUNTIME_PM |
| 214 | bool runtime_pm; |
| 215 | #endif |
Sourav Mohapatra | 0dfe555 | 2018-11-16 11:29:54 +0530 | [diff] [blame] | 216 | uint8_t inform_bss_rssi_raw; |
Ashish Kumar Dhanotiya | 7a11e27 | 2018-11-28 13:16:55 +0530 | [diff] [blame] | 217 | |
| 218 | bool mac_provision; |
| 219 | uint32_t provisioned_intf_pool; |
| 220 | uint32_t derived_intf_pool; |
Sourav Mohapatra | 9e014cf | 2018-12-11 09:39:33 +0530 | [diff] [blame] | 221 | uint8_t enable_rtt_support; |
Manjunathappa Prakash | f5b6f5f | 2019-03-27 15:17:41 -0700 | [diff] [blame] | 222 | uint32_t cfg_wmi_credit_cnt; |
Ashish Kumar Dhanotiya | 9549818 | 2019-04-29 13:59:20 +0530 | [diff] [blame] | 223 | uint32_t sar_version; |
Rajeev Kumar | 3a7c340 | 2019-05-02 16:02:20 -0700 | [diff] [blame] | 224 | bool is_wow_disabled; |
Jiani Liu | 6d3b6a1 | 2019-05-08 15:15:06 +0800 | [diff] [blame] | 225 | #ifdef WLAN_FEATURE_TSF_PLUS |
| 226 | uint8_t tsf_ptp_options; |
| 227 | #endif /* WLAN_FEATURE_TSF_PLUS */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 228 | }; |
| 229 | |
Krunal Soni | 707eb78 | 2018-01-18 12:04:19 -0800 | [diff] [blame] | 230 | /** |
| 231 | * hdd_to_csr_wmm_mode() - Utility function to convert HDD to CSR WMM mode |
| 232 | * |
Abhinav Kumar | 7d6f1ac | 2018-09-01 18:33:56 +0530 | [diff] [blame] | 233 | * @uint8_t mode - hdd WMM user mode |
Krunal Soni | 707eb78 | 2018-01-18 12:04:19 -0800 | [diff] [blame] | 234 | * |
| 235 | * Return: CSR WMM mode |
| 236 | */ |
Abhinav Kumar | 7d6f1ac | 2018-09-01 18:33:56 +0530 | [diff] [blame] | 237 | eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode); |
Krunal Soni | 707eb78 | 2018-01-18 12:04:19 -0800 | [diff] [blame] | 238 | |
Jeff Johnson | 723234b | 2017-09-03 08:49:15 -0700 | [diff] [blame] | 239 | QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx); |
| 240 | QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx); |
| 241 | QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx); |
Jeff Johnson | b6909be | 2017-08-28 12:07:19 -0700 | [diff] [blame] | 242 | QDF_STATUS hdd_set_sme_chan_list(struct hdd_context *hdd_ctx); |
Jeff Johnson | 723234b | 2017-09-03 08:49:15 -0700 | [diff] [blame] | 243 | bool hdd_update_config_cfg(struct hdd_context *hdd_ctx); |
Nirav Shah | 5c083da | 2018-08-03 13:46:02 +0530 | [diff] [blame] | 244 | void hdd_cfg_get_global_config(struct hdd_context *hdd_ctx, char *buf, |
| 245 | int buflen); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 246 | |
Srinivas Girigowda | 2fb677c | 2017-03-25 15:35:34 -0700 | [diff] [blame] | 247 | eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(enum hdd_dot11_mode dot11Mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 248 | |
Arunk Khandavalli | 847969d | 2017-09-25 15:15:36 +0530 | [diff] [blame] | 249 | QDF_STATUS hdd_set_idle_ps_config(struct hdd_context *hdd_ctx, bool val); |
Jeff Johnson | 723234b | 2017-09-03 08:49:15 -0700 | [diff] [blame] | 250 | void hdd_get_pmkid_modes(struct hdd_context *hdd_ctx, |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 251 | struct pmkid_mode_bits *pmkid_modes); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 252 | |
Arun Kumar Khandavalli | a423458 | 2019-03-20 16:16:05 +0530 | [diff] [blame] | 253 | int hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 254 | |
Jeff Johnson | 9268e09 | 2017-11-03 08:18:24 -0700 | [diff] [blame] | 255 | /** |
| 256 | * hdd_string_to_u8_array() - used to convert decimal string into u8 array |
| 257 | * @str: Decimal string |
| 258 | * @array: Array where converted value is stored |
| 259 | * @len: Length of the populated array |
| 260 | * @array_max_len: Maximum length of the array |
| 261 | * |
| 262 | * This API is called to convert decimal string (each byte separated by |
| 263 | * a comma) into an u8 array |
| 264 | * |
| 265 | * Return: QDF_STATUS |
| 266 | */ |
| 267 | QDF_STATUS hdd_string_to_u8_array(char *str, uint8_t *array, |
Jiachao Wu | 6e9b9f9 | 2018-01-03 13:35:40 +0800 | [diff] [blame] | 268 | uint8_t *len, uint16_t array_max_len); |
Jeff Johnson | 9268e09 | 2017-11-03 08:18:24 -0700 | [diff] [blame] | 269 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 270 | QDF_STATUS hdd_hex_string_to_u16_array(char *str, uint16_t *int_array, |
Krishna Kumaar Natarajan | f599c6e | 2015-11-03 11:44:03 -0800 | [diff] [blame] | 271 | uint8_t *len, uint8_t int_array_max_len); |
| 272 | |
Nirav Shah | 5c083da | 2018-08-03 13:46:02 +0530 | [diff] [blame] | 273 | void hdd_cfg_print_global_config(struct hdd_context *hdd_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 274 | |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 275 | QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss); |
Arif Hussain | cd15163 | 2017-02-11 16:57:19 -0800 | [diff] [blame] | 276 | |
| 277 | /** |
| 278 | * hdd_dfs_indicate_radar() - Block tx as radar found on the channel |
| 279 | * @hdd_ctxt: HDD context pointer |
| 280 | * |
| 281 | * This function is invoked in atomic context when a radar |
| 282 | * is found on the SAP current operating channel and Data Tx |
| 283 | * from netif has to be stopped to honor the DFS regulations. |
| 284 | * Actions: Stop the netif Tx queues,Indicate Radar present |
| 285 | * in HDD context for future usage. |
| 286 | * |
| 287 | * Return: true on success, else false |
| 288 | */ |
Jeff Johnson | b6909be | 2017-08-28 12:07:19 -0700 | [diff] [blame] | 289 | bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx); |
Will Huang | 14b120f | 2019-01-14 17:26:14 +0800 | [diff] [blame] | 290 | |
| 291 | /** |
| 292 | * hdd_override_all_ps() - overrides to disables all the powersave features. |
| 293 | * @hdd_ctx: Pointer to HDD context. |
| 294 | * Overrides below powersave ini configurations. |
| 295 | * gEnableImps=0 |
| 296 | * gEnableBmps=0 |
| 297 | * gRuntimePM=0 |
| 298 | * gWlanAutoShutdown = 0 |
| 299 | * gEnableSuspend=0 |
| 300 | * gEnablePowerSaveOffload=0 |
| 301 | * gEnableWoW=0 |
| 302 | * |
| 303 | * Return: None |
| 304 | */ |
| 305 | void hdd_override_all_ps(struct hdd_context *hdd_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 306 | #endif |