cfg_qos.h 13 KB

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