cfg_qos.h 13 KB

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