1 /* 2 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 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 centralized definitions of QOS related 22 * converged configurations. 23 */ 24 25 #ifndef __CFG_MLME_QOS_H 26 #define __CFG_MLME_QOS_H 27 28 #define ADDBA_TXAGGR_SIZE 256 29 30 /* 31 * <ini> 32 * gTxAggregationSize - Gives an option to configure Tx aggregation size 33 * in no of MPDUs 34 * @Min: 0 35 * @Max: ADDBA_TXAGGR_SIZE 36 * @Default: ADDBA_TXAGGR_SIZE 37 * 38 * gTxAggregationSize gives an option to configure Tx aggregation size 39 * in no of MPDUs.This can be useful in debugging throughput issues 40 * 41 * Related: None 42 * 43 * Supported Feature: STA 44 * 45 * Usage: External 46 * 47 * </ini> 48 */ 49 #define CFG_TX_AGGREGATION_SIZE CFG_INI_UINT( \ 50 "gTxAggregationSize", \ 51 0, \ 52 ADDBA_TXAGGR_SIZE, \ 53 ADDBA_TXAGGR_SIZE, \ 54 CFG_VALUE_OR_DEFAULT, \ 55 "Tx Aggregation size value") 56 57 /* 58 * <ini> 59 * gTxAggregationSizeBE - To configure Tx aggregation size for BE queue 60 * in no of MPDUs 61 * @Min: 0 62 * @Max: ADDBA_TXAGGR_SIZE 63 * @Default: 0 64 * 65 * gTxAggregationSizeBE gives an option to configure Tx aggregation size 66 * for BE queue in no of MPDUs.This can be useful in debugging 67 * throughput issues 68 * 69 * Related: None 70 * 71 * Supported Feature: STA 72 * 73 * Usage: Internal 74 * 75 * </ini> 76 */ 77 #define CFG_TX_AGGREGATION_SIZEBE CFG_INI_UINT( \ 78 "gTxAggregationSizeBE", \ 79 0, \ 80 ADDBA_TXAGGR_SIZE, \ 81 0, \ 82 CFG_VALUE_OR_DEFAULT, \ 83 "Tx Aggregation size value BE") 84 85 /* 86 * <ini> 87 * gTxAggregationSizeBK - To configure Tx aggregation size for BK queue 88 * in no of MPDUs 89 * @Min: 0 90 * @Max: ADDBA_TXAGGR_SIZE 91 * @Default: 0 92 * 93 * gTxAggregationSizeBK gives an option to configure Tx aggregation size 94 * for BK queue in no of MPDUs.This can be useful in debugging 95 * throughput issues 96 * 97 * Related: None 98 * 99 * Supported Feature: STA 100 * 101 * Usage: Internal 102 * 103 * </ini> 104 */ 105 #define CFG_TX_AGGREGATION_SIZEBK CFG_INI_UINT( \ 106 "gTxAggregationSizeBK", \ 107 0, \ 108 ADDBA_TXAGGR_SIZE, \ 109 0, \ 110 CFG_VALUE_OR_DEFAULT, \ 111 "Tx Aggregation size value BK") 112 113 /* 114 * <ini> 115 * gTxAggregationSizeVI - To configure Tx aggregation size for VI queue 116 * in no of MPDUs 117 * @Min: 0 118 * @Max: ADDBA_TXAGGR_SIZE 119 * @Default: 0 120 * 121 * gTxAggregationSizeVI gives an option to configure Tx aggregation size 122 * for VI queue in no of MPDUs.This can be useful in debugging 123 * throughput issues 124 * 125 * Related: None 126 * 127 * Supported Feature: STA 128 * 129 * Usage: Internal 130 * 131 * </ini> 132 */ 133 #define CFG_TX_AGGREGATION_SIZEVI CFG_INI_UINT( \ 134 "gTxAggregationSizeVI", \ 135 0, \ 136 ADDBA_TXAGGR_SIZE, \ 137 0, \ 138 CFG_VALUE_OR_DEFAULT, \ 139 "Tx Aggregation size value for VI") 140 141 /* 142 * <ini> 143 * gTxAggregationSizeVO - To configure Tx aggregation size for VO queue 144 * in no of MPDUs 145 * @Min: 0 146 * @Max: ADDBA_TXAGGR_SIZE 147 * @Default: 0 148 * 149 * gTxAggregationSizeVO gives an option to configure Tx aggregation size 150 * for BE queue in no of MPDUs.This can be useful in debugging 151 * throughput issues 152 * 153 * Related: None 154 * 155 * Supported Feature: STA 156 * 157 * Usage: Internal 158 * 159 * </ini> 160 */ 161 #define CFG_TX_AGGREGATION_SIZEVO CFG_INI_UINT( \ 162 "gTxAggregationSizeVO", \ 163 0, \ 164 ADDBA_TXAGGR_SIZE, \ 165 0, \ 166 CFG_VALUE_OR_DEFAULT, \ 167 "Tx Aggregation size value for VO") 168 169 /* 170 * <ini> 171 * gRxAggregationSize - Gives an option to configure Rx aggregation size 172 * in no of MPDUs 173 * @Min: 1 174 * @Max: 1024 175 * @Default: 256 176 * 177 * gRxAggregationSize gives an option to configure Rx aggregation size 178 * in no of MPDUs. This can be useful in debugging throughput issues 179 * 180 * Related: None 181 * 182 * Supported Feature: STA 183 * 184 * Usage: External 185 * 186 * </ini> 187 */ 188 #define CFG_RX_AGGREGATION_SIZE CFG_INI_UINT( \ 189 "gRxAggregationSize", \ 190 1, \ 191 1024, \ 192 256, \ 193 CFG_VALUE_OR_DEFAULT, \ 194 "Rx Aggregation size value") 195 196 /* 197 * <ini> 198 * gTxAggSwRetryBE - Configure Tx aggregation sw retry for BE 199 * @Min: 0 200 * @Max: 64 201 * @Default: 0 202 * 203 * gTxAggSwRetryBE gives an option to configure Tx aggregation sw 204 * retry for BE. This can be useful in debugging throughput issues. 205 * 206 * Related: None 207 * 208 * Supported Feature: STA 209 * 210 * Usage: Internal 211 * 212 * </ini> 213 */ 214 #define CFG_TX_AGGR_SW_RETRY_BE CFG_INI_UINT( \ 215 "gTxAggSwRetryBE", \ 216 0, \ 217 64, \ 218 0, \ 219 CFG_VALUE_OR_DEFAULT, \ 220 "Tx aggregation retry value for BE") 221 222 /* 223 * <ini> 224 * gTxAggSwRetryBK - Configure Tx aggregation sw retry for BK 225 * @Min: 0 226 * @Max: 64 227 * @Default: 0 228 * 229 * gTxAggSwRetryBK gives an option to configure Tx aggregation sw 230 * retry for BK. This can be useful in debugging throughput issues. 231 * 232 * Related: None 233 * 234 * Supported Feature: STA 235 * 236 * Usage: Internal 237 * 238 * </ini> 239 */ 240 #define CFG_TX_AGGR_SW_RETRY_BK CFG_INI_UINT( \ 241 "gTxAggSwRetryBK", \ 242 0, \ 243 64, \ 244 0, \ 245 CFG_VALUE_OR_DEFAULT, \ 246 "Tx aggregation retry value for BK") 247 248 /* 249 * <ini> 250 * gTxAggSwRetryVI - Configure Tx aggregation sw retry for VI 251 * @Min: 0 252 * @Max: 64 253 * @Default: 0 254 * 255 * gTxAggSwRetryVI gives an option to configure Tx aggregation sw 256 * retry for VI. This can be useful in debugging throughput issues. 257 * 258 * Related: None 259 * 260 * Supported Feature: STA 261 * 262 * Usage: Internal 263 * 264 * </ini> 265 */ 266 #define CFG_TX_AGGR_SW_RETRY_VI CFG_INI_UINT( \ 267 "gTxAggSwRetryVI", \ 268 0, \ 269 64, \ 270 0, \ 271 CFG_VALUE_OR_DEFAULT, \ 272 "Tx aggregation retry value for VI") 273 274 /* 275 * <ini> 276 * gTxAggSwRetryVO - Configure Tx aggregation sw retry for VO 277 * @Min: 0 278 * @Max: 64 279 * @Default: 0 280 * 281 * gTxAggSwRetryVO gives an option to configure Tx aggregation sw 282 * retry for VO. This can be useful in debugging throughput issues. 283 * 284 * Related: None 285 * 286 * Supported Feature: STA 287 * 288 * Usage: Internal 289 * 290 * </ini> 291 */ 292 #define CFG_TX_AGGR_SW_RETRY_VO CFG_INI_UINT( \ 293 "gTxAggSwRetryVO", \ 294 0, \ 295 64, \ 296 0, \ 297 CFG_VALUE_OR_DEFAULT, \ 298 "Tx aggregation retry value for VO") 299 300 /* 301 * <ini> 302 * gTxNonAggSwRetryBE - Configure Tx non aggregation sw retry for BE 303 * @Min: 0 304 * @Max: 64 305 * @Default: 0 306 * 307 * gTxNonAggSwRetryBE gives an option to configure Tx non aggregation sw 308 * retry for BE. This can be useful in debugging throughput issues. 309 * 310 * Related: None 311 * 312 * Supported Feature: STA 313 * 314 * Usage: Internal 315 * 316 * </ini> 317 */ 318 #define CFG_TX_NON_AGGR_SW_RETRY_BE CFG_INI_UINT( \ 319 "gTxNonAggSwRetryBE", \ 320 0, \ 321 64, \ 322 0, \ 323 CFG_VALUE_OR_DEFAULT, \ 324 "Tx non aggregation retry value for BE") 325 326 /* 327 * <ini> 328 * gTxNonAggSwRetryBK - Configure Tx non aggregation sw retry for BK 329 * @Min: 0 330 * @Max: 64 331 * @Default: 0 332 * 333 * gTxNonAggSwRetryBK gives an option to configure Tx non aggregation sw 334 * retry for BK. This can be useful in debugging throughput issues. 335 * 336 * Related: None 337 * 338 * Supported Feature: STA 339 * 340 * Usage: Internal 341 * 342 * </ini> 343 */ 344 #define CFG_TX_NON_AGGR_SW_RETRY_BK CFG_INI_UINT( \ 345 "gTxNonAggSwRetryBK", \ 346 0, \ 347 64, \ 348 0, \ 349 CFG_VALUE_OR_DEFAULT, \ 350 "Tx non aggregation retry value for BK") 351 352 /* 353 * <ini> 354 * gTxNonAggSwRetryVI - Configure Tx non aggregation sw retry for VI 355 * @Min: 0 356 * @Max: 64 357 * @Default: 0 358 * 359 * gTxNonAggSwRetryVI gives an option to configure Tx non aggregation sw 360 * retry for VI. This can be useful in debugging throughput issues. 361 * 362 * Related: None 363 * 364 * Supported Feature: STA 365 * 366 * Usage: Internal 367 * 368 * </ini> 369 */ 370 #define CFG_TX_NON_AGGR_SW_RETRY_VI CFG_INI_UINT( \ 371 "gTxNonAggSwRetryVI", \ 372 0, \ 373 64, \ 374 0, \ 375 CFG_VALUE_OR_DEFAULT, \ 376 "Tx non aggregation retry value for VI") 377 378 /* 379 * <ini> 380 * gTxNonAggSwRetryVO - Configure Tx non aggregation sw retry for VO 381 * @Min: 0 382 * @Max: 64 383 * @Default: 0 384 * 385 * gTxNonAggSwRetryVO gives an option to configure Tx non aggregation sw 386 * retry for VO. This can be useful in debugging throughput issues. 387 * 388 * Related: None 389 * 390 * Supported Feature: STA 391 * 392 * Usage: Internal 393 * 394 * </ini> 395 */ 396 #define CFG_TX_NON_AGGR_SW_RETRY_VO CFG_INI_UINT( \ 397 "gTxNonAggSwRetryVO", \ 398 0, \ 399 64, \ 400 0, \ 401 CFG_VALUE_OR_DEFAULT, \ 402 "Tx non aggregation retry value for VO") 403 /* 404 * <ini> 405 * gTxAggSwRetry - Configure Tx aggregation sw retry 406 * @Min: 0 407 * @Max: 64 408 * @Default: 16 409 * 410 * gTxAggSwRetry gives an option to configure Tx aggregation sw 411 * retry. This can be useful in debugging throughput issues. 412 * 413 * Related: None 414 * 415 * Supported Feature: STA 416 * 417 * Usage: External 418 * 419 * </ini> 420 */ 421 #define CFG_TX_AGGR_SW_RETRY CFG_INI_UINT( \ 422 "gTxAggSwRetry", \ 423 0, \ 424 64, \ 425 16, \ 426 CFG_VALUE_OR_DEFAULT, \ 427 "Tx aggregation retry value") 428 /* 429 * <ini> 430 * gTxNonAggSwRetry - Configure Tx non aggregation sw retry 431 * @Min: 0 432 * @Max: 64 433 * @Default: 16 434 * 435 * gTxNonAggSwRetry gives an option to configure Tx non aggregation sw 436 * retry. This can be useful in debugging throughput issues. 437 * 438 * Related: None 439 * 440 * Supported Feature: STA 441 * 442 * Usage: External 443 * 444 * </ini> 445 */ 446 #define CFG_TX_NON_AGGR_SW_RETRY CFG_INI_UINT( \ 447 "gTxNonAggSwRetry", \ 448 0, \ 449 64, \ 450 16, \ 451 CFG_VALUE_OR_DEFAULT, \ 452 "Tx non aggregation retry value") 453 /* 454 * <ini> 455 * gSapMaxInactivityOverride - Configure 456 * @Min: 0 457 * @Max: 1 458 * @Default: 0 459 * 460 * This parameter will avoid updating ap_sta_inactivity from hostapd.conf 461 * file. If a station does not send anything in ap_max_inactivity seconds, an 462 * empty data frame is sent to it in order to verify whether it is 463 * still in range. If this frame is not ACKed, the station will be 464 * disassociated and then deauthenticated. This feature is used to 465 * clear station table of old entries when the STAs move out of the 466 * range. 467 * 468 * Related: None 469 * 470 * Supported Feature: SAP 471 * 472 * Usage: External 473 * </ini> 474 */ 475 #define CFG_SAP_MAX_INACTIVITY_OVERRIDE CFG_INI_BOOL( \ 476 "gSapMaxInactivityOverride", \ 477 0, \ 478 "SAP maximum inactivity override flag") 479 480 /* 481 * <ini> 482 * gEnableApUapsd - Enable/disable UAPSD for SoftAP 483 * @Min: 0 484 * @Max: 1 485 * @Default: 1 486 * 487 * This ini is used to setup setup U-APSD for Acs at association 488 * 489 * Related: None. 490 * 491 * Supported Feature: SAP 492 * 493 * Usage: External 494 * 495 * </ini> 496 */ 497 #define CFG_SAP_QOS_UAPSD CFG_INI_BOOL( \ 498 "gEnableApUapsd", \ 499 1, \ 500 "Enable UAPSD for SAP") 501 502 #define IOT_AGGR_INFO_MAX_LEN 500 503 #define IOT_AGGR_INFO_MAX_NUM 32 504 #define IOT_AGGR_MSDU_MAX_NUM 6 505 #define IOT_AGGR_MPDU_MAX_NUM 512 506 /* 507 * <ini> 508 * cfg_tx_iot_aggr - OUI based tx aggr size for msdu/mpdu 509 * 510 * This ini gives an option to configure Tx aggregation size 511 * in no. of MPDUs/MSDUs for specified OUI. 512 * This can be useful for IOT issues. 513 * 514 * Format of the configuration: 515 * cfg_tx_iot_aggr=<OUI-1>,<MSDU-1>,<MPDU-1>,<OUI-2>,<MSDU-2>,<MPDU-2>... 516 * MSDU: 0..IOT_AGGR_MSDU_MAX_NUM, the max tx aggregation size in no. of MSDUs, 517 * 0 means not specified. 518 * MPDU: 0..IOT_AGGR_MPDU_MAX_NUM, the max tx aggregation size in no. of MPDUs, 519 * 0 means not specified. 520 * Note: MSDU-x/MPDU-x are the max values, FW will take decision for actual 521 * AMSDU/AMPDU size on different platforms. 522 * 523 * For example: 524 * cfg_tx_iot_aggr=112233,2,0,445566,3,32,778899,0,64 525 * If vendor OUI-1("\x11\x22\x33") is found in assoc resp, 526 * set tx amsdu size to 2; 527 * If vendor OUI-2("\x44\x55\x66") is found in assoc resp, 528 * set tx amsdu size to 3, set tx ampdu size to 32; 529 * If vendor OUI-3("\x77\x88\x99") is found in assoc resp, 530 * set tx ampdu size to 64. 531 * 532 * Related: IOT 533 * 534 * Supported Feature: IOT 535 * 536 * Usage: External 537 * 538 * </ini> 539 */ 540 #define CFG_TX_IOT_AGGR CFG_INI_STRING( \ 541 "cfg_tx_iot_aggr", \ 542 0, \ 543 IOT_AGGR_INFO_MAX_LEN, \ 544 "", \ 545 "Used to configure OUI based tx aggr size for msdu/mpdu") 546 547 #define CFG_QOS_ALL \ 548 CFG(CFG_SAP_MAX_INACTIVITY_OVERRIDE) \ 549 CFG(CFG_TX_AGGREGATION_SIZE) \ 550 CFG(CFG_TX_AGGREGATION_SIZEBE) \ 551 CFG(CFG_TX_AGGREGATION_SIZEBK) \ 552 CFG(CFG_TX_AGGREGATION_SIZEVI) \ 553 CFG(CFG_TX_AGGREGATION_SIZEVO) \ 554 CFG(CFG_RX_AGGREGATION_SIZE) \ 555 CFG(CFG_TX_AGGR_SW_RETRY_BE) \ 556 CFG(CFG_TX_AGGR_SW_RETRY_BK) \ 557 CFG(CFG_TX_AGGR_SW_RETRY_VI) \ 558 CFG(CFG_TX_AGGR_SW_RETRY_VO) \ 559 CFG(CFG_TX_AGGR_SW_RETRY) \ 560 CFG(CFG_TX_NON_AGGR_SW_RETRY_BE) \ 561 CFG(CFG_TX_NON_AGGR_SW_RETRY_BK) \ 562 CFG(CFG_TX_NON_AGGR_SW_RETRY_VI) \ 563 CFG(CFG_TX_NON_AGGR_SW_RETRY_VO) \ 564 CFG(CFG_TX_NON_AGGR_SW_RETRY) \ 565 CFG(CFG_SAP_QOS_UAPSD) \ 566 CFG(CFG_TX_IOT_AGGR) 567 568 #endif /* __CFG_MLME_QOS_H */ 569