cfg_mlme_ibss.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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_IBSS_H
  22. #define __CFG_MLME_IBSS_H
  23. /*
  24. * <ini>
  25. * g_IBSS_AUTO_BSSID - Control IBSS Auto BSSID setup
  26. * @Min: 0
  27. * @Max: 1
  28. * @Default: 1
  29. *
  30. * Control IBSS Auto BSSID enable / disable
  31. * Usage: External
  32. *
  33. * </ini>
  34. */
  35. #define CFG_IBSS_AUTO_BSSID CFG_BOOL( \
  36. "gIbssAutoBssid", \
  37. 1, \
  38. "Enable Auto BSSID for IBSS")
  39. /*
  40. * <ini>
  41. * gAdHocChannel5G - Default 5Ghz IBSS channel if channel is not
  42. * provided by supplicant.
  43. * @Min: 36
  44. * @Max: 165
  45. * @Default: 44
  46. *
  47. * This ini is used to set default 5Ghz IBSS channel
  48. * if channel is not provided by supplicant and band is 5Ghz
  49. *
  50. * Related: None
  51. *
  52. * Supported Feature: IBSS
  53. *
  54. * Usage: Internal/External
  55. *
  56. * </ini>
  57. */
  58. #define CFG_IBSS_ADHOC_CHANNEL_5GHZ CFG_INI_UINT( \
  59. "gAdHocChannel5G", \
  60. 36, \
  61. 165, \
  62. 44, \
  63. CFG_VALUE_OR_DEFAULT, \
  64. "Default 5Ghz IBSS channel if not provided by supplicant")
  65. /*
  66. * <ini>
  67. * gAdHocChannel24G - Default 2.4Ghz IBSS channel if channel is not
  68. * provided by supplicant.
  69. * @Min: 1
  70. * @Max: 14
  71. * @Default: 6
  72. *
  73. * This ini is used to set default 2.4Ghz IBSS channel
  74. * if channel is not provided by supplicant and band is 2.4Ghz
  75. *
  76. * Related: None
  77. *
  78. * Supported Feature: IBSS
  79. *
  80. * Usage: Internal/External
  81. *
  82. * </ini>
  83. */
  84. #define CFG_IBSS_ADHOC_CHANNEL_24GHZ CFG_INI_UINT( \
  85. "gAdHocChannel24G", \
  86. 1, \
  87. 14, \
  88. 6, \
  89. CFG_VALUE_OR_DEFAULT, \
  90. "Default 2.4Ghz IBSS channel if not provided by supplicant")
  91. /*
  92. * <ini>
  93. * gCoalesingInIBSS - If IBSS coalesing is enabled.
  94. * @Min: 0
  95. * @Max: 1
  96. * @Default: 0
  97. *
  98. * This ini is used to set IBSS coalesing
  99. *
  100. * Related: None
  101. *
  102. * Supported Feature: IBSS
  103. *
  104. * Usage: Internal/External
  105. *
  106. * </ini>
  107. */
  108. #define CFG_IBSS_COALESING CFG_INI_BOOL( \
  109. "gCoalesingInIBSS", \
  110. 0, \
  111. "IBSS coalesing control param")
  112. /*
  113. * <ini>
  114. * gIbssATIMWinSize - Set IBSS ATIM window size
  115. * @Min: 0
  116. * @Max: 50
  117. * @Default: 0
  118. *
  119. * This ini is used to set IBSS ATIM window size
  120. *
  121. * Related: None
  122. *
  123. * Supported Feature: IBSS
  124. *
  125. * Usage: Internal/External
  126. *
  127. * </ini>
  128. */
  129. #define CFG_IBSS_ATIM_WIN_SIZE CFG_INI_UINT( \
  130. "gIbssATIMWinSize", \
  131. 0, \
  132. 50, \
  133. 0, \
  134. CFG_VALUE_OR_DEFAULT, \
  135. "Set IBSS ATIM window size")
  136. /*
  137. * <ini>
  138. * gIbssIsPowerSaveAllowed - Indicates if IBSS Power Save is
  139. * supported or not
  140. * @Min: 0
  141. * @Max: 1
  142. * @Default: 1
  143. *
  144. * This ini is used to Indicates if IBSS Power Save is
  145. * supported or not. When not allowed,IBSS station has
  146. * to stay awake all the time and should never set PM=1
  147. * in its transmitted frames.
  148. *
  149. * Related: valid only when gIbssATIMWinSize is non-zero
  150. *
  151. * Supported Feature: IBSS
  152. *
  153. * Usage: Internal/External
  154. *
  155. * </ini>
  156. */
  157. #define CFG_IBSS_IS_POWER_SAVE_ALLOWED CFG_INI_BOOL( \
  158. "gIbssIsPowerSaveAllowed", \
  159. 1, \
  160. "IBSS Power Save control")
  161. /*
  162. * <ini>
  163. * gIbssIsPowerCollapseAllowed - Indicates if IBSS Power Collapse
  164. * is allowed
  165. * @Min: 0
  166. * @Max: 1
  167. * @Default: 1
  168. *
  169. * This ini is used to indicates if IBSS Power Collapse
  170. * is allowed
  171. *
  172. * Related: None
  173. *
  174. * Supported Feature: IBSS
  175. *
  176. * Usage: Internal/External
  177. *
  178. * </ini>
  179. */
  180. #define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED CFG_INI_BOOL( \
  181. "gIbssIsPowerCollapseAllowed", \
  182. 1, \
  183. "Indicates if IBSS Power Collapse is allowed")
  184. /*
  185. * <ini>
  186. * gIbssAwakeOnTxRx - Indicates whether IBSS station
  187. * can exit power save mode and enter power active
  188. * state whenever there is a TX/RX activity.
  189. *
  190. * @Min: 0
  191. * @Max: 1
  192. * @Default: 0
  193. *
  194. * This ini is used to ndicates whether IBSS station
  195. * can exit power save mode and enter power active
  196. * state whenever there is a TX/RX activity.
  197. *
  198. * Related: None
  199. *
  200. * Supported Feature: IBSS
  201. *
  202. * Usage: Internal/External
  203. *
  204. * </ini>
  205. */
  206. #define CFG_IBSS_AWAKE_ON_TX_RX CFG_INI_BOOL( \
  207. "gIbssAwakeOnTxRx", \
  208. 0, \
  209. "IBSS sta power save mode on TX/RX activity")
  210. /*
  211. * <ini>
  212. * gIbssInactivityTime - Indicates the data
  213. * inactivity time in number of beacon intervals
  214. * after which IBSS station re-inters power save
  215. *
  216. * @Min: 1
  217. * @Max: 10
  218. * @Default: 1
  219. *
  220. * In IBSS mode if Awake on TX/RX activity is enabled
  221. * Ibss Inactivity parameter indicates the data
  222. * inactivity time in number of beacon intervals
  223. * after which IBSS station re-inters power save
  224. * by sending Null frame with PM=1
  225. *
  226. * Related: Aplicable if gIbssAwakeOnTxRx is enabled
  227. *
  228. * Supported Feature: IBSS
  229. *
  230. * Usage: Internal/External
  231. *
  232. * </ini>
  233. */
  234. #define CFG_IBSS_INACTIVITY_TIME CFG_INI_UINT( \
  235. "gIbssInactivityTime", \
  236. 1, \
  237. 10, \
  238. 1, \
  239. CFG_VALUE_OR_DEFAULT, \
  240. "No of Beacons intervals of data inactivity for power save")
  241. /*
  242. * <ini>
  243. * gIbssTxSpEndInactivityTime - Indicates the time after
  244. * which TX Service Period is terminated by
  245. * sending a Qos Null frame with EOSP.
  246. *
  247. * @Min: 0
  248. * @Max: 100
  249. * @Default: 0
  250. *
  251. * In IBSS mode Tx Service Period Inactivity
  252. * time in msecs indicates the time after
  253. * which TX Service Period is terminated by
  254. * sending a Qos Null frame with EOSP.
  255. * If value is 0, TX SP is terminated with the
  256. * last buffered packet itself instead of waiting
  257. * for the inactivity.
  258. *
  259. * Related: None
  260. *
  261. * Supported Feature: IBSS
  262. *
  263. * Usage: Internal/External
  264. *
  265. * </ini>
  266. */
  267. #define CFG_IBSS_TXSP_END_INACTIVITY CFG_INI_UINT( \
  268. "gIbssTxSpEndInactivityTime", \
  269. 0, \
  270. 100, \
  271. 0, \
  272. CFG_VALUE_OR_DEFAULT, \
  273. "TX service period inactivity timeout")
  274. /*
  275. * <ini>
  276. * gIbssPsWarmupTime - PS-supporting device
  277. * does not enter protocol sleep state during first
  278. * gIbssPsWarmupTime seconds.
  279. *
  280. * @Min: 0
  281. * @Max: 65535
  282. * @Default: 0
  283. *
  284. * When IBSS network is initialized, PS-supporting device
  285. * does not enter protocol sleep state during first
  286. * gIbssPsWarmupTime seconds.
  287. *
  288. * Related: valid if gIbssIsPowerSaveAllowed is set
  289. *
  290. * Supported Feature: IBSS
  291. *
  292. * Usage: Internal/External
  293. *
  294. * </ini>
  295. */
  296. #define CFG_IBSS_PS_WARMUP_TIME CFG_INI_UINT( \
  297. "gIbssPsWarmupTime", \
  298. 0, \
  299. 65535, \
  300. 0, \
  301. CFG_VALUE_OR_DEFAULT, \
  302. "IBSS Power save skip time")
  303. /*
  304. * <ini>
  305. * gIbssPs1RxChainInAtim - IBSS Power Save Enable/Disable 1 RX
  306. * chain usage during the ATIM window
  307. *
  308. * @Min: 0
  309. * @Max: 1
  310. * @Default: 0
  311. *
  312. * IBSS Power Save Enable/Disable 1 RX
  313. * chain usage during the ATIM window
  314. *
  315. * Related: Depend on gIbssIsPowerSaveAllowed
  316. *
  317. * Supported Feature: IBSS
  318. *
  319. * Usage: Internal/External
  320. *
  321. * </ini>
  322. */
  323. #define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW CFG_INI_BOOL( \
  324. "gIbssPs1RxChainInAtim", \
  325. 0, \
  326. "Control IBSS Power save in 1RX chain during ATIM")
  327. /*
  328. * <ini>
  329. * gIbssBssid - Default IBSS BSSID if BSSID is not provided by supplicant
  330. * @Min: "000000000000"
  331. * @Max: "ffffffffffff"
  332. * @Default: "000AF5040506"
  333. *
  334. * This ini is used to set Default IBSS BSSID if BSSID
  335. * is not provided by supplicant and Coalesing is disabled
  336. *
  337. * Related: Only applicable if gCoalesingInIBSS is 0
  338. *
  339. * Supported Feature: IBSS
  340. *
  341. * Usage: Internal/External
  342. *
  343. * </ini>
  344. */
  345. #define IBSS_BSSID_DEFAULT { .bytes = { 0x00, 0x0a, 0xf5, 0x04, 0x05, 0x06 } }
  346. #define CFG_IBSS_BSSID CFG_INI_MAC("gIbssBssid", \
  347. IBSS_BSSID_DEFAULT, \
  348. "IBSS BSSID if not provided by supplicant")
  349. #define CFG_IBSS_ALL \
  350. CFG(CFG_IBSS_ADHOC_CHANNEL_5GHZ) \
  351. CFG(CFG_IBSS_ADHOC_CHANNEL_24GHZ) \
  352. CFG(CFG_IBSS_ATIM_WIN_SIZE) \
  353. CFG(CFG_IBSS_AUTO_BSSID) \
  354. CFG(CFG_IBSS_AWAKE_ON_TX_RX) \
  355. CFG(CFG_IBSS_BSSID) \
  356. CFG(CFG_IBSS_COALESING) \
  357. CFG(CFG_IBSS_INACTIVITY_TIME) \
  358. CFG(CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED) \
  359. CFG(CFG_IBSS_IS_POWER_SAVE_ALLOWED) \
  360. CFG(CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW) \
  361. CFG(CFG_IBSS_PS_WARMUP_TIME) \
  362. CFG(CFG_IBSS_TXSP_END_INACTIVITY)
  363. #endif