wlan_tgt_def_config.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. /*
  2. * Copyright (c) 2011, 2014-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. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. #ifndef __WLAN_TGT_DEF_CONFIG_H__
  27. #define __WLAN_TGT_DEF_CONFIG_H__
  28. /*
  29. * set of default target config , that can be over written by platform
  30. */
  31. /*
  32. * default limit of 8 VAPs per device.
  33. */
  34. /* Rome PRD support 4 vdevs */
  35. #define CFG_TGT_NUM_VDEV 4
  36. /*
  37. * We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize hash collisions.
  38. * TODO: This scaling factor would be taken care inside the WAL in the future.
  39. */
  40. #define CFG_TGT_NUM_PEER_AST 2
  41. /* # of WDS entries to support.
  42. */
  43. #define CFG_TGT_WDS_ENTRIES 0
  44. /* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B
  45. */
  46. #define CFG_TGT_DEFAULT_DMA_BURST_SIZE 0
  47. /* Fixed delimiters to be inserted after every MPDU
  48. */
  49. #define CFG_TGT_DEFAULT_MAC_AGGR_DELIM 0
  50. /*
  51. * This value may need to be fine tuned, but a constant value will
  52. * probably always be appropriate; it is probably not necessary to
  53. * determine this value dynamically.
  54. */
  55. #define CFG_TGT_AST_SKID_LIMIT 16
  56. /*
  57. * total number of peers per device.
  58. */
  59. #define CFG_TGT_NUM_PEERS 14
  60. /*
  61. * In offload mode target supports features like WOW, chatter and other
  62. * protocol offloads. In order to support them some functionalities like
  63. * reorder buffering, PN checking need to be done in target. This determines
  64. * maximum number of peers suported by target in offload mode
  65. */
  66. /*
  67. * The current firmware implementation requires the number of offload peers
  68. * should be (number of vdevs + 1).
  69. * The reason for this is the firmware clubbed the self peer and offload peer
  70. * in the same pool. So if the firmware wanted to support n vdevs then the
  71. * number of offload peer must be n+1 of which n buffers will be used for
  72. * self peer and the remaining 1 is used for offload peer to support chatter
  73. * mode for single STA.
  74. * Technically the macro should be 1 however the current firmware requires n+1.
  75. * TODO: This MACRO need to be modified in the future, if the firmware modified
  76. * to allocate buffers for self peer and offload peer independently.
  77. */
  78. #define CFG_TGT_NUM_OFFLOAD_PEERS (CFG_TGT_NUM_VDEV+1)
  79. /*
  80. * Number of reorder buffers used in offload mode
  81. */
  82. #define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 4
  83. /*
  84. * keys per peer node
  85. */
  86. #define CFG_TGT_NUM_PEER_KEYS 2
  87. /*
  88. * total number of data TX and RX TIDs
  89. */
  90. #define CFG_TGT_NUM_TIDS (2 * (CFG_TGT_NUM_PEERS + CFG_TGT_NUM_VDEV + 2))
  91. /*
  92. * set this to 0x7 (Peregrine = 3 chains).
  93. * need to be set dynamically based on the HW capability.
  94. */
  95. #define CFG_TGT_DEFAULT_TX_CHAIN_MASK 0x7
  96. /*
  97. * set this to 0x7 (Peregrine = 3 chains).
  98. * need to be set dynamically based on the HW capability.
  99. */
  100. #define CFG_TGT_DEFAULT_RX_CHAIN_MASK 0x7
  101. /* 100 ms for video, best-effort, and background */
  102. #define CFG_TGT_RX_TIMEOUT_LO_PRI 100
  103. /* 40 ms for voice*/
  104. #define CFG_TGT_RX_TIMEOUT_HI_PRI 40
  105. /* AR9888 unified is default in ethernet mode */
  106. #define CFG_TGT_RX_DECAP_MODE (0x2)
  107. /* Decap to native Wifi header */
  108. #define CFG_TGT_RX_DECAP_MODE_NWIFI (0x1)
  109. /* Decap to raw mode header */
  110. #define CFG_TGT_RX_DECAP_MODE_RAW (0x0)
  111. /* maximum number of pending scan requests */
  112. #define CFG_TGT_DEFAULT_SCAN_MAX_REQS 0x4
  113. /* maximum number of VDEV that could use BMISS offload */
  114. #define CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 0x3
  115. /* maximum number of VDEV offload Roaming to support */
  116. #ifndef CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV
  117. #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 0x3
  118. #endif
  119. /* maximum number of STA VDEVs */
  120. #ifndef CFG_TGT_DEFAULT_MAX_STA_VDEVS
  121. #define CFG_TGT_DEFAULT_MAX_STA_VDEVS 0
  122. #endif
  123. /* maximum number of AP profiles pushed to offload Roaming */
  124. #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_PROFILES 0x8
  125. /* maximum number of VDEV offload GTK to support */
  126. #ifndef CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV
  127. #define CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 0x3
  128. #endif
  129. /* default: mcast->ucast disabled if ATH_SUPPORT_MCAST2UCAST not defined */
  130. #ifndef ATH_SUPPORT_MCAST2UCAST
  131. #define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 0
  132. #define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 0
  133. #define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 0 /* disabled */
  134. #else
  135. /* (for testing) small multicast group membership table enabled */
  136. #define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 4
  137. #define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 16
  138. #define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 2
  139. #endif
  140. #define CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES 32
  141. /*
  142. * Specify how much memory the target should allocate for a debug log of
  143. * tx PPDU meta-information (how large the PPDU was, when it was sent,
  144. * whether it was successful, etc.)
  145. * The size of the log records is configurable, from a minimum of 28 bytes
  146. * to a maximum of about 300 bytes. A typical configuration would result
  147. * in each log record being about 124 bytes.
  148. * Thus, 1KB of log space can hold about 30 small records, 3 large records,
  149. * or about 8 typical-sized records.
  150. */
  151. #define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */
  152. /* target based fragment timeout and MPDU duplicate detection */
  153. #define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
  154. /* Default VoW configuration
  155. */
  156. #define CFG_TGT_DEFAULT_VOW_CONFIG 0
  157. /*
  158. * total number of descriptors to use in the target
  159. */
  160. #define CFG_TGT_NUM_MSDU_DESC (1024 + 32)
  161. /*
  162. * Maximum number of frag table entries
  163. */
  164. #define CFG_TGT_MAX_FRAG_TABLE_ENTRIES 10
  165. /*
  166. * Maximum number of VDEV that beacon tx offload will support
  167. */
  168. #define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 3
  169. /*
  170. * number of vdevs that can support tdls
  171. */
  172. #define CFG_TGT_NUM_TDLS_VDEVS 1
  173. /*
  174. * number of peers that each Tdls vdev can track
  175. */
  176. #ifndef CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES
  177. #define CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 8
  178. #endif
  179. /*
  180. * number of TDLS concurrent sleep STAs
  181. */
  182. #define CFG_TGT_NUM_TDLS_CONC_SLEEP_STAS 1
  183. /*
  184. * number of TDLS concurrent buffer STAs
  185. */
  186. #define CFG_TGT_NUM_TDLS_CONC_BUFFER_STAS 1
  187. /*
  188. * ht enable highest MCS by default
  189. */
  190. #define CFG_TGT_DEFAULT_GTX_HT_MASK 0x8080
  191. /*
  192. * vht enable highest MCS by default
  193. */
  194. #define CFG_TGT_DEFAULT_GTX_VHT_MASK 0x80200
  195. /*
  196. * threshold to enable GTX
  197. */
  198. #define CFG_TGT_DEFAULT_GTX_PER_THRESHOLD 3
  199. /*
  200. * margin to move back when per > margin + threshold
  201. */
  202. #define CFG_TGT_DEFAULT_GTX_PER_MARGIN 2
  203. /*
  204. * step for every move
  205. */
  206. #define CFG_TGT_DEFAULT_GTX_TPC_STEP 1
  207. /*
  208. * lowest TPC
  209. */
  210. #define CFG_TGT_DEFAULT_GTX_TPC_MIN 0
  211. /*
  212. * enable all BW 20/40/80/160
  213. */
  214. #define CFG_TGT_DEFAULT_GTX_BW_MASK 0xf
  215. /*
  216. * number of vdevs that can support OCB
  217. */
  218. #define CFG_TGT_NUM_OCB_VDEVS 1
  219. /*
  220. * maximum number of channels that can do OCB
  221. */
  222. #define CFG_TGT_NUM_OCB_CHANNELS 2
  223. /*
  224. * maximum number of channels in an OCB schedule
  225. */
  226. #define CFG_TGT_NUM_OCB_SCHEDULES 2
  227. #endif /*__WLAN_TGT_DEF_CONFIG_H__ */