conf.h 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  1. /*
  2. * This file is part of wl1271
  3. *
  4. * Copyright (C) 2009 Nokia Corporation
  5. *
  6. * Contact: Luciano Coelho <luciano.coelho@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. *
  22. */
  23. #ifndef __CONF_H__
  24. #define __CONF_H__
  25. enum {
  26. CONF_HW_BIT_RATE_1MBPS = BIT(0),
  27. CONF_HW_BIT_RATE_2MBPS = BIT(1),
  28. CONF_HW_BIT_RATE_5_5MBPS = BIT(2),
  29. CONF_HW_BIT_RATE_6MBPS = BIT(3),
  30. CONF_HW_BIT_RATE_9MBPS = BIT(4),
  31. CONF_HW_BIT_RATE_11MBPS = BIT(5),
  32. CONF_HW_BIT_RATE_12MBPS = BIT(6),
  33. CONF_HW_BIT_RATE_18MBPS = BIT(7),
  34. CONF_HW_BIT_RATE_22MBPS = BIT(8),
  35. CONF_HW_BIT_RATE_24MBPS = BIT(9),
  36. CONF_HW_BIT_RATE_36MBPS = BIT(10),
  37. CONF_HW_BIT_RATE_48MBPS = BIT(11),
  38. CONF_HW_BIT_RATE_54MBPS = BIT(12),
  39. CONF_HW_BIT_RATE_MCS_0 = BIT(13),
  40. CONF_HW_BIT_RATE_MCS_1 = BIT(14),
  41. CONF_HW_BIT_RATE_MCS_2 = BIT(15),
  42. CONF_HW_BIT_RATE_MCS_3 = BIT(16),
  43. CONF_HW_BIT_RATE_MCS_4 = BIT(17),
  44. CONF_HW_BIT_RATE_MCS_5 = BIT(18),
  45. CONF_HW_BIT_RATE_MCS_6 = BIT(19),
  46. CONF_HW_BIT_RATE_MCS_7 = BIT(20),
  47. CONF_HW_BIT_RATE_MCS_8 = BIT(21),
  48. CONF_HW_BIT_RATE_MCS_9 = BIT(22),
  49. CONF_HW_BIT_RATE_MCS_10 = BIT(23),
  50. CONF_HW_BIT_RATE_MCS_11 = BIT(24),
  51. CONF_HW_BIT_RATE_MCS_12 = BIT(25),
  52. CONF_HW_BIT_RATE_MCS_13 = BIT(26),
  53. CONF_HW_BIT_RATE_MCS_14 = BIT(27),
  54. CONF_HW_BIT_RATE_MCS_15 = BIT(28),
  55. };
  56. enum {
  57. CONF_HW_RATE_INDEX_1MBPS = 0,
  58. CONF_HW_RATE_INDEX_2MBPS = 1,
  59. CONF_HW_RATE_INDEX_5_5MBPS = 2,
  60. CONF_HW_RATE_INDEX_11MBPS = 3,
  61. CONF_HW_RATE_INDEX_6MBPS = 4,
  62. CONF_HW_RATE_INDEX_9MBPS = 5,
  63. CONF_HW_RATE_INDEX_12MBPS = 6,
  64. CONF_HW_RATE_INDEX_18MBPS = 7,
  65. CONF_HW_RATE_INDEX_24MBPS = 8,
  66. CONF_HW_RATE_INDEX_36MBPS = 9,
  67. CONF_HW_RATE_INDEX_48MBPS = 10,
  68. CONF_HW_RATE_INDEX_54MBPS = 11,
  69. CONF_HW_RATE_INDEX_MCS0 = 12,
  70. CONF_HW_RATE_INDEX_MCS1 = 13,
  71. CONF_HW_RATE_INDEX_MCS2 = 14,
  72. CONF_HW_RATE_INDEX_MCS3 = 15,
  73. CONF_HW_RATE_INDEX_MCS4 = 16,
  74. CONF_HW_RATE_INDEX_MCS5 = 17,
  75. CONF_HW_RATE_INDEX_MCS6 = 18,
  76. CONF_HW_RATE_INDEX_MCS7 = 19,
  77. CONF_HW_RATE_INDEX_MCS7_SGI = 20,
  78. CONF_HW_RATE_INDEX_MCS0_40MHZ = 21,
  79. CONF_HW_RATE_INDEX_MCS1_40MHZ = 22,
  80. CONF_HW_RATE_INDEX_MCS2_40MHZ = 23,
  81. CONF_HW_RATE_INDEX_MCS3_40MHZ = 24,
  82. CONF_HW_RATE_INDEX_MCS4_40MHZ = 25,
  83. CONF_HW_RATE_INDEX_MCS5_40MHZ = 26,
  84. CONF_HW_RATE_INDEX_MCS6_40MHZ = 27,
  85. CONF_HW_RATE_INDEX_MCS7_40MHZ = 28,
  86. CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI = 29,
  87. /* MCS8+ rates overlap with 40Mhz rates */
  88. CONF_HW_RATE_INDEX_MCS8 = 21,
  89. CONF_HW_RATE_INDEX_MCS9 = 22,
  90. CONF_HW_RATE_INDEX_MCS10 = 23,
  91. CONF_HW_RATE_INDEX_MCS11 = 24,
  92. CONF_HW_RATE_INDEX_MCS12 = 25,
  93. CONF_HW_RATE_INDEX_MCS13 = 26,
  94. CONF_HW_RATE_INDEX_MCS14 = 27,
  95. CONF_HW_RATE_INDEX_MCS15 = 28,
  96. CONF_HW_RATE_INDEX_MCS15_SGI = 29,
  97. CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI,
  98. };
  99. #define CONF_HW_RXTX_RATE_UNSUPPORTED 0xff
  100. enum {
  101. CONF_SG_DISABLE = 0,
  102. CONF_SG_PROTECTIVE,
  103. CONF_SG_OPPORTUNISTIC
  104. };
  105. enum {
  106. /*
  107. * Configure the min and max time BT gains the antenna
  108. * in WLAN / BT master basic rate
  109. *
  110. * Range: 0 - 255 (ms)
  111. */
  112. CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
  113. CONF_SG_ACL_BT_MASTER_MAX_BR,
  114. /*
  115. * Configure the min and max time BT gains the antenna
  116. * in WLAN / BT slave basic rate
  117. *
  118. * Range: 0 - 255 (ms)
  119. */
  120. CONF_SG_ACL_BT_SLAVE_MIN_BR,
  121. CONF_SG_ACL_BT_SLAVE_MAX_BR,
  122. /*
  123. * Configure the min and max time BT gains the antenna
  124. * in WLAN / BT master EDR
  125. *
  126. * Range: 0 - 255 (ms)
  127. */
  128. CONF_SG_ACL_BT_MASTER_MIN_EDR,
  129. CONF_SG_ACL_BT_MASTER_MAX_EDR,
  130. /*
  131. * Configure the min and max time BT gains the antenna
  132. * in WLAN / BT slave EDR
  133. *
  134. * Range: 0 - 255 (ms)
  135. */
  136. CONF_SG_ACL_BT_SLAVE_MIN_EDR,
  137. CONF_SG_ACL_BT_SLAVE_MAX_EDR,
  138. /*
  139. * The maximum time WLAN can gain the antenna
  140. * in WLAN PSM / BT master/slave BR
  141. *
  142. * Range: 0 - 255 (ms)
  143. */
  144. CONF_SG_ACL_WLAN_PS_MASTER_BR,
  145. CONF_SG_ACL_WLAN_PS_SLAVE_BR,
  146. /*
  147. * The maximum time WLAN can gain the antenna
  148. * in WLAN PSM / BT master/slave EDR
  149. *
  150. * Range: 0 - 255 (ms)
  151. */
  152. CONF_SG_ACL_WLAN_PS_MASTER_EDR,
  153. CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
  154. /* TODO: explain these values */
  155. CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
  156. CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
  157. CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
  158. CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
  159. CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
  160. CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
  161. CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
  162. CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
  163. CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
  164. CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
  165. CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
  166. CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
  167. CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
  168. CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
  169. /*
  170. * Compensation percentage of probe requests when scan initiated
  171. * during BT voice/ACL link.
  172. *
  173. * Range: 0 - 255 (%)
  174. */
  175. CONF_SG_AUTO_SCAN_PROBE_REQ,
  176. /*
  177. * Compensation percentage of probe requests when active scan initiated
  178. * during BT voice
  179. *
  180. * Range: 0 - 255 (%)
  181. */
  182. CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
  183. /*
  184. * Compensation percentage of WLAN active scan window if initiated
  185. * during BT A2DP
  186. *
  187. * Range: 0 - 1000 (%)
  188. */
  189. CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
  190. /*
  191. * Compensation percentage of WLAN passive scan window if initiated
  192. * during BT A2DP BR
  193. *
  194. * Range: 0 - 1000 (%)
  195. */
  196. CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR,
  197. /*
  198. * Compensation percentage of WLAN passive scan window if initiated
  199. * during BT A2DP EDR
  200. *
  201. * Range: 0 - 1000 (%)
  202. */
  203. CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR,
  204. /*
  205. * Compensation percentage of WLAN passive scan window if initiated
  206. * during BT voice
  207. *
  208. * Range: 0 - 1000 (%)
  209. */
  210. CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
  211. /* TODO: explain these values */
  212. CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
  213. CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN,
  214. CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN,
  215. /*
  216. * Defines whether the SG will force WLAN host to enter/exit PSM
  217. *
  218. * Range: 1 - SG can force, 0 - host handles PSM
  219. */
  220. CONF_SG_STA_FORCE_PS_IN_BT_SCO,
  221. /*
  222. * Defines antenna configuration (single/dual antenna)
  223. *
  224. * Range: 0 - single antenna, 1 - dual antenna
  225. */
  226. CONF_SG_ANTENNA_CONFIGURATION,
  227. /*
  228. * The threshold (percent) of max consecutive beacon misses before
  229. * increasing priority of beacon reception.
  230. *
  231. * Range: 0 - 100 (%)
  232. */
  233. CONF_SG_BEACON_MISS_PERCENT,
  234. /*
  235. * Protection time of the DHCP procedure.
  236. *
  237. * Range: 0 - 100000 (ms)
  238. */
  239. CONF_SG_DHCP_TIME,
  240. /*
  241. * RX guard time before the beginning of a new BT voice frame during
  242. * which no new WLAN trigger frame is transmitted.
  243. *
  244. * Range: 0 - 100000 (us)
  245. */
  246. CONF_SG_RXT,
  247. /*
  248. * TX guard time before the beginning of a new BT voice frame during
  249. * which no new WLAN frame is transmitted.
  250. *
  251. * Range: 0 - 100000 (us)
  252. */
  253. CONF_SG_TXT,
  254. /*
  255. * Enable adaptive RXT/TXT algorithm. If disabled, the host values
  256. * will be utilized.
  257. *
  258. * Range: 0 - disable, 1 - enable
  259. */
  260. CONF_SG_ADAPTIVE_RXT_TXT,
  261. /* TODO: explain this value */
  262. CONF_SG_GENERAL_USAGE_BIT_MAP,
  263. /*
  264. * Number of consecutive BT voice frames not interrupted by WLAN
  265. *
  266. * Range: 0 - 100
  267. */
  268. CONF_SG_HV3_MAX_SERVED,
  269. /*
  270. * The used WLAN legacy service period during active BT ACL link
  271. *
  272. * Range: 0 - 255 (ms)
  273. */
  274. CONF_SG_PS_POLL_TIMEOUT,
  275. /*
  276. * The used WLAN UPSD service period during active BT ACL link
  277. *
  278. * Range: 0 - 255 (ms)
  279. */
  280. CONF_SG_UPSD_TIMEOUT,
  281. CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
  282. CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
  283. CONF_SG_STA_CONNECTION_PROTECTION_TIME,
  284. /* AP params */
  285. CONF_AP_BEACON_MISS_TX,
  286. CONF_AP_RX_WINDOW_AFTER_BEACON,
  287. CONF_AP_BEACON_WINDOW_INTERVAL,
  288. CONF_AP_CONNECTION_PROTECTION_TIME,
  289. CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
  290. CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
  291. /* CTS Diluting params */
  292. CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH,
  293. CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER,
  294. CONF_SG_TEMP_PARAM_1,
  295. CONF_SG_TEMP_PARAM_2,
  296. CONF_SG_TEMP_PARAM_3,
  297. CONF_SG_TEMP_PARAM_4,
  298. CONF_SG_TEMP_PARAM_5,
  299. CONF_SG_TEMP_PARAM_6,
  300. CONF_SG_TEMP_PARAM_7,
  301. CONF_SG_TEMP_PARAM_8,
  302. CONF_SG_TEMP_PARAM_9,
  303. CONF_SG_TEMP_PARAM_10,
  304. CONF_SG_PARAMS_MAX,
  305. CONF_SG_PARAMS_ALL = 0xff
  306. };
  307. struct conf_sg_settings {
  308. u32 params[CONF_SG_PARAMS_MAX];
  309. u8 state;
  310. } __packed;
  311. enum conf_rx_queue_type {
  312. CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
  313. CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
  314. };
  315. struct conf_rx_settings {
  316. /*
  317. * The maximum amount of time, in TU, before the
  318. * firmware discards the MSDU.
  319. *
  320. * Range: 0 - 0xFFFFFFFF
  321. */
  322. u32 rx_msdu_life_time;
  323. /*
  324. * Packet detection threshold in the PHY.
  325. *
  326. * FIXME: details unknown.
  327. */
  328. u32 packet_detection_threshold;
  329. /*
  330. * The longest time the STA will wait to receive traffic from the AP
  331. * after a PS-poll has been transmitted.
  332. *
  333. * Range: 0 - 200000
  334. */
  335. u16 ps_poll_timeout;
  336. /*
  337. * The longest time the STA will wait to receive traffic from the AP
  338. * after a frame has been sent from an UPSD enabled queue.
  339. *
  340. * Range: 0 - 200000
  341. */
  342. u16 upsd_timeout;
  343. /*
  344. * The number of octets in an MPDU, below which an RTS/CTS
  345. * handshake is not performed.
  346. *
  347. * Range: 0 - 4096
  348. */
  349. u16 rts_threshold;
  350. /*
  351. * The RX Clear Channel Assessment threshold in the PHY
  352. * (the energy threshold).
  353. *
  354. * Range: ENABLE_ENERGY_D == 0x140A
  355. * DISABLE_ENERGY_D == 0xFFEF
  356. */
  357. u16 rx_cca_threshold;
  358. /*
  359. * Occupied Rx mem-blocks number which requires interrupting the host
  360. * (0 = no buffering, 0xffff = disabled).
  361. *
  362. * Range: u16
  363. */
  364. u16 irq_blk_threshold;
  365. /*
  366. * Rx packets number which requires interrupting the host
  367. * (0 = no buffering).
  368. *
  369. * Range: u16
  370. */
  371. u16 irq_pkt_threshold;
  372. /*
  373. * Max time in msec the FW may delay RX-Complete interrupt.
  374. *
  375. * Range: 1 - 100
  376. */
  377. u16 irq_timeout;
  378. /*
  379. * The RX queue type.
  380. *
  381. * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
  382. */
  383. u8 queue_type;
  384. } __packed;
  385. #define CONF_TX_MAX_RATE_CLASSES 10
  386. #define CONF_TX_RATE_MASK_UNSPECIFIED 0
  387. #define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
  388. CONF_HW_BIT_RATE_2MBPS)
  389. #define CONF_TX_RATE_RETRY_LIMIT 10
  390. /* basic rates for p2p operations (probe req/resp, etc.) */
  391. #define CONF_TX_RATE_MASK_BASIC_P2P CONF_HW_BIT_RATE_6MBPS
  392. /*
  393. * Rates supported for data packets when operating as STA/AP. Note the absence
  394. * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
  395. * one. The rate dropped is not mandatory under any operating mode.
  396. */
  397. #define CONF_TX_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
  398. CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
  399. CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
  400. CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
  401. CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
  402. CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
  403. CONF_HW_BIT_RATE_54MBPS)
  404. #define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
  405. CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
  406. CONF_HW_BIT_RATE_11MBPS)
  407. #define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
  408. CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
  409. CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
  410. CONF_HW_BIT_RATE_54MBPS)
  411. #define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
  412. CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
  413. CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
  414. CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
  415. CONF_HW_BIT_RATE_MCS_7)
  416. #define CONF_TX_MIMO_RATES (CONF_HW_BIT_RATE_MCS_8 | \
  417. CONF_HW_BIT_RATE_MCS_9 | CONF_HW_BIT_RATE_MCS_10 | \
  418. CONF_HW_BIT_RATE_MCS_11 | CONF_HW_BIT_RATE_MCS_12 | \
  419. CONF_HW_BIT_RATE_MCS_13 | CONF_HW_BIT_RATE_MCS_14 | \
  420. CONF_HW_BIT_RATE_MCS_15)
  421. /*
  422. * Default rates for management traffic when operating in AP mode. This
  423. * should be configured according to the basic rate set of the AP
  424. */
  425. #define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
  426. CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
  427. /* default rates for working as IBSS (11b and OFDM) */
  428. #define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
  429. CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
  430. CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
  431. struct conf_tx_rate_class {
  432. /*
  433. * The rates enabled for this rate class.
  434. *
  435. * Range: CONF_HW_BIT_RATE_* bit mask
  436. */
  437. u32 enabled_rates;
  438. /*
  439. * The dot11 short retry limit used for TX retries.
  440. *
  441. * Range: u8
  442. */
  443. u8 short_retry_limit;
  444. /*
  445. * The dot11 long retry limit used for TX retries.
  446. *
  447. * Range: u8
  448. */
  449. u8 long_retry_limit;
  450. /*
  451. * Flags controlling the attributes of TX transmission.
  452. *
  453. * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
  454. * when the total valid per-rate attempts have
  455. * been exhausted; otherwise transmissions
  456. * will continue at the lowest available rate
  457. * until the appropriate one of the
  458. * short_retry_limit, long_retry_limit,
  459. * dot11_max_transmit_msdu_life_time, or
  460. * max_tx_life_time, is exhausted.
  461. * 1: Preamble Override - indicates if the preamble type
  462. * should be used in TX.
  463. * 2: Preamble Type - the type of the preamble to be used by
  464. * the policy (0 - long preamble, 1 - short preamble.
  465. */
  466. u8 aflags;
  467. } __packed;
  468. #define CONF_TX_MAX_AC_COUNT 4
  469. /* Slot number setting to start transmission at PIFS interval */
  470. #define CONF_TX_AIFS_PIFS 1
  471. /* Slot number setting to start transmission at DIFS interval normal
  472. * DCF access */
  473. #define CONF_TX_AIFS_DIFS 2
  474. enum conf_tx_ac {
  475. CONF_TX_AC_BE = 0, /* best effort / legacy */
  476. CONF_TX_AC_BK = 1, /* background */
  477. CONF_TX_AC_VI = 2, /* video */
  478. CONF_TX_AC_VO = 3, /* voice */
  479. CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
  480. CONF_TX_AC_ANY_TID = 0xff
  481. };
  482. struct conf_tx_ac_category {
  483. /*
  484. * The AC class identifier.
  485. *
  486. * Range: enum conf_tx_ac
  487. */
  488. u8 ac;
  489. /*
  490. * The contention window minimum size (in slots) for the access
  491. * class.
  492. *
  493. * Range: u8
  494. */
  495. u8 cw_min;
  496. /*
  497. * The contention window maximum size (in slots) for the access
  498. * class.
  499. *
  500. * Range: u8
  501. */
  502. u16 cw_max;
  503. /*
  504. * The AIF value (in slots) for the access class.
  505. *
  506. * Range: u8
  507. */
  508. u8 aifsn;
  509. /*
  510. * The TX Op Limit (in microseconds) for the access class.
  511. *
  512. * Range: u16
  513. */
  514. u16 tx_op_limit;
  515. } __packed;
  516. #define CONF_TX_MAX_TID_COUNT 8
  517. /* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
  518. #define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
  519. enum {
  520. CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
  521. CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
  522. CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
  523. };
  524. enum {
  525. CONF_PS_SCHEME_LEGACY = 0,
  526. CONF_PS_SCHEME_UPSD_TRIGGER = 1,
  527. CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
  528. CONF_PS_SCHEME_SAPSD = 3,
  529. };
  530. enum {
  531. CONF_ACK_POLICY_LEGACY = 0,
  532. CONF_ACK_POLICY_NO_ACK = 1,
  533. CONF_ACK_POLICY_BLOCK = 2,
  534. };
  535. struct conf_tx_tid {
  536. u8 queue_id;
  537. u8 channel_type;
  538. u8 tsid;
  539. u8 ps_scheme;
  540. u8 ack_policy;
  541. u32 apsd_conf[2];
  542. } __packed;
  543. struct conf_tx_settings {
  544. /*
  545. * The TX ED value for TELEC Enable/Disable.
  546. *
  547. * Range: 0, 1
  548. */
  549. u8 tx_energy_detection;
  550. /*
  551. * Configuration for rate classes for TX (currently only one
  552. * rate class supported). Used in non-AP mode.
  553. */
  554. struct conf_tx_rate_class sta_rc_conf;
  555. /*
  556. * Configuration for access categories for TX rate control.
  557. */
  558. u8 ac_conf_count;
  559. struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
  560. /*
  561. * AP-mode - allow this number of TX retries to a station before an
  562. * event is triggered from FW.
  563. * In AP-mode the hlids of unreachable stations are given in the
  564. * "sta_tx_retry_exceeded" member in the event mailbox.
  565. */
  566. u8 max_tx_retries;
  567. /*
  568. * AP-mode - after this number of seconds a connected station is
  569. * considered inactive.
  570. */
  571. u16 ap_aging_period;
  572. /*
  573. * Configuration for TID parameters.
  574. */
  575. u8 tid_conf_count;
  576. struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
  577. /*
  578. * The TX fragmentation threshold.
  579. *
  580. * Range: u16
  581. */
  582. u16 frag_threshold;
  583. /*
  584. * Max time in msec the FW may delay frame TX-Complete interrupt.
  585. *
  586. * Range: u16
  587. */
  588. u16 tx_compl_timeout;
  589. /*
  590. * Completed TX packet count which requires to issue the TX-Complete
  591. * interrupt.
  592. *
  593. * Range: u16
  594. */
  595. u16 tx_compl_threshold;
  596. /*
  597. * The rate used for control messages and scanning on the 2.4GHz band
  598. *
  599. * Range: CONF_HW_BIT_RATE_* bit mask
  600. */
  601. u32 basic_rate;
  602. /*
  603. * The rate used for control messages and scanning on the 5GHz band
  604. *
  605. * Range: CONF_HW_BIT_RATE_* bit mask
  606. */
  607. u32 basic_rate_5;
  608. /*
  609. * TX retry limits for templates
  610. */
  611. u8 tmpl_short_retry_limit;
  612. u8 tmpl_long_retry_limit;
  613. /* Time in ms for Tx watchdog timer to expire */
  614. u32 tx_watchdog_timeout;
  615. /*
  616. * when a slow link has this much packets pending, it becomes a low
  617. * priority link, scheduling-wise
  618. */
  619. u8 slow_link_thold;
  620. /*
  621. * when a fast link has this much packets pending, it becomes a low
  622. * priority link, scheduling-wise
  623. */
  624. u8 fast_link_thold;
  625. } __packed;
  626. enum {
  627. CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
  628. CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
  629. CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
  630. CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
  631. CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
  632. };
  633. #define CONF_MAX_BCN_FILT_IE_COUNT 32
  634. #define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
  635. #define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
  636. #define CONF_BCN_IE_OUI_LEN 3
  637. #define CONF_BCN_IE_VER_LEN 2
  638. struct conf_bcn_filt_rule {
  639. /*
  640. * IE number to which to associate a rule.
  641. *
  642. * Range: u8
  643. */
  644. u8 ie;
  645. /*
  646. * Rule to associate with the specific ie.
  647. *
  648. * Range: CONF_BCN_RULE_PASS_ON_*
  649. */
  650. u8 rule;
  651. /*
  652. * OUI for the vendor specifie IE (221)
  653. */
  654. u8 oui[CONF_BCN_IE_OUI_LEN];
  655. /*
  656. * Type for the vendor specifie IE (221)
  657. */
  658. u8 type;
  659. /*
  660. * Version for the vendor specifie IE (221)
  661. */
  662. u8 version[CONF_BCN_IE_VER_LEN];
  663. } __packed;
  664. #define CONF_MAX_RSSI_SNR_TRIGGERS 8
  665. enum {
  666. CONF_TRIG_METRIC_RSSI_BEACON = 0,
  667. CONF_TRIG_METRIC_RSSI_DATA,
  668. CONF_TRIG_METRIC_SNR_BEACON,
  669. CONF_TRIG_METRIC_SNR_DATA
  670. };
  671. enum {
  672. CONF_TRIG_EVENT_TYPE_LEVEL = 0,
  673. CONF_TRIG_EVENT_TYPE_EDGE
  674. };
  675. enum {
  676. CONF_TRIG_EVENT_DIR_LOW = 0,
  677. CONF_TRIG_EVENT_DIR_HIGH,
  678. CONF_TRIG_EVENT_DIR_BIDIR
  679. };
  680. struct conf_sig_weights {
  681. /*
  682. * RSSI from beacons average weight.
  683. *
  684. * Range: u8
  685. */
  686. u8 rssi_bcn_avg_weight;
  687. /*
  688. * RSSI from data average weight.
  689. *
  690. * Range: u8
  691. */
  692. u8 rssi_pkt_avg_weight;
  693. /*
  694. * SNR from beacons average weight.
  695. *
  696. * Range: u8
  697. */
  698. u8 snr_bcn_avg_weight;
  699. /*
  700. * SNR from data average weight.
  701. *
  702. * Range: u8
  703. */
  704. u8 snr_pkt_avg_weight;
  705. } __packed;
  706. enum conf_bcn_filt_mode {
  707. CONF_BCN_FILT_MODE_DISABLED = 0,
  708. CONF_BCN_FILT_MODE_ENABLED = 1
  709. };
  710. enum conf_bet_mode {
  711. CONF_BET_MODE_DISABLE = 0,
  712. CONF_BET_MODE_ENABLE = 1,
  713. };
  714. struct conf_conn_settings {
  715. /*
  716. * Firmware wakeup conditions configuration. The host may set only
  717. * one bit.
  718. *
  719. * Range: CONF_WAKE_UP_EVENT_*
  720. */
  721. u8 wake_up_event;
  722. /*
  723. * Listen interval for beacons or Dtims.
  724. *
  725. * Range: 0 for beacon and Dtim wakeup
  726. * 1-10 for x Dtims
  727. * 1-255 for x beacons
  728. */
  729. u8 listen_interval;
  730. /*
  731. * Firmware wakeup conditions during suspend
  732. * Range: CONF_WAKE_UP_EVENT_*
  733. */
  734. u8 suspend_wake_up_event;
  735. /*
  736. * Listen interval during suspend.
  737. * Currently will be in DTIMs (1-10)
  738. *
  739. */
  740. u8 suspend_listen_interval;
  741. /*
  742. * Enable or disable the beacon filtering.
  743. *
  744. * Range: CONF_BCN_FILT_MODE_*
  745. */
  746. u8 bcn_filt_mode;
  747. /*
  748. * Configure Beacon filter pass-thru rules.
  749. */
  750. u8 bcn_filt_ie_count;
  751. struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
  752. /*
  753. * The number of consecutive beacons to lose, before the firmware
  754. * becomes out of synch.
  755. *
  756. * Range: u32
  757. */
  758. u32 synch_fail_thold;
  759. /*
  760. * After out-of-synch, the number of TU's to wait without a further
  761. * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
  762. * event.
  763. *
  764. * Range: u32
  765. */
  766. u32 bss_lose_timeout;
  767. /*
  768. * Beacon receive timeout.
  769. *
  770. * Range: u32
  771. */
  772. u32 beacon_rx_timeout;
  773. /*
  774. * Broadcast receive timeout.
  775. *
  776. * Range: u32
  777. */
  778. u32 broadcast_timeout;
  779. /*
  780. * Enable/disable reception of broadcast packets in power save mode
  781. *
  782. * Range: 1 - enable, 0 - disable
  783. */
  784. u8 rx_broadcast_in_ps;
  785. /*
  786. * Consecutive PS Poll failures before sending event to driver
  787. *
  788. * Range: u8
  789. */
  790. u8 ps_poll_threshold;
  791. /*
  792. * Configuration of signal average weights.
  793. */
  794. struct conf_sig_weights sig_weights;
  795. /*
  796. * Specifies if beacon early termination procedure is enabled or
  797. * disabled.
  798. *
  799. * Range: CONF_BET_MODE_*
  800. */
  801. u8 bet_enable;
  802. /*
  803. * Specifies the maximum number of consecutive beacons that may be
  804. * early terminated. After this number is reached at least one full
  805. * beacon must be correctly received in FW before beacon ET
  806. * resumes.
  807. *
  808. * Range 0 - 255
  809. */
  810. u8 bet_max_consecutive;
  811. /*
  812. * Specifies the maximum number of times to try PSM entry if it fails
  813. * (if sending the appropriate null-func message fails.)
  814. *
  815. * Range 0 - 255
  816. */
  817. u8 psm_entry_retries;
  818. /*
  819. * Specifies the maximum number of times to try PSM exit if it fails
  820. * (if sending the appropriate null-func message fails.)
  821. *
  822. * Range 0 - 255
  823. */
  824. u8 psm_exit_retries;
  825. /*
  826. * Specifies the maximum number of times to try transmit the PSM entry
  827. * null-func frame for each PSM entry attempt
  828. *
  829. * Range 0 - 255
  830. */
  831. u8 psm_entry_nullfunc_retries;
  832. /*
  833. * Specifies the dynamic PS timeout in ms that will be used
  834. * by the FW when in AUTO_PS mode
  835. */
  836. u16 dynamic_ps_timeout;
  837. /*
  838. * Specifies whether dynamic PS should be disabled and PSM forced.
  839. * This is required for certain WiFi certification tests.
  840. */
  841. u8 forced_ps;
  842. /*
  843. *
  844. * Specifies the interval of the connection keep-alive null-func
  845. * frame in ms.
  846. *
  847. * Range: 1000 - 3600000
  848. */
  849. u32 keep_alive_interval;
  850. /*
  851. * Maximum listen interval supported by the driver in units of beacons.
  852. *
  853. * Range: u16
  854. */
  855. u8 max_listen_interval;
  856. /*
  857. * Default sleep authorization for a new STA interface. This determines
  858. * whether we can go to ELP.
  859. */
  860. u8 sta_sleep_auth;
  861. } __packed;
  862. enum {
  863. CONF_REF_CLK_19_2_E,
  864. CONF_REF_CLK_26_E,
  865. CONF_REF_CLK_38_4_E,
  866. CONF_REF_CLK_52_E,
  867. CONF_REF_CLK_38_4_M_XTAL,
  868. CONF_REF_CLK_26_M_XTAL,
  869. };
  870. enum single_dual_band_enum {
  871. CONF_SINGLE_BAND,
  872. CONF_DUAL_BAND
  873. };
  874. #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
  875. #define CONF_NUMBER_OF_SUB_BANDS_5 7
  876. #define CONF_NUMBER_OF_RATE_GROUPS 6
  877. #define CONF_NUMBER_OF_CHANNELS_2_4 14
  878. #define CONF_NUMBER_OF_CHANNELS_5 35
  879. struct conf_itrim_settings {
  880. /* enable dco itrim */
  881. u8 enable;
  882. /* moderation timeout in microsecs from the last TX */
  883. u32 timeout;
  884. } __packed;
  885. enum conf_fast_wakeup {
  886. CONF_FAST_WAKEUP_ENABLE,
  887. CONF_FAST_WAKEUP_DISABLE,
  888. };
  889. struct conf_pm_config_settings {
  890. /*
  891. * Host clock settling time
  892. *
  893. * Range: 0 - 30000 us
  894. */
  895. u32 host_clk_settling_time;
  896. /*
  897. * Host fast wakeup support
  898. *
  899. * Range: enum conf_fast_wakeup
  900. */
  901. u8 host_fast_wakeup_support;
  902. } __packed;
  903. struct conf_roam_trigger_settings {
  904. /*
  905. * The minimum interval between two trigger events.
  906. *
  907. * Range: 0 - 60000 ms
  908. */
  909. u16 trigger_pacing;
  910. /*
  911. * The weight for rssi/beacon average calculation
  912. *
  913. * Range: 0 - 255
  914. */
  915. u8 avg_weight_rssi_beacon;
  916. /*
  917. * The weight for rssi/data frame average calculation
  918. *
  919. * Range: 0 - 255
  920. */
  921. u8 avg_weight_rssi_data;
  922. /*
  923. * The weight for snr/beacon average calculation
  924. *
  925. * Range: 0 - 255
  926. */
  927. u8 avg_weight_snr_beacon;
  928. /*
  929. * The weight for snr/data frame average calculation
  930. *
  931. * Range: 0 - 255
  932. */
  933. u8 avg_weight_snr_data;
  934. } __packed;
  935. struct conf_scan_settings {
  936. /*
  937. * The minimum time to wait on each channel for active scans
  938. * This value will be used whenever there's a connected interface.
  939. *
  940. * Range: u32 tu/1000
  941. */
  942. u32 min_dwell_time_active;
  943. /*
  944. * The maximum time to wait on each channel for active scans
  945. * This value will be currently used whenever there's a
  946. * connected interface. It shouldn't exceed 30000 (~30ms) to avoid
  947. * possible interference of voip traffic going on while scanning.
  948. *
  949. * Range: u32 tu/1000
  950. */
  951. u32 max_dwell_time_active;
  952. /* The minimum time to wait on each channel for active scans
  953. * when it's possible to have longer scan dwell times.
  954. * Currently this is used whenever we're idle on all interfaces.
  955. * Longer dwell times improve detection of networks within a
  956. * single scan.
  957. *
  958. * Range: u32 tu/1000
  959. */
  960. u32 min_dwell_time_active_long;
  961. /* The maximum time to wait on each channel for active scans
  962. * when it's possible to have longer scan dwell times.
  963. * See min_dwell_time_active_long
  964. *
  965. * Range: u32 tu/1000
  966. */
  967. u32 max_dwell_time_active_long;
  968. /* time to wait on the channel for passive scans (in TU/1000) */
  969. u32 dwell_time_passive;
  970. /* time to wait on the channel for DFS scans (in TU/1000) */
  971. u32 dwell_time_dfs;
  972. /*
  973. * Number of probe requests to transmit on each active scan channel
  974. *
  975. * Range: u8
  976. */
  977. u16 num_probe_reqs;
  978. /*
  979. * Scan trigger (split scan) timeout. The FW will split the scan
  980. * operation into slices of the given time and allow the FW to schedule
  981. * other tasks in between.
  982. *
  983. * Range: u32 Microsecs
  984. */
  985. u32 split_scan_timeout;
  986. } __packed;
  987. struct conf_sched_scan_settings {
  988. /*
  989. * The base time to wait on the channel for active scans (in TU/1000).
  990. * The minimum dwell time is calculated according to this:
  991. * min_dwell_time = base + num_of_probes_to_be_sent * delta_per_probe
  992. * The maximum dwell time is calculated according to this:
  993. * max_dwell_time = min_dwell_time + max_dwell_time_delta
  994. */
  995. u32 base_dwell_time;
  996. /* The delta between the min dwell time and max dwell time for
  997. * active scans (in TU/1000s). The max dwell time is used by the FW once
  998. * traffic is detected on the channel.
  999. */
  1000. u32 max_dwell_time_delta;
  1001. /* Delta added to min dwell time per each probe in 2.4 GHz (TU/1000) */
  1002. u32 dwell_time_delta_per_probe;
  1003. /* Delta added to min dwell time per each probe in 5 GHz (TU/1000) */
  1004. u32 dwell_time_delta_per_probe_5;
  1005. /* time to wait on the channel for passive scans (in TU/1000) */
  1006. u32 dwell_time_passive;
  1007. /* time to wait on the channel for DFS scans (in TU/1000) */
  1008. u32 dwell_time_dfs;
  1009. /* number of probe requests to send on each channel in active scans */
  1010. u8 num_probe_reqs;
  1011. /* RSSI threshold to be used for filtering */
  1012. s8 rssi_threshold;
  1013. /* SNR threshold to be used for filtering */
  1014. s8 snr_threshold;
  1015. } __packed;
  1016. struct conf_ht_setting {
  1017. u8 rx_ba_win_size;
  1018. u8 tx_ba_win_size;
  1019. u16 inactivity_timeout;
  1020. /* bitmap of enabled TIDs for TX BA sessions */
  1021. u8 tx_ba_tid_bitmap;
  1022. } __packed;
  1023. struct conf_memory_settings {
  1024. /* Number of stations supported in IBSS mode */
  1025. u8 num_stations;
  1026. /* Number of ssid profiles used in IBSS mode */
  1027. u8 ssid_profiles;
  1028. /* Number of memory buffers allocated to rx pool */
  1029. u8 rx_block_num;
  1030. /* Minimum number of blocks allocated to tx pool */
  1031. u8 tx_min_block_num;
  1032. /* Disable/Enable dynamic memory */
  1033. u8 dynamic_memory;
  1034. /*
  1035. * Minimum required free tx memory blocks in order to assure optimum
  1036. * performance
  1037. *
  1038. * Range: 0-120
  1039. */
  1040. u8 min_req_tx_blocks;
  1041. /*
  1042. * Minimum required free rx memory blocks in order to assure optimum
  1043. * performance
  1044. *
  1045. * Range: 0-120
  1046. */
  1047. u8 min_req_rx_blocks;
  1048. /*
  1049. * Minimum number of mem blocks (free+used) guaranteed for TX
  1050. *
  1051. * Range: 0-120
  1052. */
  1053. u8 tx_min;
  1054. } __packed;
  1055. struct conf_fm_coex {
  1056. u8 enable;
  1057. u8 swallow_period;
  1058. u8 n_divider_fref_set_1;
  1059. u8 n_divider_fref_set_2;
  1060. u16 m_divider_fref_set_1;
  1061. u16 m_divider_fref_set_2;
  1062. u32 coex_pll_stabilization_time;
  1063. u16 ldo_stabilization_time;
  1064. u8 fm_disturbed_band_margin;
  1065. u8 swallow_clk_diff;
  1066. } __packed;
  1067. struct conf_rx_streaming_settings {
  1068. /*
  1069. * RX Streaming duration (in msec) from last tx/rx
  1070. *
  1071. * Range: u32
  1072. */
  1073. u32 duration;
  1074. /*
  1075. * Bitmap of tids to be polled during RX streaming.
  1076. * (Note: it doesn't look like it really matters)
  1077. *
  1078. * Range: 0x1-0xff
  1079. */
  1080. u8 queues;
  1081. /*
  1082. * RX Streaming interval.
  1083. * (Note:this value is also used as the rx streaming timeout)
  1084. * Range: 0 (disabled), 10 - 100
  1085. */
  1086. u8 interval;
  1087. /*
  1088. * enable rx streaming also when there is no coex activity
  1089. */
  1090. u8 always;
  1091. } __packed;
  1092. struct conf_fwlog {
  1093. /* Continuous or on-demand */
  1094. u8 mode;
  1095. /*
  1096. * Number of memory blocks dedicated for the FW logger
  1097. *
  1098. * Range: 1-3, or 0 to disable the FW logger
  1099. */
  1100. u8 mem_blocks;
  1101. /* Minimum log level threshold */
  1102. u8 severity;
  1103. /* Include/exclude timestamps from the log messages */
  1104. u8 timestamp;
  1105. /* See enum wl1271_fwlogger_output */
  1106. u8 output;
  1107. /* Regulates the frequency of log messages */
  1108. u8 threshold;
  1109. } __packed;
  1110. #define ACX_RATE_MGMT_NUM_OF_RATES 13
  1111. struct conf_rate_policy_settings {
  1112. u16 rate_retry_score;
  1113. u16 per_add;
  1114. u16 per_th1;
  1115. u16 per_th2;
  1116. u16 max_per;
  1117. u8 inverse_curiosity_factor;
  1118. u8 tx_fail_low_th;
  1119. u8 tx_fail_high_th;
  1120. u8 per_alpha_shift;
  1121. u8 per_add_shift;
  1122. u8 per_beta1_shift;
  1123. u8 per_beta2_shift;
  1124. u8 rate_check_up;
  1125. u8 rate_check_down;
  1126. u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
  1127. } __packed;
  1128. struct conf_hangover_settings {
  1129. u32 recover_time;
  1130. u8 hangover_period;
  1131. u8 dynamic_mode;
  1132. u8 early_termination_mode;
  1133. u8 max_period;
  1134. u8 min_period;
  1135. u8 increase_delta;
  1136. u8 decrease_delta;
  1137. u8 quiet_time;
  1138. u8 increase_time;
  1139. u8 window_size;
  1140. } __packed;
  1141. struct conf_recovery_settings {
  1142. /* BUG() on fw recovery */
  1143. u8 bug_on_recovery;
  1144. /* Prevent HW recovery. FW will remain stuck. */
  1145. u8 no_recovery;
  1146. } __packed;
  1147. /*
  1148. * The conf version consists of 4 bytes. The two MSB are the wlcore
  1149. * version, the two LSB are the lower driver's private conf
  1150. * version.
  1151. */
  1152. #define WLCORE_CONF_VERSION (0x0005 << 16)
  1153. #define WLCORE_CONF_MASK 0xffff0000
  1154. #define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
  1155. sizeof(struct wlcore_conf))
  1156. struct wlcore_conf_header {
  1157. __le32 magic;
  1158. __le32 version;
  1159. __le32 checksum;
  1160. } __packed;
  1161. struct wlcore_conf {
  1162. struct conf_sg_settings sg;
  1163. struct conf_rx_settings rx;
  1164. struct conf_tx_settings tx;
  1165. struct conf_conn_settings conn;
  1166. struct conf_itrim_settings itrim;
  1167. struct conf_pm_config_settings pm_config;
  1168. struct conf_roam_trigger_settings roam_trigger;
  1169. struct conf_scan_settings scan;
  1170. struct conf_sched_scan_settings sched_scan;
  1171. struct conf_ht_setting ht;
  1172. struct conf_memory_settings mem;
  1173. struct conf_fm_coex fm_coex;
  1174. struct conf_rx_streaming_settings rx_streaming;
  1175. struct conf_fwlog fwlog;
  1176. struct conf_rate_policy_settings rate;
  1177. struct conf_hangover_settings hangover;
  1178. struct conf_recovery_settings recovery;
  1179. } __packed;
  1180. struct wlcore_conf_file {
  1181. struct wlcore_conf_header header;
  1182. struct wlcore_conf core;
  1183. u8 priv[0];
  1184. } __packed;
  1185. #endif