Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 1 | /* |
Jeff Johnson | d9f0860 | 2016-12-02 11:31:30 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 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: cds_config.h |
| 21 | * |
| 22 | * Defines the configuration Information for various modules. Default values |
| 23 | * are read from the INI file and saved into cds_config_info which are passed |
| 24 | * to various modules for the initialization. |
| 25 | */ |
| 26 | |
| 27 | #if !defined(__CDS_CONFIG_H) |
| 28 | #define __CDS_CONFIG_H |
| 29 | |
gbian | 62edd7e | 2017-03-07 13:12:13 +0800 | [diff] [blame] | 30 | #include "osdep.h" |
| 31 | #include "cdp_txrx_mob_def.h" |
| 32 | |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 33 | /** |
Naveen Rawat | 64e477e | 2016-05-20 10:34:56 -0700 | [diff] [blame] | 34 | * enum cfg_sub_20_channel_width: ini values for su 20 mhz channel width |
| 35 | * @WLAN_SUB_20_CH_WIDTH_5: Use 5 mhz channel width |
| 36 | * @WLAN_SUB_20_CH_WIDTH_10: Use 10 mhz channel width |
| 37 | */ |
| 38 | enum cfg_sub_20_channel_width { |
| 39 | WLAN_SUB_20_CH_WIDTH_NONE = 0, |
| 40 | WLAN_SUB_20_CH_WIDTH_5 = 1, |
| 41 | WLAN_SUB_20_CH_WIDTH_10 = 2, |
| 42 | }; |
| 43 | |
| 44 | /** |
Dustin Brown | 13995f0 | 2017-01-12 15:38:42 -0800 | [diff] [blame] | 45 | * enum active_bpf_mode - the modes active BPF can operate in |
| 46 | * @ACTIVE_BPF_DISABLED: BPF is disabled in active mode |
| 47 | * @ACTIVE_BPF_ENABLED: BPF is enabled for all packets |
| 48 | * @ACTIVE_BPF_ADAPTIVE: BPF is enabled for packets up to some threshold |
| 49 | * @ACTIVE_BPF_MODE_COUNT: The number of active BPF modes |
| 50 | */ |
| 51 | enum active_bpf_mode { |
| 52 | ACTIVE_BPF_DISABLED = 0, |
| 53 | ACTIVE_BPF_ENABLED, |
| 54 | ACTIVE_BPF_ADAPTIVE, |
| 55 | ACTIVE_BPF_MODE_COUNT |
| 56 | }; |
| 57 | |
| 58 | /** |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 59 | * struct cds_config_info - Place Holder for cds configuration |
| 60 | * @max_station: Max station supported |
| 61 | * @max_bssid: Max Bssid Supported |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 62 | * @powersave_offload_enabled: Indicate if powersave offload is enabled |
| 63 | * @sta_maxlimod_dtim: station max listen interval |
| 64 | * @sta_mod_dtim: station mode DTIM |
| 65 | * @sta_dynamic_dtim: station dynamic DTIM |
| 66 | * @driver_type: Enumeration of Driver Type whether FTM or Mission mode |
| 67 | * @max_wow_filters: Max wow filters to be configured to fw |
| 68 | * @wow_enable: Indicate whether wow is enabled or not |
| 69 | * @ol_ini_info: Status of offload enabled from ini 1st bit for arm,2nd for NS |
| 70 | * currently rest of bits are not used |
| 71 | * @ssdp: Indicate ssdp is enabled or not |
| 72 | * @enable_mc_list : To Check if Multicast list filtering is enabled in FW |
| 73 | * @dfs_phyerr_filter_offload: DFS Phyerror Filtering offload status from ini |
| 74 | * Indicates whether support is enabled or not |
| 75 | * @ap_disable_intrabss_fwd: pass intra-bss-fwd info to txrx module |
| 76 | * @ap_maxoffload_peers: max offload peer |
| 77 | * @ap_maxoffload_reorderbuffs: max offload reorder buffs |
| 78 | * @ra_ratelimit_interval: RA rate limit value |
| 79 | * @is_ra_ratelimit_enabled: Indicate RA rate limit enabled or not |
| 80 | * @reorder_offload: is RX re-ordering offloaded to the fw |
| 81 | * @dfs_pri_multiplier: dfs radar pri multiplier |
| 82 | * @uc_offload_enabled: IPA Micro controller data path offload enable flag |
| 83 | * @uc_txbuf_count: IPA Micro controller data path offload TX buffer count |
| 84 | * @uc_txbuf_size: IPA Micro controller data path offload TX buffer size |
| 85 | * @uc_rxind_ringcount: IPA Micro controller data path offload RX indication |
| 86 | * ring count |
| 87 | * @uc_tx_partition_base: IPA Micro controller datapath offload TX partition |
| 88 | * base |
| 89 | * @enable_rxthread: Rx processing in thread from TXRX |
| 90 | * @ip_tcp_udp_checksum_offload: checksum offload enabled or not |
| 91 | * @ce_classify_enabled: CE based classification enabled |
| 92 | * @max_scan: Maximum number of parallel scans |
| 93 | * @tx_flow_stop_queue_th: Threshold to stop queue in percentage |
| 94 | * @tx_flow_start_queue_offset: Start queue offset in percentage |
| 95 | * @is_lpass_enabled: Indicate whether LPASS is enabled or not |
| 96 | * @is_nan_enabled: Indicate whether NAN is enabled or not |
Anurag Chouhan | 04dbf6d | 2016-09-08 15:32:52 +0530 | [diff] [blame] | 97 | * @bool bpf_packet_filter_enable; Indicate bpf filter enabled or not |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 98 | * @tx_chain_mask_cck: Tx chain mask enabled or not |
| 99 | * @self_gen_frm_pwr: Self gen from power |
Naveen Rawat | 64e477e | 2016-05-20 10:34:56 -0700 | [diff] [blame] | 100 | * @sub_20_channel_width: Sub 20 MHz ch width, ini intersected with fw cap |
Manjunathappa Prakash | fff753c | 2016-09-01 19:34:56 -0700 | [diff] [blame] | 101 | * @flow_steering_enabled: Receive flow steering. |
Sandeep Puligilla | afa5289 | 2016-10-26 19:03:16 -0700 | [diff] [blame] | 102 | * @is_fw_timeout: Indicate whether crash host when fw timesout or not |
Hanumanth Reddy Pothula | e87621b | 2017-04-12 20:53:35 +0530 | [diff] [blame] | 103 | * @active_uc_bpf_mode: Setting that determines how BPF is applied in active |
| 104 | * mode for uc packets |
| 105 | * @active_mc_bc_bpf_mode: Setting that determines how BPF is applied in |
| 106 | * active mode for MC/BC packets |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 107 | * @auto_power_save_fail_mode: auto detect power save failure mode |
Ashish Kumar Dhanotiya | 9335d81 | 2017-06-30 16:57:20 +0530 | [diff] [blame] | 108 | * @ito_repeat_count: Indicates ito repeated count |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 109 | * Structure for holding cds ini parameters. |
| 110 | */ |
| 111 | |
| 112 | struct cds_config_info { |
| 113 | uint16_t max_station; |
| 114 | uint16_t max_bssid; |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 115 | uint8_t powersave_offload_enabled; |
| 116 | uint8_t sta_maxlimod_dtim; |
| 117 | uint8_t sta_mod_dtim; |
| 118 | uint8_t sta_dynamic_dtim; |
Srinivas Girigowda | 35b0031 | 2017-06-27 21:52:03 -0700 | [diff] [blame] | 119 | enum qdf_driver_type driver_type; |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 120 | uint8_t max_wow_filters; |
| 121 | uint8_t wow_enable; |
| 122 | uint8_t ol_ini_info; |
| 123 | bool ssdp; |
| 124 | bool enable_mc_list; |
| 125 | uint8_t dfs_phyerr_filter_offload; |
| 126 | uint8_t ap_disable_intrabss_fwd; |
| 127 | uint8_t ap_maxoffload_peers; |
| 128 | uint8_t ap_maxoffload_reorderbuffs; |
| 129 | #ifdef FEATURE_WLAN_RA_FILTERING |
| 130 | uint16_t ra_ratelimit_interval; |
| 131 | bool is_ra_ratelimit_enabled; |
| 132 | #endif |
| 133 | uint8_t reorder_offload; |
| 134 | int32_t dfs_pri_multiplier; |
| 135 | uint8_t uc_offload_enabled; |
| 136 | uint32_t uc_txbuf_count; |
| 137 | uint32_t uc_txbuf_size; |
| 138 | uint32_t uc_rxind_ringcount; |
| 139 | uint32_t uc_tx_partition_base; |
| 140 | bool enable_rxthread; |
| 141 | bool ip_tcp_udp_checksum_offload; |
| 142 | bool ce_classify_enabled; |
| 143 | uint8_t max_scan; |
| 144 | #ifdef QCA_LL_TX_FLOW_CONTROL_V2 |
| 145 | uint32_t tx_flow_stop_queue_th; |
| 146 | uint32_t tx_flow_start_queue_offset; |
| 147 | #endif |
| 148 | #ifdef WLAN_FEATURE_LPSS |
| 149 | bool is_lpass_enabled; |
| 150 | #endif |
| 151 | #ifdef WLAN_FEATURE_NAN |
| 152 | bool is_nan_enabled; |
| 153 | #endif |
Anurag Chouhan | 04dbf6d | 2016-09-08 15:32:52 +0530 | [diff] [blame] | 154 | bool bpf_packet_filter_enable; |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 155 | bool tx_chain_mask_cck; |
| 156 | uint16_t self_gen_frm_pwr; |
Naveen Rawat | 64e477e | 2016-05-20 10:34:56 -0700 | [diff] [blame] | 157 | enum cfg_sub_20_channel_width sub_20_channel_width; |
Manjunathappa Prakash | fff753c | 2016-09-01 19:34:56 -0700 | [diff] [blame] | 158 | bool flow_steering_enabled; |
Naveen Rawat | 91df30a | 2016-10-12 21:26:18 -0700 | [diff] [blame] | 159 | bool self_recovery_enabled; |
Sandeep Puligilla | afa5289 | 2016-10-26 19:03:16 -0700 | [diff] [blame] | 160 | bool fw_timeout_crash; |
gbian | 62edd7e | 2017-03-07 13:12:13 +0800 | [diff] [blame] | 161 | struct ol_tx_sched_wrr_ac_specs_t ac_specs[TX_WMM_AC_NUM]; |
Hanumanth Reddy Pothula | e87621b | 2017-04-12 20:53:35 +0530 | [diff] [blame] | 162 | enum active_bpf_mode active_uc_bpf_mode; |
| 163 | enum active_bpf_mode active_mc_bc_bpf_mode; |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 164 | bool auto_power_save_fail_mode; |
Ashish Kumar Dhanotiya | 9335d81 | 2017-06-30 16:57:20 +0530 | [diff] [blame] | 165 | uint8_t ito_repeat_count; |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 166 | }; |
Sridhar Selvaraj | 8c6f5e8 | 2017-08-21 14:53:46 +0530 | [diff] [blame^] | 167 | |
| 168 | #ifdef WLAN_FEATURE_FILS_SK |
| 169 | #define MAX_PMK_LEN 48 |
| 170 | #define FILS_MAX_KEYNAME_NAI_LENGTH 255 |
| 171 | #define FILS_MAX_REALM_LEN 255 |
| 172 | #define FILS_MAX_RRK_LENGTH 64 |
| 173 | |
| 174 | struct cds_fils_connection_info { |
| 175 | bool is_fils_connection; |
| 176 | uint8_t keyname_nai[FILS_MAX_KEYNAME_NAI_LENGTH]; |
| 177 | uint32_t key_nai_length; |
| 178 | uint16_t sequence_number; |
| 179 | uint8_t r_rk[FILS_MAX_RRK_LENGTH]; |
| 180 | uint32_t r_rk_length; |
| 181 | uint8_t realm[FILS_MAX_REALM_LEN]; |
| 182 | uint32_t realm_len; |
| 183 | uint8_t akm_type; |
| 184 | uint8_t auth_type; |
| 185 | uint8_t pmk[MAX_PMK_LEN]; |
| 186 | uint8_t pmk_len; |
| 187 | uint8_t pmkid[16]; |
| 188 | }; |
| 189 | #endif |
Arun Khandavalli | c811dcc | 2016-06-26 07:37:21 +0530 | [diff] [blame] | 190 | #endif /* !defined( __CDS_CONFIG_H ) */ |