1 /* 2 * Copyright (c) 2012-2019 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: This file contains definitions of Data Path configuration. 22 */ 23 24 #ifndef _CFG_IPA_H_ 25 #define _CFG_IPA_H_ 26 27 #include "cfg_define.h" 28 29 /* DP INI Declarations */ 30 /* 31 * IPA Offload configuration - Each bit enables a feature 32 * bit0 - IPA Enable 33 * bit1 - IPA Pre filter enable 34 * bit2 - IPv6 enable 35 * bit3 - IPA Resource Manager (RM) enable 36 * bit4 - IPA Clock scaling enable 37 * bit5 - IPA UC enable 38 * bit6 - IPA UC STA enable 39 * bit8 - IPA real time debugging 40 * bit9 - IPA Optional wifi dp enable 41 */ 42 43 /* 44 * <ini> 45 * gIPAConfig - IPA configuration 46 * @Min: 0 47 * @Max: 0xFFFFFFFF 48 * @Default: 0 49 * 50 * This ini specifies the IPA configuration 51 * 52 * Related: N/A 53 * 54 * Supported Feature: IPA 55 * 56 * Usage: Internal 57 * 58 * </ini> 59 */ 60 #define CFG_DP_IPA_OFFLOAD_CONFIG \ 61 CFG_INI_UINT("gIPAConfig", \ 62 0, \ 63 0xFFFFFFFF, \ 64 0, \ 65 CFG_VALUE_OR_DEFAULT, "IPA offload configuration") 66 67 /* 68 * <ini> 69 * gIPADescSize - IPA descriptor size 70 * @Min: 800 71 * @Max: 8000 72 * @Default: 800 73 * 74 * This ini specifies the IPA descriptor size 75 * 76 * Related: N/A 77 * 78 * Supported Feature: IPA 79 * 80 * Usage: Internal 81 * 82 * </ini> 83 */ 84 #define CFG_DP_IPA_DESC_SIZE \ 85 CFG_INI_UINT("gIPADescSize", \ 86 800, \ 87 8000, \ 88 800, \ 89 CFG_VALUE_OR_DEFAULT, "IPA DESC SIZE") 90 91 /* 92 * <ini> 93 * gIPAHighBandwidthMbps - IPA high bw threshold 94 * @Min: 200 95 * @Max: 4294967295UL 96 * @Default: 400 97 * 98 * This ini specifies the IPA high bw threshold 99 * 100 * Related: N/A 101 * 102 * Supported Feature: IPA 103 * 104 * Usage: Internal 105 * 106 * </ini> 107 */ 108 #define CFG_DP_IPA_HIGH_BANDWIDTH_MBPS \ 109 CFG_INI_UINT("gIPAHighBandwidthMbps", \ 110 200, \ 111 4294967295UL, \ 112 400, \ 113 CFG_VALUE_OR_DEFAULT, "IPA high bw threshold") 114 115 /* 116 * <ini> 117 * gIPAMediumBandwidthMbps - IPA medium bw threshold 118 * @Min: 100 119 * @Max: 4294967295UL 120 * @Default: 200 121 * 122 * This ini specifies the IPA medium bw threshold 123 * 124 * Related: N/A 125 * 126 * Supported Feature: IPA 127 * 128 * Usage: Internal 129 * 130 * </ini> 131 */ 132 #define CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS \ 133 CFG_INI_UINT("gIPAMediumBandwidthMbps", \ 134 100, \ 135 4294967295UL, \ 136 200, \ 137 CFG_VALUE_OR_DEFAULT, "IPA medium bw threshold") 138 139 /* 140 * <ini> 141 * gIPALowBandwidthMbps - IPA low bw threshold 142 * @Min: 0 143 * @Max: 4294967295UL 144 * @Default: 100 145 * 146 * This ini specifies the IPA low bw threshold 147 * 148 * Related: N/A 149 * 150 * Supported Feature: IPA 151 * 152 * Usage: Internal 153 * 154 * </ini> 155 */ 156 #define CFG_DP_IPA_LOW_BANDWIDTH_MBPS \ 157 CFG_INI_UINT("gIPALowBandwidthMbps", \ 158 0, \ 159 4294967295UL, \ 160 100, \ 161 CFG_VALUE_OR_DEFAULT, "IPA low bw threshold") 162 163 /* 164 * <ini> 165 * gIPAForceVotingEnable - IPA force voting enable 166 * @Default: false 167 * 168 * This ini specifies to enable IPA force voting 169 * 170 * Related: N/A 171 * 172 * Supported Feature: IPA 173 * 174 * Usage: Internal 175 * 176 * </ini> 177 */ 178 #define CFG_DP_IPA_ENABLE_FORCE_VOTING \ 179 CFG_INI_BOOL("gIPAForceVotingEnable", \ 180 false, "Ctrl to enable force voting") 181 182 /* 183 * <ini> 184 * IpaUcTxBufCount - IPA tx buffer count 185 * @Min: 0 186 * @Max: 2048 187 * @Default: 512 188 * 189 * This ini specifies the IPA tx buffer count 190 * 191 * Related: N/A 192 * 193 * Supported Feature: IPA 194 * 195 * Usage: Internal 196 * 197 * </ini> 198 */ 199 #define CFG_DP_IPA_UC_TX_BUF_COUNT \ 200 CFG_INI_UINT("IpaUcTxBufCount", \ 201 0, \ 202 2048, \ 203 512, \ 204 CFG_VALUE_OR_DEFAULT, "IPA tx buffer count") 205 206 /* 207 * <ini> 208 * gIPAWds - IPA WDS Enable 209 * @Default: false 210 * 211 * This ini specifies to enable WDS for IPA 212 * 213 * Related: N/A 214 * 215 * Supported Feature: IPA 216 * 217 * Usage: Internal 218 * 219 * </ini> 220 */ 221 #define CFG_DP_IPA_WDS_STATUS \ 222 CFG_INI_BOOL("gIPAWds", \ 223 false, "Ctrl to enable WDS for EasyMesh") 224 225 /* 226 * <ini> 227 * gIPAVlanEnable - IPA vlan support enable 228 * @Default: false 229 * 230 * This ini specifies to enable IPA vlan support 231 * 232 * Related: N/A 233 * 234 * Supported Feature: IPA 235 * 236 * Usage: Internal 237 * 238 * </ini> 239 */ 240 #define CFG_DP_IPA_ENABLE_VLAN_SUPPORT \ 241 CFG_INI_BOOL("gIPAVlanEnable", \ 242 false, "Ctrl to enable vlan support with IPA Offload") 243 244 #define CFG_IPA \ 245 CFG(CFG_DP_IPA_OFFLOAD_CONFIG) \ 246 CFG(CFG_DP_IPA_DESC_SIZE) \ 247 CFG(CFG_DP_IPA_HIGH_BANDWIDTH_MBPS) \ 248 CFG(CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS) \ 249 CFG(CFG_DP_IPA_LOW_BANDWIDTH_MBPS) \ 250 CFG(CFG_DP_IPA_ENABLE_FORCE_VOTING) \ 251 CFG(CFG_DP_IPA_UC_TX_BUF_COUNT) \ 252 CFG(CFG_DP_IPA_WDS_STATUS) \ 253 CFG(CFG_DP_IPA_ENABLE_VLAN_SUPPORT) 254 #endif /* _CFG_IPA_H_ */ 255