cfg_qos.h 13 KB

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