cfg_qos.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  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. * gTxAggSwRetryBE - Configure Tx aggregation sw retry for BE
  193. * @Min: 0
  194. * @Max: 64
  195. * @Default: 0
  196. *
  197. * gTxAggSwRetryBE gives an option to configure Tx aggregation sw
  198. * retry for BE. This can be useful in debugging throughput issues.
  199. *
  200. * Related: None
  201. *
  202. * Supported Feature: STA
  203. *
  204. * Usage: Internal
  205. *
  206. * </ini>
  207. */
  208. #define CFG_TX_AGGR_SW_RETRY_BE CFG_INI_UINT( \
  209. "gTxAggSwRetryBE", \
  210. 0, \
  211. 64, \
  212. 0, \
  213. CFG_VALUE_OR_DEFAULT, \
  214. "Tx aggregation retry value for BE")
  215. /*
  216. * <ini>
  217. * gTxAggSwRetryBK - Configure Tx aggregation sw retry for BK
  218. * @Min: 0
  219. * @Max: 64
  220. * @Default: 0
  221. *
  222. * gTxAggSwRetryBK gives an option to configure Tx aggregation sw
  223. * retry for BK. This can be useful in debugging throughput issues.
  224. *
  225. * Related: None
  226. *
  227. * Supported Feature: STA
  228. *
  229. * Usage: Internal
  230. *
  231. * </ini>
  232. */
  233. #define CFG_TX_AGGR_SW_RETRY_BK CFG_INI_UINT( \
  234. "gTxAggSwRetryBK", \
  235. 0, \
  236. 64, \
  237. 0, \
  238. CFG_VALUE_OR_DEFAULT, \
  239. "Tx aggregation retry value for BK")
  240. /*
  241. * <ini>
  242. * gTxAggSwRetryVI - Configure Tx aggregation sw retry for VI
  243. * @Min: 0
  244. * @Max: 64
  245. * @Default: 0
  246. *
  247. * gTxAggSwRetryVI gives an option to configure Tx aggregation sw
  248. * retry for VI. This can be useful in debugging throughput issues.
  249. *
  250. * Related: None
  251. *
  252. * Supported Feature: STA
  253. *
  254. * Usage: Internal
  255. *
  256. * </ini>
  257. */
  258. #define CFG_TX_AGGR_SW_RETRY_VI CFG_INI_UINT( \
  259. "gTxAggSwRetryVI", \
  260. 0, \
  261. 64, \
  262. 0, \
  263. CFG_VALUE_OR_DEFAULT, \
  264. "Tx aggregation retry value for VI")
  265. /*
  266. * <ini>
  267. * gTxAggSwRetryVO - Configure Tx aggregation sw retry for VO
  268. * @Min: 0
  269. * @Max: 64
  270. * @Default: 0
  271. *
  272. * gTxAggSwRetryVO gives an option to configure Tx aggregation sw
  273. * retry for VO. This can be useful in debugging throughput issues.
  274. *
  275. * Related: None
  276. *
  277. * Supported Feature: STA
  278. *
  279. * Usage: Internal
  280. *
  281. * </ini>
  282. */
  283. #define CFG_TX_AGGR_SW_RETRY_VO CFG_INI_UINT( \
  284. "gTxAggSwRetryVO", \
  285. 0, \
  286. 64, \
  287. 0, \
  288. CFG_VALUE_OR_DEFAULT, \
  289. "Tx aggregation retry value for VO")
  290. /*
  291. * <ini>
  292. * gTxNonAggSwRetryBE - Configure Tx non aggregation sw retry for BE
  293. * @Min: 0
  294. * @Max: 64
  295. * @Default: 0
  296. *
  297. * gTxNonAggSwRetryBE gives an option to configure Tx non aggregation sw
  298. * retry for BE. This can be useful in debugging throughput issues.
  299. *
  300. * Related: None
  301. *
  302. * Supported Feature: STA
  303. *
  304. * Usage: Internal
  305. *
  306. * </ini>
  307. */
  308. #define CFG_TX_NON_AGGR_SW_RETRY_BE CFG_INI_UINT( \
  309. "gTxNonAggSwRetryBE", \
  310. 0, \
  311. 64, \
  312. 0, \
  313. CFG_VALUE_OR_DEFAULT, \
  314. "Tx non aggregation retry value for BE")
  315. /*
  316. * <ini>
  317. * gTxNonAggSwRetryBK - Configure Tx non aggregation sw retry for BK
  318. * @Min: 0
  319. * @Max: 64
  320. * @Default: 0
  321. *
  322. * gTxNonAggSwRetryBK gives an option to configure Tx non aggregation sw
  323. * retry for BK. This can be useful in debugging throughput issues.
  324. *
  325. * Related: None
  326. *
  327. * Supported Feature: STA
  328. *
  329. * Usage: Internal
  330. *
  331. * </ini>
  332. */
  333. #define CFG_TX_NON_AGGR_SW_RETRY_BK CFG_INI_UINT( \
  334. "gTxNonAggSwRetryBK", \
  335. 0, \
  336. 64, \
  337. 0, \
  338. CFG_VALUE_OR_DEFAULT, \
  339. "Tx non aggregation retry value for BK")
  340. /*
  341. * <ini>
  342. * gTxNonAggSwRetryVI - Configure Tx non aggregation sw retry for VI
  343. * @Min: 0
  344. * @Max: 64
  345. * @Default: 0
  346. *
  347. * gTxNonAggSwRetryVI gives an option to configure Tx non aggregation sw
  348. * retry for VI. This can be useful in debugging throughput issues.
  349. *
  350. * Related: None
  351. *
  352. * Supported Feature: STA
  353. *
  354. * Usage: Internal
  355. *
  356. * </ini>
  357. */
  358. #define CFG_TX_NON_AGGR_SW_RETRY_VI CFG_INI_UINT( \
  359. "gTxNonAggSwRetryVI", \
  360. 0, \
  361. 64, \
  362. 0, \
  363. CFG_VALUE_OR_DEFAULT, \
  364. "Tx non aggregation retry value for VI")
  365. /*
  366. * <ini>
  367. * gTxNonAggSwRetryVO - Configure Tx non aggregation sw retry for VO
  368. * @Min: 0
  369. * @Max: 64
  370. * @Default: 0
  371. *
  372. * gTxNonAggSwRetryVO gives an option to configure Tx non aggregation sw
  373. * retry for VO. This can be useful in debugging throughput issues.
  374. *
  375. * Related: None
  376. *
  377. * Supported Feature: STA
  378. *
  379. * Usage: Internal
  380. *
  381. * </ini>
  382. */
  383. #define CFG_TX_NON_AGGR_SW_RETRY_VO CFG_INI_UINT( \
  384. "gTxNonAggSwRetryVO", \
  385. 0, \
  386. 64, \
  387. 0, \
  388. CFG_VALUE_OR_DEFAULT, \
  389. "Tx non aggregation retry value for VO")
  390. /*
  391. * <ini>
  392. * gTxAggSwRetry - Configure Tx aggregation sw retry
  393. * @Min: 0
  394. * @Max: 64
  395. * @Default: 16
  396. *
  397. * gTxAggSwRetry gives an option to configure Tx aggregation sw
  398. * retry. This can be useful in debugging throughput issues.
  399. *
  400. * Related: None
  401. *
  402. * Supported Feature: STA
  403. *
  404. * Usage: External
  405. *
  406. * </ini>
  407. */
  408. #define CFG_TX_AGGR_SW_RETRY CFG_INI_UINT( \
  409. "gTxAggSwRetry", \
  410. 0, \
  411. 64, \
  412. 16, \
  413. CFG_VALUE_OR_DEFAULT, \
  414. "Tx aggregation retry value")
  415. /*
  416. * <ini>
  417. * gTxNonAggSwRetry - Configure Tx non aggregation sw retry
  418. * @Min: 0
  419. * @Max: 64
  420. * @Default: 16
  421. *
  422. * gTxNonAggSwRetry gives an option to configure Tx non aggregation sw
  423. * retry. This can be useful in debugging throughput issues.
  424. *
  425. * Related: None
  426. *
  427. * Supported Feature: STA
  428. *
  429. * Usage: External
  430. *
  431. * </ini>
  432. */
  433. #define CFG_TX_NON_AGGR_SW_RETRY CFG_INI_UINT( \
  434. "gTxNonAggSwRetry", \
  435. 0, \
  436. 64, \
  437. 16, \
  438. CFG_VALUE_OR_DEFAULT, \
  439. "Tx non aggregation retry value")
  440. /*
  441. * <ini>
  442. * gSapMaxInactivityOverride - Configure
  443. * @Min: 0
  444. * @Max: 1
  445. * @Default: 0
  446. *
  447. * This parameter will avoid updating ap_sta_inactivity from hostapd.conf
  448. * file. If a station does not send anything in ap_max_inactivity seconds, an
  449. * empty data frame is sent to it in order to verify whether it is
  450. * still in range. If this frame is not ACKed, the station will be
  451. * disassociated and then deauthenticated. This feature is used to
  452. * clear station table of old entries when the STAs move out of the
  453. * range.
  454. *
  455. * Related: None
  456. *
  457. * Supported Feature: SAP
  458. *
  459. * Usage: External
  460. * </ini>
  461. */
  462. #define CFG_SAP_MAX_INACTIVITY_OVERRIDE CFG_INI_BOOL( \
  463. "gSapMaxInactivityOverride", \
  464. 0, \
  465. "SAP maximum inactivity override flag")
  466. /*
  467. * <ini>
  468. * gEnableApUapsd - Enable/disable UAPSD for SoftAP
  469. * @Min: 0
  470. * @Max: 1
  471. * @Default: 1
  472. *
  473. * This ini is used to setup setup U-APSD for Acs at association
  474. *
  475. * Related: None.
  476. *
  477. * Supported Feature: SAP
  478. *
  479. * Usage: External
  480. *
  481. * </ini>
  482. */
  483. #define CFG_SAP_QOS_UAPSD CFG_INI_BOOL( \
  484. "gEnableApUapsd", \
  485. 1, \
  486. "Enable UAPSD for SAP")
  487. #define IOT_AGGR_INFO_MAX_LEN 500
  488. #define IOT_AGGR_INFO_MAX_NUM 32
  489. #define IOT_AGGR_MSDU_MAX_NUM 6
  490. #define IOT_AGGR_MPDU_MAX_NUM 512
  491. /*
  492. * <ini>
  493. * cfg_tx_iot_aggr - OUI based tx aggr size for msdu/mpdu
  494. *
  495. * This ini gives an option to configure Tx aggregation size
  496. * in no. of MPDUs/MSDUs for specified OUI.
  497. * This can be useful for IOT issues.
  498. *
  499. * Format of the configuration:
  500. * cfg_tx_iot_aggr=<OUI-1>,<MSDU-1>,<MPDU-1>,<OUI-2>,<MSDU-2>,<MPDU-2>...
  501. * MSDU: 0..IOT_AGGR_MSDU_MAX_NUM, the max tx aggregation size in no. of MSDUs,
  502. * 0 means not specified.
  503. * MPDU: 0..IOT_AGGR_MPDU_MAX_NUM, the max tx aggregation size in no. of MPDUs,
  504. * 0 means not specified.
  505. * Note: MSDU-x/MPDU-x are the max values, FW will take decision for actual
  506. * AMSDU/AMPDU size on different platforms.
  507. *
  508. * For example:
  509. * cfg_tx_iot_aggr=112233,2,0,445566,3,32,778899,0,64
  510. * If vendor OUI-1("\x11\x22\x33") is found in assoc resp,
  511. * set tx amsdu size to 2;
  512. * If vendor OUI-2("\x44\x55\x66") is found in assoc resp,
  513. * set tx amsdu size to 3, set tx ampdu size to 32;
  514. * If vendor OUI-3("\x77\x88\x99") is found in assoc resp,
  515. * set tx ampdu size to 64.
  516. *
  517. * Related: IOT
  518. *
  519. * Supported Feature: IOT
  520. *
  521. * Usage: External
  522. *
  523. * </ini>
  524. */
  525. #define CFG_TX_IOT_AGGR CFG_INI_STRING( \
  526. "cfg_tx_iot_aggr", \
  527. 0, \
  528. IOT_AGGR_INFO_MAX_LEN, \
  529. "", \
  530. "Used to configure OUI based tx aggr size for msdu/mpdu")
  531. #define CFG_QOS_ALL \
  532. CFG(CFG_SAP_MAX_INACTIVITY_OVERRIDE) \
  533. CFG(CFG_TX_AGGREGATION_SIZE) \
  534. CFG(CFG_TX_AGGREGATION_SIZEBE) \
  535. CFG(CFG_TX_AGGREGATION_SIZEBK) \
  536. CFG(CFG_TX_AGGREGATION_SIZEVI) \
  537. CFG(CFG_TX_AGGREGATION_SIZEVO) \
  538. CFG(CFG_RX_AGGREGATION_SIZE) \
  539. CFG(CFG_TX_AGGR_SW_RETRY_BE) \
  540. CFG(CFG_TX_AGGR_SW_RETRY_BK) \
  541. CFG(CFG_TX_AGGR_SW_RETRY_VI) \
  542. CFG(CFG_TX_AGGR_SW_RETRY_VO) \
  543. CFG(CFG_TX_AGGR_SW_RETRY) \
  544. CFG(CFG_TX_NON_AGGR_SW_RETRY_BE) \
  545. CFG(CFG_TX_NON_AGGR_SW_RETRY_BK) \
  546. CFG(CFG_TX_NON_AGGR_SW_RETRY_VI) \
  547. CFG(CFG_TX_NON_AGGR_SW_RETRY_VO) \
  548. CFG(CFG_TX_NON_AGGR_SW_RETRY) \
  549. CFG(CFG_SAP_QOS_UAPSD) \
  550. CFG(CFG_TX_IOT_AGGR)
  551. #endif /* __CFG_MLME_QOS_H */