cfg_qos.h 13 KB

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