1 /* 2 * Copyright (c) 2012 - 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: This file contains centralized definitions of converged configuration. 21 */ 22 23 #ifndef __CFG_NR_H 24 #define __CFG_NR_H 25 26 /* 27 * <ini> 28 * 11k_offload_enable_bitmask - 11K offload bitmask feature control 29 * @Min: 0 30 * @Max: 1 31 * @Default: 1 32 * 33 * Disabled when 0 and enabled when 1 34 * Usage: External 35 * 36 * </ini> 37 */ 38 #define CFG_OFFLOAD_11K_ENABLE_BITMASK CFG_INI_BOOL( \ 39 "11k_offload_enable_bitmask", \ 40 1, \ 41 "11K offload bitmask feature control") 42 43 /* 44 * <ini> 45 * nr_offload_params_bitmask - bitmask to specify which of the 46 * neighbor report offload params are valid in the ini 47 * frame 48 * @Min: 0 49 * @Max: 63 50 * @Default: 63 51 * 52 * This ini specifies which of the neighbor report offload params are valid 53 * and should be considered by the FW. The bitmask is as follows 54 * B0: nr_offload_time_offset 55 * B1: nr_offload_low_rssi_offset 56 * B2: nr_offload_bmiss_count_trigger 57 * B3: nr_offload_per_threshold_offset 58 * B4: nr_offload_cache_timeout 59 * B5: nr_offload_max_req_cap 60 * B6-B7: Reserved 61 * 62 * Related : 11k_offload_enable_bitmask 63 * 64 * Usage: External 65 * 66 * </ini> 67 */ 68 #define CFG_OFFLOAD_NEIGHBOR_REPORT_PARAMS_BITMASK CFG_INI_UINT( \ 69 "nr_offload_params_bitmask", \ 70 0, \ 71 63, \ 72 63, \ 73 CFG_VALUE_OR_DEFAULT, \ 74 "Neighbor report offload params validity bitmask") 75 76 #define OFFLOAD_11K_BITMASK_NEIGHBOR_REPORT_REQUEST 0x1 77 78 /* 79 * <ini> 80 * nr_offload_time_offset - time interval in seconds after the 81 * neighbor report offload command to send the first neighbor report request 82 * frame 83 * @Min: 0 84 * @Max: 3600 85 * @Default: 30 86 * 87 * Related : nr_offload_params_bitmask 88 * 89 * Usage: External 90 * 91 * </ini> 92 */ 93 #define CFG_OFFLOAD_NEIGHBOR_REPORT_TIME_OFFSET CFG_INI_UINT( \ 94 "nr_offload_time_offset", \ 95 0, \ 96 3600, \ 97 30, \ 98 CFG_VALUE_OR_DEFAULT, \ 99 "Neighbor report time offset") 100 101 /* 102 * <ini> 103 * nr_offload_low_rssi_offset - offset from the roam RSSI threshold 104 * to trigger the neighbor report request frame (in dBm) 105 * @Min: 4 106 * @Max: 10 107 * @Default: 4 108 * 109 * Related : nr_offload_params_bitmask 110 * 111 * Usage: External 112 * 113 * </ini> 114 */ 115 #define CFG_OFFLOAD_NEIGHBOR_REPORT_LOW_RSSI_OFFSET CFG_INI_UINT( \ 116 "nr_offload_low_rssi_offset", \ 117 4, \ 118 10, \ 119 4, \ 120 CFG_VALUE_OR_DEFAULT, \ 121 "Neighbor report low RSSI offset") 122 123 /* 124 * <ini> 125 * nr_offload_bmiss_count_trigger - Number of beacon miss events to 126 * trigger a neighbor report request frame 127 * @Min: 1 128 * @Max: 5 129 * @Default: 1 130 * 131 * Related : nr_offload_params_bitmask 132 * 133 * Usage: External 134 * 135 * </ini> 136 */ 137 #define CFG_OFFLOAD_NEIGHBOR_REPORT_BMISS_COUNT_TRIGGER CFG_INI_UINT( \ 138 "nr_offload_bmiss_count_trigger", \ 139 1, \ 140 5, \ 141 1, \ 142 CFG_VALUE_OR_DEFAULT, \ 143 "Beacon miss count trigger for neighbor report req frame") 144 145 /* 146 * <ini> 147 * nr_offload_per_threshold_offset - offset from PER threshold to 148 * trigger a neighbor report request frame (in %) 149 * @Min: 5 150 * @Max: 20 151 * @Default: 5 152 * 153 * This ini is used to set the neighbor report offload parameter: 154 * 155 * Related : nr_offload_params_bitmask 156 * 157 * Usage: External 158 * 159 * </ini> 160 */ 161 #define CFG_OFFLOAD_NEIGHBOR_REPORT_PER_THRESHOLD_OFFSET CFG_INI_UINT( \ 162 "nr_offload_per_threshold_offset", \ 163 5, \ 164 20, \ 165 5, \ 166 CFG_VALUE_OR_DEFAULT, \ 167 "PER threshold offset to trigger neighbor report req frame") 168 169 /* 170 * <ini> 171 * nr_offload_cache_timeout - time in seconds after which the 172 * neighbor report cache is marked as timed out and any of the triggers would 173 * cause a neighbor report request frame to be sent. 174 * @Min: 5 175 * @Max: 86400 176 * @Default: 1200 177 * 178 * Related : nr_offload_params_bitmask 179 * 180 * Usage: External 181 * 182 * </ini> 183 */ 184 #define CFG_OFFLOAD_NEIGHBOR_REPORT_CACHE_TIMEOUT CFG_INI_UINT( \ 185 "nr_offload_cache_timeout", \ 186 5, \ 187 86400, \ 188 1200, \ 189 CFG_VALUE_OR_DEFAULT, \ 190 "Neighbor report cache timeout to trigger report req frame") 191 192 /* 193 * <ini> 194 * nr_offload_max_req_cap - Max number of neighbor 195 * report requests that can be sent to a connected peer in the current session. 196 * This counter is reset once a successful roam happens or at cache timeout 197 * @Min: 3 198 * @Max: 300 199 * @Default: 3 200 * 201 * Related : nr_offload_params_bitmask 202 * 203 * Usage: External 204 * 205 * </ini> 206 */ 207 #define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP CFG_INI_UINT( \ 208 "nr_offload_max_req_cap", \ 209 3, \ 210 300, \ 211 3, \ 212 CFG_VALUE_OR_DEFAULT, \ 213 "Max neighbor report request to be sent to connected peer") 214 215 #define CFG_11K_ALL \ 216 CFG(CFG_OFFLOAD_11K_ENABLE_BITMASK) \ 217 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_PARAMS_BITMASK) \ 218 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_TIME_OFFSET) \ 219 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_LOW_RSSI_OFFSET) \ 220 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_BMISS_COUNT_TRIGGER) \ 221 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_PER_THRESHOLD_OFFSET) \ 222 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_CACHE_TIMEOUT) \ 223 CFG(CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP) 224 225 #endif 226