cfg_mlme_nss_chains.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. /*
  2. * Copyright (c) 2012-2018 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 converged configuration.
  20. */
  21. #ifndef __CFG_MLME_NSS_CHAINS
  22. #define __CFG_MLME_NSS_CHAINS
  23. /*
  24. * <ini>
  25. * num_tx_chains_2g - Config Param to change number of tx
  26. * chains per vdev for 2.4ghz frequency connections
  27. * @Min: 0x01249249
  28. * @Max: 0x02492492
  29. * @Default: 0x02492492
  30. *
  31. * This ini is used to change the num of chains for eg:-
  32. * 0x01249249 - change all vdev's num tx chains for 2.4ghz connection to 1 each
  33. * 0x02492492 - change all vdev's num tx chains for 2.4ghz connection to 2 each
  34. * Bits VDEV Type
  35. * BIT[0:2] STA
  36. * BIT[3:5] SAP
  37. * BIT[6:8] P2P GO
  38. * BIT[9:11] P2P Client
  39. * BIT[12:14] TDLS
  40. * BIT[15:17] IBSS
  41. * BIT[18:20] P2P device
  42. * BIT[21:23] OCB
  43. * BIT[24:26] NAN
  44. * BIT[27:31] Reserved
  45. *
  46. * Related: STA/SAP/P2P/IBSS/NAN.
  47. *
  48. * Supported Feature: Dynamic chainmask
  49. *
  50. * Usage: External
  51. *
  52. * </ini>
  53. */
  54. #define CFG_NUM_TX_CHAINS_2G CFG_INI_UINT( \
  55. "num_tx_chains_2g", \
  56. 0x01249249, \
  57. 0x02492492, \
  58. 0x02492492, \
  59. CFG_VALUE_OR_DEFAULT, \
  60. "num tx chains 2g")
  61. /*
  62. * <ini>
  63. * num_tx_chains_5g - Config Param to change number of tx
  64. * chains per vdev for 5 ghz frequency connections
  65. * @Min: 0x01249249
  66. * @Max: 0x02492492
  67. * @Default: 0x02492492
  68. *
  69. * This ini is used to change the num of chains for eg:-
  70. * 0x01249249- change all vdev's tx num chains for 5ghz connection to 1 each
  71. * 0x02492492 - change all vdev's tx num chains for 5ghz connection to 2 each
  72. * Bits VDEV Type
  73. * BIT[0:2] STA
  74. * BIT[3:5] SAP
  75. * BIT[6:8] P2P GO
  76. * BIT[9:11] P2P Client
  77. * BIT[12:14] TDLS
  78. * BIT[15:17] IBSS
  79. * BIT[18:20] P2P device
  80. * BIT[21:23] OCB
  81. * BIT[24:26] NAN
  82. * BIT[27:31] Reserved
  83. *
  84. * Related: STA/SAP/P2P/IBSS/NAN.
  85. *
  86. * Supported Feature: Dynamic chainmask
  87. *
  88. * Usage: External
  89. *
  90. * </ini>
  91. */
  92. #define CFG_NUM_TX_CHAINS_5G CFG_INI_UINT( \
  93. "num_tx_chains_5g", \
  94. 0x01249249, \
  95. 0x02492492, \
  96. 0x02492492, \
  97. CFG_VALUE_OR_DEFAULT, \
  98. "num tx chains 5g")
  99. /*
  100. * <ini>
  101. * num_rx_chains_2g - Config Param to change number of rx
  102. * chains per vdev for 2.4 ghz frequency connections
  103. * @Min: 0x01249249
  104. * @Max: 0x02492492
  105. * @Default: 0x02492492
  106. *
  107. * This ini is used to change the num of chains for eg:-
  108. * 0x01249249 - change all vdev's rx num chains for 2.4ghz connections to 1 each
  109. * 0x02492492 - change all vdev's rx num chains for 2.4ghz connections to 2 each
  110. * Bits VDEV Type
  111. * BIT[0:2] STA
  112. * BIT[3:5] SAP
  113. * BIT[6:8] P2P GO
  114. * BIT[9:11] P2P Client
  115. * BIT[12:14] TDLS
  116. * BIT[15:17] IBSS
  117. * BIT[18:20] P2P device
  118. * BIT[21:23] OCB
  119. * BIT[24:26] NAN
  120. * BIT[27:31] Reserved
  121. *
  122. * Related: STA/SAP/P2P/IBSS/NAN.
  123. *
  124. * Supported Feature: Dynamic chainmask
  125. *
  126. * Usage: External
  127. *
  128. * </ini>
  129. */
  130. #define CFG_NUM_RX_CHAINS_2G CFG_INI_UINT( \
  131. "num_rx_chains_2g", \
  132. 0x01249249, \
  133. 0x02492492, \
  134. 0x02492492, \
  135. CFG_VALUE_OR_DEFAULT, \
  136. "num rx chains 2g")
  137. /*
  138. * <ini>
  139. * num_rx_chains_5g - Config Param to change number of rx
  140. * chains per vdev for 5 ghz frequency connections
  141. * @Min: 0x01249249
  142. * @Max: 0x02492492
  143. * @Default: 0x02492492
  144. *
  145. * This ini is used to change the num of chains for eg:-
  146. * 0x01249249 - change all vdev's rx num chains for 5ghz connections to 1 each
  147. * 0x02492492 - change all vdev's rx num chains for 5ghz connections to 2 each
  148. * Bits VDEV Type
  149. * BIT[0:2] STA
  150. * BIT[3:5] SAP
  151. * BIT[6:8] P2P GO
  152. * BIT[9:11] P2P Client
  153. * BIT[12:14] TDLS
  154. * BIT[15:17] IBSS
  155. * BIT[18:20] P2P device
  156. * BIT[21:23] OCB
  157. * BIT[24:26] NAN
  158. * BIT[27:31] Reserved
  159. *
  160. * Related: STA/SAP/P2P/IBSS/NAN.
  161. *
  162. * Supported Feature: Dynamic chainmask
  163. *
  164. * Usage: External
  165. *
  166. * </ini>
  167. */
  168. #define CFG_NUM_RX_CHAINS_5G CFG_INI_UINT( \
  169. "num_rx_chains_5g", \
  170. 0x01249249, \
  171. 0x02492492, \
  172. 0x02492492, \
  173. CFG_VALUE_OR_DEFAULT, \
  174. "num rx chains 5g")
  175. /*
  176. * <ini>
  177. * tx_nss_2g - Config Param to change tx nss
  178. * per vdev for 2.4ghz frequency connections
  179. * @Min: 0x01249249
  180. * @Max: 0x02492492
  181. * @Default: 0x02492492
  182. *
  183. * This ini is used to change the num of tx spatial streams for eg:-
  184. * 0x01249249 - change all vdev's tx nss for 2.4ghz connections to 1 each
  185. * 0x02492492 - change all vdev's tx nss for 2.4ghz connections to 2 each
  186. * Bits VDEV Type
  187. * BIT[0:2] STA
  188. * BIT[3:5] SAP
  189. * BIT[6:8] P2P GO
  190. * BIT[9:11] P2P Client
  191. * BIT[12:14] TDLS
  192. * BIT[15:17] IBSS
  193. * BIT[18:20] P2P device
  194. * BIT[21:23] OCB
  195. * BIT[24:26] NAN
  196. * BIT[27:31] Reserved
  197. *
  198. * Related: STA/SAP/P2P/IBSS/NAN.
  199. *
  200. * Supported Feature: Dynamic chainmask
  201. *
  202. * Usage: External
  203. *
  204. * </ini>
  205. */
  206. #define CFG_TX_NSS_2G CFG_INI_UINT( \
  207. "tx_nss_2g", \
  208. 0x01249249, \
  209. 0x02492492, \
  210. 0x02492492, \
  211. CFG_VALUE_OR_DEFAULT, \
  212. "tx nss 2.4ghz")
  213. /*
  214. * <ini>
  215. * tx_nss_5g - Config Param to change tx nss
  216. * per vdev for 5ghz frequency connections
  217. * @Min: 0x01249249
  218. * @Max: 0x02492492
  219. * @Default: 0x02492492
  220. *
  221. * This ini is used to change the num of tx spatial streams for eg:-
  222. * 0x01249249 - change all vdev's tx nss for 5ghz connections to 1 each
  223. * 0x02492492 - change all vdev's tx nss for 5ghz connections to 2 each
  224. * Bits VDEV Type
  225. * BIT[0:2] STA
  226. * BIT[3:5] SAP
  227. * BIT[6:8] P2P GO
  228. * BIT[9:11] P2P Client
  229. * BIT[12:14] TDLS
  230. * BIT[15:17] IBSS
  231. * BIT[18:20] P2P device
  232. * BIT[21:23] OCB
  233. * BIT[24:26] NAN
  234. * BIT[27:31] Reserved
  235. *
  236. * Related: STA/SAP/P2P/IBSS/NAN.
  237. *
  238. * Supported Feature: Dynamic chainmask
  239. *
  240. * Usage: External
  241. *
  242. * </ini>
  243. */
  244. #define CFG_TX_NSS_5G CFG_INI_UINT( \
  245. "tx_nss_5g", \
  246. 0x01249249, \
  247. 0x02492492, \
  248. 0x02492492, \
  249. CFG_VALUE_OR_DEFAULT, \
  250. "tx nss 5ghz")
  251. /*
  252. * <ini>
  253. * rx_nss_2g - Config Param to change rx nss
  254. * per vdev for 2.4ghz frequency connections
  255. *
  256. * @Min: 0x01249249
  257. * @Max: 0x02492492
  258. * @Default: 0x02492492
  259. *
  260. * This ini is used to change the num of rx spatial streams for eg:-
  261. * 0x01249249 - change all vdev's rx nss for 2.4ghz connections to 1 each
  262. * 0x02492492 - change all vdev's rx nss for 2.4ghz connections to 2 each
  263. * Bits VDEV Type
  264. * BIT[0:2] STA
  265. * BIT[3:5] SAP
  266. * BIT[6:8] P2P GO
  267. * BIT[9:11] P2P Client
  268. * BIT[12:14] TDLS
  269. * BIT[15:17] IBSS
  270. * BIT[18:20] P2P device
  271. * BIT[21:23] OCB
  272. * BIT[24:26] NAN
  273. * BIT[27:31] Reserved
  274. *
  275. * Related: STA/SAP/P2P/IBSS/NAN.
  276. *
  277. * Supported Feature: Dynamic chainmask
  278. *
  279. * Usage: External
  280. *
  281. * </ini>
  282. */
  283. #define CFG_RX_NSS_2G CFG_INI_UINT( \
  284. "rx_nss_2g", \
  285. 0x01249249, \
  286. 0x02492492, \
  287. 0x02492492, \
  288. CFG_VALUE_OR_DEFAULT, \
  289. "rx nss 2.4ghz")
  290. /*
  291. * <ini>
  292. * rx_nss_5g - Config Param to change rx nss
  293. * per vdev for 5ghz frequency connections
  294. * @Min: 0x01249249
  295. * @Max: 0x02492492
  296. * @Default: 0x02492492
  297. *
  298. * This ini is used to change the num of rx spatial streams for eg:-
  299. * 0x01249249 - change all vdev's rx nss for 5ghz connections to 1 each
  300. * 0x02492492 - change all vdev's rx nss for 5ghz connections to 2 each
  301. * Bits VDEV Type
  302. * BIT[0:2] STA
  303. * BIT[3:5] SAP
  304. * BIT[6:8] P2P GO
  305. * BIT[9:11] P2P Client
  306. * BIT[12:14] TDLS
  307. * BIT[15:17] IBSS
  308. * BIT[18:20] P2P device
  309. * BIT[21:23] OCB
  310. * BIT[24:26] NAN
  311. * BIT[27:31] Reserved
  312. *
  313. * Related: STA/SAP/P2P/IBSS/NAN.
  314. *
  315. * Supported Feature: Dynamic chainmask
  316. *
  317. * Usage: External
  318. *
  319. * </ini>
  320. */
  321. #define CFG_RX_NSS_5G CFG_INI_UINT( \
  322. "rx_nss_5g", \
  323. 0x01249249, \
  324. 0x02492492, \
  325. 0x02492492, \
  326. CFG_VALUE_OR_DEFAULT, \
  327. "rx nss 5ghz")
  328. /*
  329. * <ini>
  330. * num_tx_chains_11b - Config Param to change number of tx
  331. * chains per vdev for 2.4ghz 11b mode connections
  332. * @Min: 0x01249249
  333. * @Max: 0x02492492
  334. * @Default: 0x02492492
  335. *
  336. * This ini is used to change the num of chains for eg:-
  337. * 0x01249249 - change all vdev's num chains for 11b connections to 1 each
  338. * 0x02492492 - change all vdev's num chains for 11b connections to 2 each
  339. * Bits VDEV Type
  340. * BIT[0:2] STA
  341. * BIT[3:5] SAP
  342. * BIT[6:8] P2P GO
  343. * BIT[9:11] P2P Client
  344. * BIT[12:14] TDLS
  345. * BIT[15:17] IBSS
  346. * BIT[18:20] P2P device
  347. * BIT[21:23] OCB
  348. * BIT[24:26] NAN
  349. * BIT[27:31] Reserved
  350. *
  351. * Related: STA/SAP/P2P/IBSS/NAN.
  352. *
  353. * Supported Feature: Dynamic chainmask
  354. *
  355. * Usage: External
  356. *
  357. * </ini>
  358. */
  359. #define CFG_NUM_TX_CHAINS_11b CFG_INI_UINT( \
  360. "num_tx_chains_11b", \
  361. 0x01249249, \
  362. 0x02492492, \
  363. 0x02492492, \
  364. CFG_VALUE_OR_DEFAULT, \
  365. "num tx chains 11b")
  366. /*
  367. * <ini>
  368. * num_tx_chains_11g - Config Param to change number of tx
  369. * chains per vdev for 2.4ghz 11g mode connections
  370. * @Min: 0x01249249
  371. * @Max: 0x02492492
  372. * @Default: 0x02492492
  373. *
  374. * This ini is used to change the num of chains for eg:-
  375. * 0x01249249 - change all vdev's num chains for 11g connections to 1 each
  376. * 0x02492492 - change all vdev's num chains for 11g connections to 2 each
  377. * Bits VDEV Type
  378. * BIT[0:2] STA
  379. * BIT[3:5] SAP
  380. * BIT[6:8] P2P GO
  381. * BIT[9:11] P2P Client
  382. * BIT[12:14] TDLS
  383. * BIT[15:17] IBSS
  384. * BIT[18:20] P2P device
  385. * BIT[21:23] OCB
  386. * BIT[24:26] NAN
  387. * BIT[27:31] Reserved
  388. *
  389. * Related: STA/SAP/P2P/IBSS/NAN.
  390. *
  391. * Supported Feature: Dynamic chainmask
  392. *
  393. * Usage: External
  394. *
  395. * </ini>
  396. */
  397. #define CFG_NUM_TX_CHAINS_11g CFG_INI_UINT( \
  398. "num_tx_chains_11g", \
  399. 0x01249249, \
  400. 0x02492492, \
  401. 0x02492492, \
  402. CFG_VALUE_OR_DEFAULT, \
  403. "num tx chains 11g")
  404. /*
  405. * <ini>
  406. * num_tx_chains_11a - Config Param to change number of tx
  407. * chains per vdev for 5ghz 11a mode connections
  408. * @Min: 0x01249249
  409. * @Max: 0x02492492
  410. * @Default: 0x02492492
  411. *
  412. * This ini is used to change the num of chains for eg:-
  413. * 0x01249249 - change all vdev's num chains for 11a connections to 1 each
  414. * 0x02492492 - change all vdev's num chains for 11a connections to 2 each
  415. * Bits VDEV Type
  416. * BIT[0:2] STA
  417. * BIT[3:5] SAP
  418. * BIT[6:8] P2P GO
  419. * BIT[9:11] P2P Client
  420. * BIT[12:14] TDLS
  421. * BIT[15:17] IBSS
  422. * BIT[18:20] P2P device
  423. * BIT[21:23] OCB
  424. * BIT[24:26] NAN
  425. * BIT[27:31] Reserved
  426. *
  427. * Related: STA/SAP/P2P/IBSS/NAN.
  428. *
  429. * Supported Feature: Dynamic chainmask
  430. *
  431. * Usage: External
  432. *
  433. * </ini>
  434. */
  435. #define CFG_NUM_TX_CHAINS_11a CFG_INI_UINT( \
  436. "num_tx_chains_11a", \
  437. 0x01249249, \
  438. 0x02492492, \
  439. 0x02492492, \
  440. CFG_VALUE_OR_DEFAULT, \
  441. "num tx chains 11a")
  442. /*
  443. * <ini>
  444. * disable_tx_mrc_2g - Config Param to disable 2 chains in 1x1 nss mode
  445. * @Min: 0
  446. * @Max: 1
  447. * @Default: 0
  448. *
  449. * Related: STA/SAP/P2P/IBSS/NAN.
  450. *
  451. * Supported Feature: Dynamic chainmask
  452. *
  453. * Usage: External
  454. *
  455. * </ini>
  456. */
  457. #define CFG_DISABLE_TX_MRC_2G CFG_INI_BOOL( \
  458. "disable_tx_mrc_2g", \
  459. 0, \
  460. "disable diversity gain tx 2g")
  461. /*
  462. * <ini>
  463. * disable_rx_mrc_2g - Config Param to disable 2 chains in 1x1 nss mode
  464. * @Min: 0
  465. * @Max: 1
  466. * @Default: 0
  467. *
  468. * Related: STA/SAP/P2P/IBSS/NAN.
  469. *
  470. * Supported Feature: Dynamic chainmask
  471. *
  472. * Usage: External
  473. *
  474. * </ini>
  475. */
  476. #define CFG_DISABLE_RX_MRC_2G CFG_INI_BOOL( \
  477. "disable_rx_mrc_2g", \
  478. 0, \
  479. "disable diversity gain rx 2g")
  480. /*
  481. * <ini>
  482. * disable_tx_mrc_5g - Config Param to disable 2 chains in 1x1 nss mode
  483. * @Min: 0
  484. * @Max: 1
  485. * @Default: 0
  486. *
  487. * Related: STA/SAP/P2P/IBSS/NAN.
  488. *
  489. * Supported Feature: Dynamic chainmask
  490. *
  491. * Usage: External
  492. *
  493. * </ini>
  494. */
  495. #define CFG_DISABLE_TX_MRC_5G CFG_INI_BOOL( \
  496. "disable_tx_mrc_5g", \
  497. 0, \
  498. "disable diversity gain tx 5g")
  499. /*
  500. * <ini>
  501. * disable_rx_mrc_5g - Config Param to disable 2 chains in 1x1 nss mode
  502. * @Min: 0
  503. * @Max: 1
  504. * @Default: 0
  505. *
  506. * Related: STA/SAP/P2P/IBSS/NAN.
  507. *
  508. * Supported Feature: Dynamic chainmask
  509. *
  510. * Usage: External
  511. *
  512. * </ini>
  513. */
  514. #define CFG_DISABLE_RX_MRC_5G CFG_INI_BOOL( \
  515. "disable_rx_mrc_5g", \
  516. 0, \
  517. "disable diversity gain rx 5g")
  518. #define CFG_NSS_CHAINS_ALL \
  519. CFG(CFG_NUM_TX_CHAINS_2G) \
  520. CFG(CFG_NUM_TX_CHAINS_5G) \
  521. CFG(CFG_NUM_RX_CHAINS_2G) \
  522. CFG(CFG_NUM_RX_CHAINS_5G) \
  523. CFG(CFG_TX_NSS_5G) \
  524. CFG(CFG_TX_NSS_2G) \
  525. CFG(CFG_RX_NSS_5G) \
  526. CFG(CFG_RX_NSS_2G) \
  527. CFG(CFG_NUM_TX_CHAINS_11b) \
  528. CFG(CFG_NUM_TX_CHAINS_11g) \
  529. CFG(CFG_NUM_TX_CHAINS_11a) \
  530. CFG(CFG_DISABLE_TX_MRC_2G) \
  531. CFG(CFG_DISABLE_RX_MRC_2G) \
  532. CFG(CFG_DISABLE_TX_MRC_5G) \
  533. CFG(CFG_DISABLE_RX_MRC_5G)
  534. #endif /* __CFG_MLME_NSS_CHAINS */