wlan_tgt_def_config_hl.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /*
  2. * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. #ifndef __WLAN_TGT_DEF_CONFIG_H__
  22. #define __WLAN_TGT_DEF_CONFIG_H__
  23. /*
  24. * TODO: please help to consider if we need a seperate config file from LL case.
  25. */
  26. /*
  27. * set of default target config , that can be over written by platform
  28. */
  29. #ifdef QCA_SUPPORT_INTEGRATED_SOC
  30. #define CFG_TGT_NUM_VDEV 3 /*STA, P2P device, P2P GO/Cli*/
  31. #else
  32. /*
  33. * default limit of VAPs per device.
  34. */
  35. #define CFG_TGT_NUM_VDEV 3
  36. #endif
  37. /*
  38. * We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize
  39. * hash collisions.
  40. * TODO: This scaling factor would be taken care inside the WAL in the future.
  41. */
  42. #define CFG_TGT_NUM_PEER_AST 2
  43. /* # of WDS entries to support.
  44. */
  45. #define CFG_TGT_WDS_ENTRIES 0
  46. /* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B
  47. */
  48. #define CFG_TGT_DEFAULT_DMA_BURST_SIZE 0
  49. /* Fixed delimiters to be inserted after every MPDU
  50. */
  51. #define CFG_TGT_DEFAULT_MAC_AGGR_DELIM 0
  52. /*
  53. * This value may need to be fine tuned, but a constant value will
  54. * probably always be appropriate; it is probably not necessary to
  55. * determine this value dynamically.
  56. */
  57. #define CFG_TGT_AST_SKID_LIMIT 6
  58. /*
  59. * total number of peers per device.
  60. * currently set to 8 to bring up IP3.9 for memory size problem
  61. */
  62. #define CFG_TGT_NUM_PEERS 8
  63. /*
  64. * max number of peers per device.
  65. */
  66. #define CFG_TGT_NUM_PEERS_MAX 8
  67. /*
  68. * In offload mode target supports features like WOW, chatter and other
  69. * protocol offloads. In order to support them some functionalities like
  70. * reorder buffering, PN checking need to be done in target. This determines
  71. * maximum number of peers suported by target in offload mode
  72. */
  73. #define CFG_TGT_NUM_OFFLOAD_PEERS 0
  74. /*
  75. * Number of reorder buffers used in offload mode
  76. */
  77. #define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 0
  78. /*
  79. * keys per peer node
  80. */
  81. #define CFG_TGT_NUM_PEER_KEYS 2
  82. /*
  83. * total number of TX/RX data TIDs
  84. */
  85. #define CFG_TGT_NUM_TIDS (2 * (CFG_TGT_NUM_PEERS + \
  86. CFG_TGT_NUM_VDEV))
  87. /*
  88. * max number of Tx TIDS
  89. */
  90. #define CFG_TGT_NUM_TIDS_MAX (2 * (CFG_TGT_NUM_PEERS_MAX + \
  91. CFG_TGT_NUM_VDEV))
  92. /*
  93. * number of multicast keys.
  94. */
  95. #define CFG_TGT_NUM_MCAST_KEYS 8
  96. /*
  97. * A value of 3 would probably suffice - one for the control stack, one for
  98. * the data stack, and one for debugging.
  99. * This value may need to be fine tuned, but a constant value will
  100. * probably always be appropriate; it is probably not necessary to
  101. * determine this value dynamically.
  102. */
  103. #define CFG_TGT_NUM_PDEV_HANDLERS 8
  104. /*
  105. * A value of 3 would probably suffice - one for the control stack, one for
  106. * the data stack, and one for debugging.
  107. * This value may need to be fine tuned, but a constant value will
  108. * probably always be appropriate; it is probably not necessary to
  109. * determine this value dynamically.
  110. */
  111. #define CFG_TGT_NUM_VDEV_HANDLERS 4
  112. /*
  113. * set this to 8:
  114. * one for WAL interals (connection pause)
  115. * one for the control stack,
  116. * one for the data stack
  117. * and one for debugging
  118. * This value may need to be fine tuned, but a constant value will
  119. * probably always be appropriate; it is probably not necessary to
  120. * determine this value dynamically.
  121. */
  122. #define CFG_TGT_NUM_HANDLERS 14
  123. /*
  124. * set this to 3: one for the control stack, one for
  125. * the data stack, and one for debugging.
  126. * This value may need to be fine tuned, but a constant value will
  127. * probably always be appropriate; it is probably not necessary to
  128. * determine this value dynamically.
  129. */
  130. #define CFG_TGT_NUM_PEER_HANDLERS 32
  131. /*
  132. * set this to 0x7 (Peregrine = 3 chains).
  133. * need to be set dynamically based on the HW capability.
  134. * this is rome
  135. */
  136. #define CFG_TGT_DEFAULT_TX_CHAIN_MASK 0x3
  137. /*
  138. * set this to 0x7 (Peregrine = 3 chains).
  139. * need to be set dynamically based on the HW capability.
  140. * this is rome
  141. */
  142. #define CFG_TGT_DEFAULT_RX_CHAIN_MASK 0x3
  143. /* 100 ms for video, best-effort, and background */
  144. #define CFG_TGT_RX_TIMEOUT_LO_PRI 100
  145. /* 40 ms for voice*/
  146. #define CFG_TGT_RX_TIMEOUT_HI_PRI 40
  147. /* AR9888 unified is default in ethernet mode */
  148. #define CFG_TGT_RX_DECAP_MODE (0x2)
  149. /* Decap to native Wifi header */
  150. #define CFG_TGT_RX_DECAP_MODE_NWIFI (0x1)
  151. /* Decap to raw mode header */
  152. #define CFG_TGT_RX_DECAP_MODE_RAW (0x0)
  153. /* maximum number of pending scan requests */
  154. #define CFG_TGT_DEFAULT_SCAN_MAX_REQS 0x4
  155. /* maximum number of scan event handlers */
  156. #define CFG_TGT_DEFAULT_SCAN_MAX_HANDLERS 0x4
  157. /* maximum number of VDEV that could use BMISS offload */
  158. #define CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 0x2
  159. /* maximum number of VDEV offload Roaming to support */
  160. #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 0x2
  161. /* maximum number of AP profiles pushed to offload Roaming */
  162. #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_PROFILES 0x8
  163. /* maximum number of VDEV offload GTK to support */
  164. #define CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 0x2
  165. /* default: mcast->ucast disabled */
  166. #define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 0
  167. #define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 0
  168. #define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 0 /* disabled */
  169. /*
  170. * Specify how much memory the target should allocate for a debug log of
  171. * tx PPDU meta-information (how large the PPDU was, when it was sent,
  172. * whether it was successful, etc.)
  173. * The size of the log records is configurable, from a minimum of 28 bytes
  174. * to a maximum of about 300 bytes. A typical configuration would result
  175. * in each log record being about 124 bytes.
  176. * Thus, 1KB of log space can hold about 30 small records, 3 large records,
  177. * or about 8 typical-sized records.
  178. */
  179. #define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */
  180. /* target based fragment timeout and MPDU duplicate detection */
  181. #define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
  182. /* Default VoW configuration
  183. */
  184. #define CFG_TGT_DEFAULT_VOW_CONFIG 0
  185. /*
  186. * total number of descriptors to use in the target
  187. */
  188. #ifndef HIF_SDIO
  189. #define CFG_TGT_NUM_MSDU_DESC (32)
  190. #else
  191. #define CFG_TGT_NUM_MSDU_DESC (0)
  192. #endif
  193. /*
  194. * Maximum number of frag table entries
  195. */
  196. #define CFG_TGT_MAX_FRAG_TABLE_ENTRIES 2
  197. /*
  198. * number of vdevs that can support tdls
  199. */
  200. #define CFG_TGT_NUM_TDLS_VDEVS 1
  201. /*
  202. * number of peers that each Tdls vdev can track
  203. */
  204. #define CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 32
  205. /*
  206. * number of TDLS concurrent sleep STAs
  207. */
  208. #define CFG_TGT_NUM_TDLS_CONC_SLEEP_STAS 1
  209. /*
  210. * number of TDLS concurrent buffer STAs
  211. */
  212. #define CFG_TGT_NUM_TDLS_CONC_BUFFER_STAS 1
  213. #define CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES 5
  214. /*
  215. * Maximum number of VDEV that beacon tx offload will support
  216. */
  217. #ifdef HIF_SDIO
  218. #define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 2
  219. #else
  220. #define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 1
  221. #endif
  222. /*
  223. * ht enable highest MCS by default
  224. */
  225. #define CFG_TGT_DEFAULT_GTX_HT_MASK 0x8080
  226. /*
  227. * vht enable highest MCS by default
  228. */
  229. #define CFG_TGT_DEFAULT_GTX_VHT_MASK 0x80200
  230. /*
  231. * resv for furture use, bit 30 is used for fix tpc, bit0-3 for Power save
  232. * balance
  233. */
  234. #define CFG_TGT_DEFAULT_GTX_USR_CFG 0xa
  235. /*
  236. * threshold to enable GTX
  237. */
  238. #define CFG_TGT_DEFAULT_GTX_PER_THRESHOLD 3
  239. /*
  240. * margin to move back when per > margin + threshold
  241. */
  242. #define CFG_TGT_DEFAULT_GTX_PER_MARGIN 2
  243. /*
  244. * step for every move
  245. */
  246. #define CFG_TGT_DEFAULT_GTX_TPC_STEP 1
  247. /*
  248. * lowest TPC
  249. */
  250. #define CFG_TGT_DEFAULT_GTX_TPC_MIN 0
  251. /*
  252. * enable all BW 20/40/80/160
  253. */
  254. #define CFG_TGT_DEFAULT_GTX_BW_MASK 0xf
  255. /*
  256. * number of vdevs that can support OCB
  257. */
  258. #define CFG_TGT_NUM_OCB_VDEVS 1
  259. /*
  260. * maximum number of channels that can do OCB
  261. */
  262. #define CFG_TGT_NUM_OCB_CHANNELS 2
  263. /*
  264. * maximum number of channels in an OCB schedule
  265. */
  266. #define CFG_TGT_NUM_OCB_SCHEDULES 2
  267. #endif /*__WLAN_TGT_DEF_CONFIG_H__ */