fw-api.h 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005
  1. /******************************************************************************
  2. *
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * GPL LICENSE SUMMARY
  7. *
  8. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  9. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  10. * Copyright(c) 2016 Intel Deutschland GmbH
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of version 2 of the GNU General Public License as
  14. * published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful, but
  17. * WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
  24. * USA
  25. *
  26. * The full GNU General Public License is included in this distribution
  27. * in the file called COPYING.
  28. *
  29. * Contact Information:
  30. * Intel Linux Wireless <linuxwifi@intel.com>
  31. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  32. *
  33. * BSD LICENSE
  34. *
  35. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  36. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  37. * Copyright(c) 2016 Intel Deutschland GmbH
  38. * All rights reserved.
  39. *
  40. * Redistribution and use in source and binary forms, with or without
  41. * modification, are permitted provided that the following conditions
  42. * are met:
  43. *
  44. * * Redistributions of source code must retain the above copyright
  45. * notice, this list of conditions and the following disclaimer.
  46. * * Redistributions in binary form must reproduce the above copyright
  47. * notice, this list of conditions and the following disclaimer in
  48. * the documentation and/or other materials provided with the
  49. * distribution.
  50. * * Neither the name Intel Corporation nor the names of its
  51. * contributors may be used to endorse or promote products derived
  52. * from this software without specific prior written permission.
  53. *
  54. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  55. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  56. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  57. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  58. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  59. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  60. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  61. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  62. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  63. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  64. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  65. *
  66. *****************************************************************************/
  67. #ifndef __fw_api_h__
  68. #define __fw_api_h__
  69. #include "fw-api-rs.h"
  70. #include "fw-api-rx.h"
  71. #include "fw-api-tx.h"
  72. #include "fw-api-sta.h"
  73. #include "fw-api-mac.h"
  74. #include "fw-api-power.h"
  75. #include "fw-api-d3.h"
  76. #include "fw-api-coex.h"
  77. #include "fw-api-scan.h"
  78. #include "fw-api-stats.h"
  79. #include "fw-api-tof.h"
  80. /* Tx queue numbers */
  81. enum {
  82. IWL_MVM_OFFCHANNEL_QUEUE = 8,
  83. IWL_MVM_CMD_QUEUE = 9,
  84. };
  85. enum iwl_mvm_tx_fifo {
  86. IWL_MVM_TX_FIFO_BK = 0,
  87. IWL_MVM_TX_FIFO_BE,
  88. IWL_MVM_TX_FIFO_VI,
  89. IWL_MVM_TX_FIFO_VO,
  90. IWL_MVM_TX_FIFO_MCAST = 5,
  91. IWL_MVM_TX_FIFO_CMD = 7,
  92. };
  93. #define IWL_MVM_STATION_COUNT 16
  94. #define IWL_MVM_TDLS_STA_COUNT 4
  95. /* commands */
  96. enum {
  97. MVM_ALIVE = 0x1,
  98. REPLY_ERROR = 0x2,
  99. ECHO_CMD = 0x3,
  100. INIT_COMPLETE_NOTIF = 0x4,
  101. /* PHY context commands */
  102. PHY_CONTEXT_CMD = 0x8,
  103. DBG_CFG = 0x9,
  104. ANTENNA_COUPLING_NOTIFICATION = 0xa,
  105. /* UMAC scan commands */
  106. SCAN_ITERATION_COMPLETE_UMAC = 0xb5,
  107. SCAN_CFG_CMD = 0xc,
  108. SCAN_REQ_UMAC = 0xd,
  109. SCAN_ABORT_UMAC = 0xe,
  110. SCAN_COMPLETE_UMAC = 0xf,
  111. BA_WINDOW_STATUS_NOTIFICATION_ID = 0x13,
  112. /* station table */
  113. ADD_STA_KEY = 0x17,
  114. ADD_STA = 0x18,
  115. REMOVE_STA = 0x19,
  116. /* paging get item */
  117. FW_GET_ITEM_CMD = 0x1a,
  118. /* TX */
  119. TX_CMD = 0x1c,
  120. TXPATH_FLUSH = 0x1e,
  121. MGMT_MCAST_KEY = 0x1f,
  122. /* scheduler config */
  123. SCD_QUEUE_CFG = 0x1d,
  124. /* global key */
  125. WEP_KEY = 0x20,
  126. /* Memory */
  127. SHARED_MEM_CFG = 0x25,
  128. /* TDLS */
  129. TDLS_CHANNEL_SWITCH_CMD = 0x27,
  130. TDLS_CHANNEL_SWITCH_NOTIFICATION = 0xaa,
  131. TDLS_CONFIG_CMD = 0xa7,
  132. /* MAC and Binding commands */
  133. MAC_CONTEXT_CMD = 0x28,
  134. TIME_EVENT_CMD = 0x29, /* both CMD and response */
  135. TIME_EVENT_NOTIFICATION = 0x2a,
  136. BINDING_CONTEXT_CMD = 0x2b,
  137. TIME_QUOTA_CMD = 0x2c,
  138. NON_QOS_TX_COUNTER_CMD = 0x2d,
  139. LQ_CMD = 0x4e,
  140. /* paging block to FW cpu2 */
  141. FW_PAGING_BLOCK_CMD = 0x4f,
  142. /* Scan offload */
  143. SCAN_OFFLOAD_REQUEST_CMD = 0x51,
  144. SCAN_OFFLOAD_ABORT_CMD = 0x52,
  145. HOT_SPOT_CMD = 0x53,
  146. SCAN_OFFLOAD_COMPLETE = 0x6D,
  147. SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6E,
  148. SCAN_OFFLOAD_CONFIG_CMD = 0x6f,
  149. MATCH_FOUND_NOTIFICATION = 0xd9,
  150. SCAN_ITERATION_COMPLETE = 0xe7,
  151. /* Phy */
  152. PHY_CONFIGURATION_CMD = 0x6a,
  153. CALIB_RES_NOTIF_PHY_DB = 0x6b,
  154. /* PHY_DB_CMD = 0x6c, */
  155. /* ToF - 802.11mc FTM */
  156. TOF_CMD = 0x10,
  157. TOF_NOTIFICATION = 0x11,
  158. /* Power - legacy power table command */
  159. POWER_TABLE_CMD = 0x77,
  160. PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78,
  161. LTR_CONFIG = 0xee,
  162. /* Thermal Throttling*/
  163. REPLY_THERMAL_MNG_BACKOFF = 0x7e,
  164. /* Set/Get DC2DC frequency tune */
  165. DC2DC_CONFIG_CMD = 0x83,
  166. /* NVM */
  167. NVM_ACCESS_CMD = 0x88,
  168. SET_CALIB_DEFAULT_CMD = 0x8e,
  169. BEACON_NOTIFICATION = 0x90,
  170. BEACON_TEMPLATE_CMD = 0x91,
  171. TX_ANT_CONFIGURATION_CMD = 0x98,
  172. STATISTICS_CMD = 0x9c,
  173. STATISTICS_NOTIFICATION = 0x9d,
  174. EOSP_NOTIFICATION = 0x9e,
  175. REDUCE_TX_POWER_CMD = 0x9f,
  176. /* RF-KILL commands and notifications */
  177. CARD_STATE_CMD = 0xa0,
  178. CARD_STATE_NOTIFICATION = 0xa1,
  179. MISSED_BEACONS_NOTIFICATION = 0xa2,
  180. /* Power - new power table command */
  181. MAC_PM_POWER_TABLE = 0xa9,
  182. MFUART_LOAD_NOTIFICATION = 0xb1,
  183. RSS_CONFIG_CMD = 0xb3,
  184. REPLY_RX_PHY_CMD = 0xc0,
  185. REPLY_RX_MPDU_CMD = 0xc1,
  186. FRAME_RELEASE = 0xc3,
  187. BA_NOTIF = 0xc5,
  188. /* Location Aware Regulatory */
  189. MCC_UPDATE_CMD = 0xc8,
  190. MCC_CHUB_UPDATE_CMD = 0xc9,
  191. MARKER_CMD = 0xcb,
  192. /* BT Coex */
  193. BT_COEX_PRIO_TABLE = 0xcc,
  194. BT_COEX_PROT_ENV = 0xcd,
  195. BT_PROFILE_NOTIFICATION = 0xce,
  196. BT_CONFIG = 0x9b,
  197. BT_COEX_UPDATE_SW_BOOST = 0x5a,
  198. BT_COEX_UPDATE_CORUN_LUT = 0x5b,
  199. BT_COEX_UPDATE_REDUCED_TXP = 0x5c,
  200. BT_COEX_CI = 0x5d,
  201. REPLY_SF_CFG_CMD = 0xd1,
  202. REPLY_BEACON_FILTERING_CMD = 0xd2,
  203. /* DTS measurements */
  204. CMD_DTS_MEASUREMENT_TRIGGER = 0xdc,
  205. DTS_MEASUREMENT_NOTIFICATION = 0xdd,
  206. REPLY_DEBUG_CMD = 0xf0,
  207. LDBG_CONFIG_CMD = 0xf6,
  208. DEBUG_LOG_MSG = 0xf7,
  209. BCAST_FILTER_CMD = 0xcf,
  210. MCAST_FILTER_CMD = 0xd0,
  211. /* D3 commands/notifications */
  212. D3_CONFIG_CMD = 0xd3,
  213. PROT_OFFLOAD_CONFIG_CMD = 0xd4,
  214. OFFLOADS_QUERY_CMD = 0xd5,
  215. REMOTE_WAKE_CONFIG_CMD = 0xd6,
  216. D0I3_END_CMD = 0xed,
  217. /* for WoWLAN in particular */
  218. WOWLAN_PATTERNS = 0xe0,
  219. WOWLAN_CONFIGURATION = 0xe1,
  220. WOWLAN_TSC_RSC_PARAM = 0xe2,
  221. WOWLAN_TKIP_PARAM = 0xe3,
  222. WOWLAN_KEK_KCK_MATERIAL = 0xe4,
  223. WOWLAN_GET_STATUSES = 0xe5,
  224. WOWLAN_TX_POWER_PER_DB = 0xe6,
  225. /* and for NetDetect */
  226. SCAN_OFFLOAD_PROFILES_QUERY_CMD = 0x56,
  227. SCAN_OFFLOAD_HOTSPOTS_CONFIG_CMD = 0x58,
  228. SCAN_OFFLOAD_HOTSPOTS_QUERY_CMD = 0x59,
  229. REPLY_MAX = 0xff,
  230. };
  231. /* Please keep this enum *SORTED* by hex value.
  232. * Needed for binary search, otherwise a warning will be triggered.
  233. */
  234. enum iwl_phy_ops_subcmd_ids {
  235. CMD_DTS_MEASUREMENT_TRIGGER_WIDE = 0x0,
  236. CTDP_CONFIG_CMD = 0x03,
  237. TEMP_REPORTING_THRESHOLDS_CMD = 0x04,
  238. CT_KILL_NOTIFICATION = 0xFE,
  239. DTS_MEASUREMENT_NOTIF_WIDE = 0xFF,
  240. };
  241. enum iwl_data_path_subcmd_ids {
  242. UPDATE_MU_GROUPS_CMD = 0x1,
  243. TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2,
  244. MU_GROUP_MGMT_NOTIF = 0xFE,
  245. RX_QUEUES_NOTIFICATION = 0xFF,
  246. };
  247. enum iwl_prot_offload_subcmd_ids {
  248. STORED_BEACON_NTF = 0xFF,
  249. };
  250. /* command groups */
  251. enum {
  252. LEGACY_GROUP = 0x0,
  253. LONG_GROUP = 0x1,
  254. PHY_OPS_GROUP = 0x4,
  255. DATA_PATH_GROUP = 0x5,
  256. PROT_OFFLOAD_GROUP = 0xb,
  257. };
  258. /**
  259. * struct iwl_cmd_response - generic response struct for most commands
  260. * @status: status of the command asked, changes for each one
  261. */
  262. struct iwl_cmd_response {
  263. __le32 status;
  264. };
  265. /*
  266. * struct iwl_tx_ant_cfg_cmd
  267. * @valid: valid antenna configuration
  268. */
  269. struct iwl_tx_ant_cfg_cmd {
  270. __le32 valid;
  271. } __packed;
  272. /*
  273. * Calibration control struct.
  274. * Sent as part of the phy configuration command.
  275. * @flow_trigger: bitmap for which calibrations to perform according to
  276. * flow triggers.
  277. * @event_trigger: bitmap for which calibrations to perform according to
  278. * event triggers.
  279. */
  280. struct iwl_calib_ctrl {
  281. __le32 flow_trigger;
  282. __le32 event_trigger;
  283. } __packed;
  284. /* This enum defines the bitmap of various calibrations to enable in both
  285. * init ucode and runtime ucode through CALIBRATION_CFG_CMD.
  286. */
  287. enum iwl_calib_cfg {
  288. IWL_CALIB_CFG_XTAL_IDX = BIT(0),
  289. IWL_CALIB_CFG_TEMPERATURE_IDX = BIT(1),
  290. IWL_CALIB_CFG_VOLTAGE_READ_IDX = BIT(2),
  291. IWL_CALIB_CFG_PAPD_IDX = BIT(3),
  292. IWL_CALIB_CFG_TX_PWR_IDX = BIT(4),
  293. IWL_CALIB_CFG_DC_IDX = BIT(5),
  294. IWL_CALIB_CFG_BB_FILTER_IDX = BIT(6),
  295. IWL_CALIB_CFG_LO_LEAKAGE_IDX = BIT(7),
  296. IWL_CALIB_CFG_TX_IQ_IDX = BIT(8),
  297. IWL_CALIB_CFG_TX_IQ_SKEW_IDX = BIT(9),
  298. IWL_CALIB_CFG_RX_IQ_IDX = BIT(10),
  299. IWL_CALIB_CFG_RX_IQ_SKEW_IDX = BIT(11),
  300. IWL_CALIB_CFG_SENSITIVITY_IDX = BIT(12),
  301. IWL_CALIB_CFG_CHAIN_NOISE_IDX = BIT(13),
  302. IWL_CALIB_CFG_DISCONNECTED_ANT_IDX = BIT(14),
  303. IWL_CALIB_CFG_ANT_COUPLING_IDX = BIT(15),
  304. IWL_CALIB_CFG_DAC_IDX = BIT(16),
  305. IWL_CALIB_CFG_ABS_IDX = BIT(17),
  306. IWL_CALIB_CFG_AGC_IDX = BIT(18),
  307. };
  308. /*
  309. * Phy configuration command.
  310. */
  311. struct iwl_phy_cfg_cmd {
  312. __le32 phy_cfg;
  313. struct iwl_calib_ctrl calib_control;
  314. } __packed;
  315. #define PHY_CFG_RADIO_TYPE (BIT(0) | BIT(1))
  316. #define PHY_CFG_RADIO_STEP (BIT(2) | BIT(3))
  317. #define PHY_CFG_RADIO_DASH (BIT(4) | BIT(5))
  318. #define PHY_CFG_PRODUCT_NUMBER (BIT(6) | BIT(7))
  319. #define PHY_CFG_TX_CHAIN_A BIT(8)
  320. #define PHY_CFG_TX_CHAIN_B BIT(9)
  321. #define PHY_CFG_TX_CHAIN_C BIT(10)
  322. #define PHY_CFG_RX_CHAIN_A BIT(12)
  323. #define PHY_CFG_RX_CHAIN_B BIT(13)
  324. #define PHY_CFG_RX_CHAIN_C BIT(14)
  325. /* Target of the NVM_ACCESS_CMD */
  326. enum {
  327. NVM_ACCESS_TARGET_CACHE = 0,
  328. NVM_ACCESS_TARGET_OTP = 1,
  329. NVM_ACCESS_TARGET_EEPROM = 2,
  330. };
  331. /* Section types for NVM_ACCESS_CMD */
  332. enum {
  333. NVM_SECTION_TYPE_SW = 1,
  334. NVM_SECTION_TYPE_REGULATORY = 3,
  335. NVM_SECTION_TYPE_CALIBRATION = 4,
  336. NVM_SECTION_TYPE_PRODUCTION = 5,
  337. NVM_SECTION_TYPE_MAC_OVERRIDE = 11,
  338. NVM_SECTION_TYPE_PHY_SKU = 12,
  339. NVM_MAX_NUM_SECTIONS = 13,
  340. };
  341. /**
  342. * struct iwl_nvm_access_cmd_ver2 - Request the device to send an NVM section
  343. * @op_code: 0 - read, 1 - write
  344. * @target: NVM_ACCESS_TARGET_*
  345. * @type: NVM_SECTION_TYPE_*
  346. * @offset: offset in bytes into the section
  347. * @length: in bytes, to read/write
  348. * @data: if write operation, the data to write. On read its empty
  349. */
  350. struct iwl_nvm_access_cmd {
  351. u8 op_code;
  352. u8 target;
  353. __le16 type;
  354. __le16 offset;
  355. __le16 length;
  356. u8 data[];
  357. } __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */
  358. #define NUM_OF_FW_PAGING_BLOCKS 33 /* 32 for data and 1 block for CSS */
  359. /*
  360. * struct iwl_fw_paging_cmd - paging layout
  361. *
  362. * (FW_PAGING_BLOCK_CMD = 0x4f)
  363. *
  364. * Send to FW the paging layout in the driver.
  365. *
  366. * @flags: various flags for the command
  367. * @block_size: the block size in powers of 2
  368. * @block_num: number of blocks specified in the command.
  369. * @device_phy_addr: virtual addresses from device side
  370. */
  371. struct iwl_fw_paging_cmd {
  372. __le32 flags;
  373. __le32 block_size;
  374. __le32 block_num;
  375. __le32 device_phy_addr[NUM_OF_FW_PAGING_BLOCKS];
  376. } __packed; /* FW_PAGING_BLOCK_CMD_API_S_VER_1 */
  377. /*
  378. * Fw items ID's
  379. *
  380. * @IWL_FW_ITEM_ID_PAGING: Address of the pages that the FW will upload
  381. * download
  382. */
  383. enum iwl_fw_item_id {
  384. IWL_FW_ITEM_ID_PAGING = 3,
  385. };
  386. /*
  387. * struct iwl_fw_get_item_cmd - get an item from the fw
  388. */
  389. struct iwl_fw_get_item_cmd {
  390. __le32 item_id;
  391. } __packed; /* FW_GET_ITEM_CMD_API_S_VER_1 */
  392. #define CONT_REC_COMMAND_SIZE 80
  393. #define ENABLE_CONT_RECORDING 0x15
  394. #define DISABLE_CONT_RECORDING 0x16
  395. /*
  396. * struct iwl_continuous_record_mode - recording mode
  397. */
  398. struct iwl_continuous_record_mode {
  399. __le16 enable_recording;
  400. } __packed;
  401. /*
  402. * struct iwl_continuous_record_cmd - enable/disable continuous recording
  403. */
  404. struct iwl_continuous_record_cmd {
  405. struct iwl_continuous_record_mode record_mode;
  406. u8 pad[CONT_REC_COMMAND_SIZE -
  407. sizeof(struct iwl_continuous_record_mode)];
  408. } __packed;
  409. struct iwl_fw_get_item_resp {
  410. __le32 item_id;
  411. __le32 item_byte_cnt;
  412. __le32 item_val;
  413. } __packed; /* FW_GET_ITEM_RSP_S_VER_1 */
  414. /**
  415. * struct iwl_nvm_access_resp_ver2 - response to NVM_ACCESS_CMD
  416. * @offset: offset in bytes into the section
  417. * @length: in bytes, either how much was written or read
  418. * @type: NVM_SECTION_TYPE_*
  419. * @status: 0 for success, fail otherwise
  420. * @data: if read operation, the data returned. Empty on write.
  421. */
  422. struct iwl_nvm_access_resp {
  423. __le16 offset;
  424. __le16 length;
  425. __le16 type;
  426. __le16 status;
  427. u8 data[];
  428. } __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */
  429. /* MVM_ALIVE 0x1 */
  430. /* alive response is_valid values */
  431. #define ALIVE_RESP_UCODE_OK BIT(0)
  432. #define ALIVE_RESP_RFKILL BIT(1)
  433. /* alive response ver_type values */
  434. enum {
  435. FW_TYPE_HW = 0,
  436. FW_TYPE_PROT = 1,
  437. FW_TYPE_AP = 2,
  438. FW_TYPE_WOWLAN = 3,
  439. FW_TYPE_TIMING = 4,
  440. FW_TYPE_WIPAN = 5
  441. };
  442. /* alive response ver_subtype values */
  443. enum {
  444. FW_SUBTYPE_FULL_FEATURE = 0,
  445. FW_SUBTYPE_BOOTSRAP = 1, /* Not valid */
  446. FW_SUBTYPE_REDUCED = 2,
  447. FW_SUBTYPE_ALIVE_ONLY = 3,
  448. FW_SUBTYPE_WOWLAN = 4,
  449. FW_SUBTYPE_AP_SUBTYPE = 5,
  450. FW_SUBTYPE_WIPAN = 6,
  451. FW_SUBTYPE_INITIALIZE = 9
  452. };
  453. #define IWL_ALIVE_STATUS_ERR 0xDEAD
  454. #define IWL_ALIVE_STATUS_OK 0xCAFE
  455. #define IWL_ALIVE_FLG_RFKILL BIT(0)
  456. struct mvm_alive_resp_ver1 {
  457. __le16 status;
  458. __le16 flags;
  459. u8 ucode_minor;
  460. u8 ucode_major;
  461. __le16 id;
  462. u8 api_minor;
  463. u8 api_major;
  464. u8 ver_subtype;
  465. u8 ver_type;
  466. u8 mac;
  467. u8 opt;
  468. __le16 reserved2;
  469. __le32 timestamp;
  470. __le32 error_event_table_ptr; /* SRAM address for error log */
  471. __le32 log_event_table_ptr; /* SRAM address for event log */
  472. __le32 cpu_register_ptr;
  473. __le32 dbgm_config_ptr;
  474. __le32 alive_counter_ptr;
  475. __le32 scd_base_ptr; /* SRAM address for SCD */
  476. } __packed; /* ALIVE_RES_API_S_VER_1 */
  477. struct mvm_alive_resp_ver2 {
  478. __le16 status;
  479. __le16 flags;
  480. u8 ucode_minor;
  481. u8 ucode_major;
  482. __le16 id;
  483. u8 api_minor;
  484. u8 api_major;
  485. u8 ver_subtype;
  486. u8 ver_type;
  487. u8 mac;
  488. u8 opt;
  489. __le16 reserved2;
  490. __le32 timestamp;
  491. __le32 error_event_table_ptr; /* SRAM address for error log */
  492. __le32 log_event_table_ptr; /* SRAM address for LMAC event log */
  493. __le32 cpu_register_ptr;
  494. __le32 dbgm_config_ptr;
  495. __le32 alive_counter_ptr;
  496. __le32 scd_base_ptr; /* SRAM address for SCD */
  497. __le32 st_fwrd_addr; /* pointer to Store and forward */
  498. __le32 st_fwrd_size;
  499. u8 umac_minor; /* UMAC version: minor */
  500. u8 umac_major; /* UMAC version: major */
  501. __le16 umac_id; /* UMAC version: id */
  502. __le32 error_info_addr; /* SRAM address for UMAC error log */
  503. __le32 dbg_print_buff_addr;
  504. } __packed; /* ALIVE_RES_API_S_VER_2 */
  505. struct mvm_alive_resp {
  506. __le16 status;
  507. __le16 flags;
  508. __le32 ucode_minor;
  509. __le32 ucode_major;
  510. u8 ver_subtype;
  511. u8 ver_type;
  512. u8 mac;
  513. u8 opt;
  514. __le32 timestamp;
  515. __le32 error_event_table_ptr; /* SRAM address for error log */
  516. __le32 log_event_table_ptr; /* SRAM address for LMAC event log */
  517. __le32 cpu_register_ptr;
  518. __le32 dbgm_config_ptr;
  519. __le32 alive_counter_ptr;
  520. __le32 scd_base_ptr; /* SRAM address for SCD */
  521. __le32 st_fwrd_addr; /* pointer to Store and forward */
  522. __le32 st_fwrd_size;
  523. __le32 umac_minor; /* UMAC version: minor */
  524. __le32 umac_major; /* UMAC version: major */
  525. __le32 error_info_addr; /* SRAM address for UMAC error log */
  526. __le32 dbg_print_buff_addr;
  527. } __packed; /* ALIVE_RES_API_S_VER_3 */
  528. /* Error response/notification */
  529. enum {
  530. FW_ERR_UNKNOWN_CMD = 0x0,
  531. FW_ERR_INVALID_CMD_PARAM = 0x1,
  532. FW_ERR_SERVICE = 0x2,
  533. FW_ERR_ARC_MEMORY = 0x3,
  534. FW_ERR_ARC_CODE = 0x4,
  535. FW_ERR_WATCH_DOG = 0x5,
  536. FW_ERR_WEP_GRP_KEY_INDX = 0x10,
  537. FW_ERR_WEP_KEY_SIZE = 0x11,
  538. FW_ERR_OBSOLETE_FUNC = 0x12,
  539. FW_ERR_UNEXPECTED = 0xFE,
  540. FW_ERR_FATAL = 0xFF
  541. };
  542. /**
  543. * struct iwl_error_resp - FW error indication
  544. * ( REPLY_ERROR = 0x2 )
  545. * @error_type: one of FW_ERR_*
  546. * @cmd_id: the command ID for which the error occured
  547. * @bad_cmd_seq_num: sequence number of the erroneous command
  548. * @error_service: which service created the error, applicable only if
  549. * error_type = 2, otherwise 0
  550. * @timestamp: TSF in usecs.
  551. */
  552. struct iwl_error_resp {
  553. __le32 error_type;
  554. u8 cmd_id;
  555. u8 reserved1;
  556. __le16 bad_cmd_seq_num;
  557. __le32 error_service;
  558. __le64 timestamp;
  559. } __packed;
  560. /* Common PHY, MAC and Bindings definitions */
  561. #define MAX_MACS_IN_BINDING (3)
  562. #define MAX_BINDINGS (4)
  563. #define AUX_BINDING_INDEX (3)
  564. #define MAX_PHYS (4)
  565. /* Used to extract ID and color from the context dword */
  566. #define FW_CTXT_ID_POS (0)
  567. #define FW_CTXT_ID_MSK (0xff << FW_CTXT_ID_POS)
  568. #define FW_CTXT_COLOR_POS (8)
  569. #define FW_CTXT_COLOR_MSK (0xff << FW_CTXT_COLOR_POS)
  570. #define FW_CTXT_INVALID (0xffffffff)
  571. #define FW_CMD_ID_AND_COLOR(_id, _color) ((_id << FW_CTXT_ID_POS) |\
  572. (_color << FW_CTXT_COLOR_POS))
  573. /* Possible actions on PHYs, MACs and Bindings */
  574. enum {
  575. FW_CTXT_ACTION_STUB = 0,
  576. FW_CTXT_ACTION_ADD,
  577. FW_CTXT_ACTION_MODIFY,
  578. FW_CTXT_ACTION_REMOVE,
  579. FW_CTXT_ACTION_NUM
  580. }; /* COMMON_CONTEXT_ACTION_API_E_VER_1 */
  581. /* Time Events */
  582. /* Time Event types, according to MAC type */
  583. enum iwl_time_event_type {
  584. /* BSS Station Events */
  585. TE_BSS_STA_AGGRESSIVE_ASSOC,
  586. TE_BSS_STA_ASSOC,
  587. TE_BSS_EAP_DHCP_PROT,
  588. TE_BSS_QUIET_PERIOD,
  589. /* P2P Device Events */
  590. TE_P2P_DEVICE_DISCOVERABLE,
  591. TE_P2P_DEVICE_LISTEN,
  592. TE_P2P_DEVICE_ACTION_SCAN,
  593. TE_P2P_DEVICE_FULL_SCAN,
  594. /* P2P Client Events */
  595. TE_P2P_CLIENT_AGGRESSIVE_ASSOC,
  596. TE_P2P_CLIENT_ASSOC,
  597. TE_P2P_CLIENT_QUIET_PERIOD,
  598. /* P2P GO Events */
  599. TE_P2P_GO_ASSOC_PROT,
  600. TE_P2P_GO_REPETITIVE_NOA,
  601. TE_P2P_GO_CT_WINDOW,
  602. /* WiDi Sync Events */
  603. TE_WIDI_TX_SYNC,
  604. /* Channel Switch NoA */
  605. TE_CHANNEL_SWITCH_PERIOD,
  606. TE_MAX
  607. }; /* MAC_EVENT_TYPE_API_E_VER_1 */
  608. /* Time event - defines for command API v1 */
  609. /*
  610. * @TE_V1_FRAG_NONE: fragmentation of the time event is NOT allowed.
  611. * @TE_V1_FRAG_SINGLE: fragmentation of the time event is allowed, but only
  612. * the first fragment is scheduled.
  613. * @TE_V1_FRAG_DUAL: fragmentation of the time event is allowed, but only
  614. * the first 2 fragments are scheduled.
  615. * @TE_V1_FRAG_ENDLESS: fragmentation of the time event is allowed, and any
  616. * number of fragments are valid.
  617. *
  618. * Other than the constant defined above, specifying a fragmentation value 'x'
  619. * means that the event can be fragmented but only the first 'x' will be
  620. * scheduled.
  621. */
  622. enum {
  623. TE_V1_FRAG_NONE = 0,
  624. TE_V1_FRAG_SINGLE = 1,
  625. TE_V1_FRAG_DUAL = 2,
  626. TE_V1_FRAG_ENDLESS = 0xffffffff
  627. };
  628. /* If a Time Event can be fragmented, this is the max number of fragments */
  629. #define TE_V1_FRAG_MAX_MSK 0x0fffffff
  630. /* Repeat the time event endlessly (until removed) */
  631. #define TE_V1_REPEAT_ENDLESS 0xffffffff
  632. /* If a Time Event has bounded repetitions, this is the maximal value */
  633. #define TE_V1_REPEAT_MAX_MSK_V1 0x0fffffff
  634. /* Time Event dependencies: none, on another TE, or in a specific time */
  635. enum {
  636. TE_V1_INDEPENDENT = 0,
  637. TE_V1_DEP_OTHER = BIT(0),
  638. TE_V1_DEP_TSF = BIT(1),
  639. TE_V1_EVENT_SOCIOPATHIC = BIT(2),
  640. }; /* MAC_EVENT_DEPENDENCY_POLICY_API_E_VER_2 */
  641. /*
  642. * @TE_V1_NOTIF_NONE: no notifications
  643. * @TE_V1_NOTIF_HOST_EVENT_START: request/receive notification on event start
  644. * @TE_V1_NOTIF_HOST_EVENT_END:request/receive notification on event end
  645. * @TE_V1_NOTIF_INTERNAL_EVENT_START: internal FW use
  646. * @TE_V1_NOTIF_INTERNAL_EVENT_END: internal FW use.
  647. * @TE_V1_NOTIF_HOST_FRAG_START: request/receive notification on frag start
  648. * @TE_V1_NOTIF_HOST_FRAG_END:request/receive notification on frag end
  649. * @TE_V1_NOTIF_INTERNAL_FRAG_START: internal FW use.
  650. * @TE_V1_NOTIF_INTERNAL_FRAG_END: internal FW use.
  651. *
  652. * Supported Time event notifications configuration.
  653. * A notification (both event and fragment) includes a status indicating weather
  654. * the FW was able to schedule the event or not. For fragment start/end
  655. * notification the status is always success. There is no start/end fragment
  656. * notification for monolithic events.
  657. */
  658. enum {
  659. TE_V1_NOTIF_NONE = 0,
  660. TE_V1_NOTIF_HOST_EVENT_START = BIT(0),
  661. TE_V1_NOTIF_HOST_EVENT_END = BIT(1),
  662. TE_V1_NOTIF_INTERNAL_EVENT_START = BIT(2),
  663. TE_V1_NOTIF_INTERNAL_EVENT_END = BIT(3),
  664. TE_V1_NOTIF_HOST_FRAG_START = BIT(4),
  665. TE_V1_NOTIF_HOST_FRAG_END = BIT(5),
  666. TE_V1_NOTIF_INTERNAL_FRAG_START = BIT(6),
  667. TE_V1_NOTIF_INTERNAL_FRAG_END = BIT(7),
  668. }; /* MAC_EVENT_ACTION_API_E_VER_2 */
  669. /* Time event - defines for command API */
  670. /*
  671. * @TE_V2_FRAG_NONE: fragmentation of the time event is NOT allowed.
  672. * @TE_V2_FRAG_SINGLE: fragmentation of the time event is allowed, but only
  673. * the first fragment is scheduled.
  674. * @TE_V2_FRAG_DUAL: fragmentation of the time event is allowed, but only
  675. * the first 2 fragments are scheduled.
  676. * @TE_V2_FRAG_ENDLESS: fragmentation of the time event is allowed, and any
  677. * number of fragments are valid.
  678. *
  679. * Other than the constant defined above, specifying a fragmentation value 'x'
  680. * means that the event can be fragmented but only the first 'x' will be
  681. * scheduled.
  682. */
  683. enum {
  684. TE_V2_FRAG_NONE = 0,
  685. TE_V2_FRAG_SINGLE = 1,
  686. TE_V2_FRAG_DUAL = 2,
  687. TE_V2_FRAG_MAX = 0xfe,
  688. TE_V2_FRAG_ENDLESS = 0xff
  689. };
  690. /* Repeat the time event endlessly (until removed) */
  691. #define TE_V2_REPEAT_ENDLESS 0xff
  692. /* If a Time Event has bounded repetitions, this is the maximal value */
  693. #define TE_V2_REPEAT_MAX 0xfe
  694. #define TE_V2_PLACEMENT_POS 12
  695. #define TE_V2_ABSENCE_POS 15
  696. /* Time event policy values
  697. * A notification (both event and fragment) includes a status indicating weather
  698. * the FW was able to schedule the event or not. For fragment start/end
  699. * notification the status is always success. There is no start/end fragment
  700. * notification for monolithic events.
  701. *
  702. * @TE_V2_DEFAULT_POLICY: independent, social, present, unoticable
  703. * @TE_V2_NOTIF_HOST_EVENT_START: request/receive notification on event start
  704. * @TE_V2_NOTIF_HOST_EVENT_END:request/receive notification on event end
  705. * @TE_V2_NOTIF_INTERNAL_EVENT_START: internal FW use
  706. * @TE_V2_NOTIF_INTERNAL_EVENT_END: internal FW use.
  707. * @TE_V2_NOTIF_HOST_FRAG_START: request/receive notification on frag start
  708. * @TE_V2_NOTIF_HOST_FRAG_END:request/receive notification on frag end
  709. * @TE_V2_NOTIF_INTERNAL_FRAG_START: internal FW use.
  710. * @TE_V2_NOTIF_INTERNAL_FRAG_END: internal FW use.
  711. * @TE_V2_DEP_OTHER: depends on another time event
  712. * @TE_V2_DEP_TSF: depends on a specific time
  713. * @TE_V2_EVENT_SOCIOPATHIC: can't co-exist with other events of tha same MAC
  714. * @TE_V2_ABSENCE: are we present or absent during the Time Event.
  715. */
  716. enum {
  717. TE_V2_DEFAULT_POLICY = 0x0,
  718. /* notifications (event start/stop, fragment start/stop) */
  719. TE_V2_NOTIF_HOST_EVENT_START = BIT(0),
  720. TE_V2_NOTIF_HOST_EVENT_END = BIT(1),
  721. TE_V2_NOTIF_INTERNAL_EVENT_START = BIT(2),
  722. TE_V2_NOTIF_INTERNAL_EVENT_END = BIT(3),
  723. TE_V2_NOTIF_HOST_FRAG_START = BIT(4),
  724. TE_V2_NOTIF_HOST_FRAG_END = BIT(5),
  725. TE_V2_NOTIF_INTERNAL_FRAG_START = BIT(6),
  726. TE_V2_NOTIF_INTERNAL_FRAG_END = BIT(7),
  727. T2_V2_START_IMMEDIATELY = BIT(11),
  728. TE_V2_NOTIF_MSK = 0xff,
  729. /* placement characteristics */
  730. TE_V2_DEP_OTHER = BIT(TE_V2_PLACEMENT_POS),
  731. TE_V2_DEP_TSF = BIT(TE_V2_PLACEMENT_POS + 1),
  732. TE_V2_EVENT_SOCIOPATHIC = BIT(TE_V2_PLACEMENT_POS + 2),
  733. /* are we present or absent during the Time Event. */
  734. TE_V2_ABSENCE = BIT(TE_V2_ABSENCE_POS),
  735. };
  736. /**
  737. * struct iwl_time_event_cmd_api - configuring Time Events
  738. * with struct MAC_TIME_EVENT_DATA_API_S_VER_2 (see also
  739. * with version 1. determined by IWL_UCODE_TLV_FLAGS)
  740. * ( TIME_EVENT_CMD = 0x29 )
  741. * @id_and_color: ID and color of the relevant MAC
  742. * @action: action to perform, one of FW_CTXT_ACTION_*
  743. * @id: this field has two meanings, depending on the action:
  744. * If the action is ADD, then it means the type of event to add.
  745. * For all other actions it is the unique event ID assigned when the
  746. * event was added by the FW.
  747. * @apply_time: When to start the Time Event (in GP2)
  748. * @max_delay: maximum delay to event's start (apply time), in TU
  749. * @depends_on: the unique ID of the event we depend on (if any)
  750. * @interval: interval between repetitions, in TU
  751. * @duration: duration of event in TU
  752. * @repeat: how many repetitions to do, can be TE_REPEAT_ENDLESS
  753. * @max_frags: maximal number of fragments the Time Event can be divided to
  754. * @policy: defines whether uCode shall notify the host or other uCode modules
  755. * on event and/or fragment start and/or end
  756. * using one of TE_INDEPENDENT, TE_DEP_OTHER, TE_DEP_TSF
  757. * TE_EVENT_SOCIOPATHIC
  758. * using TE_ABSENCE and using TE_NOTIF_*
  759. */
  760. struct iwl_time_event_cmd {
  761. /* COMMON_INDEX_HDR_API_S_VER_1 */
  762. __le32 id_and_color;
  763. __le32 action;
  764. __le32 id;
  765. /* MAC_TIME_EVENT_DATA_API_S_VER_2 */
  766. __le32 apply_time;
  767. __le32 max_delay;
  768. __le32 depends_on;
  769. __le32 interval;
  770. __le32 duration;
  771. u8 repeat;
  772. u8 max_frags;
  773. __le16 policy;
  774. } __packed; /* MAC_TIME_EVENT_CMD_API_S_VER_2 */
  775. /**
  776. * struct iwl_time_event_resp - response structure to iwl_time_event_cmd
  777. * @status: bit 0 indicates success, all others specify errors
  778. * @id: the Time Event type
  779. * @unique_id: the unique ID assigned (in ADD) or given (others) to the TE
  780. * @id_and_color: ID and color of the relevant MAC
  781. */
  782. struct iwl_time_event_resp {
  783. __le32 status;
  784. __le32 id;
  785. __le32 unique_id;
  786. __le32 id_and_color;
  787. } __packed; /* MAC_TIME_EVENT_RSP_API_S_VER_1 */
  788. /**
  789. * struct iwl_time_event_notif - notifications of time event start/stop
  790. * ( TIME_EVENT_NOTIFICATION = 0x2a )
  791. * @timestamp: action timestamp in GP2
  792. * @session_id: session's unique id
  793. * @unique_id: unique id of the Time Event itself
  794. * @id_and_color: ID and color of the relevant MAC
  795. * @action: one of TE_NOTIF_START or TE_NOTIF_END
  796. * @status: true if scheduled, false otherwise (not executed)
  797. */
  798. struct iwl_time_event_notif {
  799. __le32 timestamp;
  800. __le32 session_id;
  801. __le32 unique_id;
  802. __le32 id_and_color;
  803. __le32 action;
  804. __le32 status;
  805. } __packed; /* MAC_TIME_EVENT_NTFY_API_S_VER_1 */
  806. /* Bindings and Time Quota */
  807. /**
  808. * struct iwl_binding_cmd - configuring bindings
  809. * ( BINDING_CONTEXT_CMD = 0x2b )
  810. * @id_and_color: ID and color of the relevant Binding
  811. * @action: action to perform, one of FW_CTXT_ACTION_*
  812. * @macs: array of MAC id and colors which belong to the binding
  813. * @phy: PHY id and color which belongs to the binding
  814. */
  815. struct iwl_binding_cmd {
  816. /* COMMON_INDEX_HDR_API_S_VER_1 */
  817. __le32 id_and_color;
  818. __le32 action;
  819. /* BINDING_DATA_API_S_VER_1 */
  820. __le32 macs[MAX_MACS_IN_BINDING];
  821. __le32 phy;
  822. } __packed; /* BINDING_CMD_API_S_VER_1 */
  823. /* The maximal number of fragments in the FW's schedule session */
  824. #define IWL_MVM_MAX_QUOTA 128
  825. /**
  826. * struct iwl_time_quota_data - configuration of time quota per binding
  827. * @id_and_color: ID and color of the relevant Binding
  828. * @quota: absolute time quota in TU. The scheduler will try to divide the
  829. * remainig quota (after Time Events) according to this quota.
  830. * @max_duration: max uninterrupted context duration in TU
  831. */
  832. struct iwl_time_quota_data {
  833. __le32 id_and_color;
  834. __le32 quota;
  835. __le32 max_duration;
  836. } __packed; /* TIME_QUOTA_DATA_API_S_VER_1 */
  837. /**
  838. * struct iwl_time_quota_cmd - configuration of time quota between bindings
  839. * ( TIME_QUOTA_CMD = 0x2c )
  840. * @quotas: allocations per binding
  841. */
  842. struct iwl_time_quota_cmd {
  843. struct iwl_time_quota_data quotas[MAX_BINDINGS];
  844. } __packed; /* TIME_QUOTA_ALLOCATION_CMD_API_S_VER_1 */
  845. /* PHY context */
  846. /* Supported bands */
  847. #define PHY_BAND_5 (0)
  848. #define PHY_BAND_24 (1)
  849. /* Supported channel width, vary if there is VHT support */
  850. #define PHY_VHT_CHANNEL_MODE20 (0x0)
  851. #define PHY_VHT_CHANNEL_MODE40 (0x1)
  852. #define PHY_VHT_CHANNEL_MODE80 (0x2)
  853. #define PHY_VHT_CHANNEL_MODE160 (0x3)
  854. /*
  855. * Control channel position:
  856. * For legacy set bit means upper channel, otherwise lower.
  857. * For VHT - bit-2 marks if the control is lower/upper relative to center-freq
  858. * bits-1:0 mark the distance from the center freq. for 20Mhz, offset is 0.
  859. * center_freq
  860. * |
  861. * 40Mhz |_______|_______|
  862. * 80Mhz |_______|_______|_______|_______|
  863. * 160Mhz |_______|_______|_______|_______|_______|_______|_______|_______|
  864. * code 011 010 001 000 | 100 101 110 111
  865. */
  866. #define PHY_VHT_CTRL_POS_1_BELOW (0x0)
  867. #define PHY_VHT_CTRL_POS_2_BELOW (0x1)
  868. #define PHY_VHT_CTRL_POS_3_BELOW (0x2)
  869. #define PHY_VHT_CTRL_POS_4_BELOW (0x3)
  870. #define PHY_VHT_CTRL_POS_1_ABOVE (0x4)
  871. #define PHY_VHT_CTRL_POS_2_ABOVE (0x5)
  872. #define PHY_VHT_CTRL_POS_3_ABOVE (0x6)
  873. #define PHY_VHT_CTRL_POS_4_ABOVE (0x7)
  874. /*
  875. * @band: PHY_BAND_*
  876. * @channel: channel number
  877. * @width: PHY_[VHT|LEGACY]_CHANNEL_*
  878. * @ctrl channel: PHY_[VHT|LEGACY]_CTRL_*
  879. */
  880. struct iwl_fw_channel_info {
  881. u8 band;
  882. u8 channel;
  883. u8 width;
  884. u8 ctrl_pos;
  885. } __packed;
  886. #define PHY_RX_CHAIN_DRIVER_FORCE_POS (0)
  887. #define PHY_RX_CHAIN_DRIVER_FORCE_MSK \
  888. (0x1 << PHY_RX_CHAIN_DRIVER_FORCE_POS)
  889. #define PHY_RX_CHAIN_VALID_POS (1)
  890. #define PHY_RX_CHAIN_VALID_MSK \
  891. (0x7 << PHY_RX_CHAIN_VALID_POS)
  892. #define PHY_RX_CHAIN_FORCE_SEL_POS (4)
  893. #define PHY_RX_CHAIN_FORCE_SEL_MSK \
  894. (0x7 << PHY_RX_CHAIN_FORCE_SEL_POS)
  895. #define PHY_RX_CHAIN_FORCE_MIMO_SEL_POS (7)
  896. #define PHY_RX_CHAIN_FORCE_MIMO_SEL_MSK \
  897. (0x7 << PHY_RX_CHAIN_FORCE_MIMO_SEL_POS)
  898. #define PHY_RX_CHAIN_CNT_POS (10)
  899. #define PHY_RX_CHAIN_CNT_MSK \
  900. (0x3 << PHY_RX_CHAIN_CNT_POS)
  901. #define PHY_RX_CHAIN_MIMO_CNT_POS (12)
  902. #define PHY_RX_CHAIN_MIMO_CNT_MSK \
  903. (0x3 << PHY_RX_CHAIN_MIMO_CNT_POS)
  904. #define PHY_RX_CHAIN_MIMO_FORCE_POS (14)
  905. #define PHY_RX_CHAIN_MIMO_FORCE_MSK \
  906. (0x1 << PHY_RX_CHAIN_MIMO_FORCE_POS)
  907. /* TODO: fix the value, make it depend on firmware at runtime? */
  908. #define NUM_PHY_CTX 3
  909. /* TODO: complete missing documentation */
  910. /**
  911. * struct iwl_phy_context_cmd - config of the PHY context
  912. * ( PHY_CONTEXT_CMD = 0x8 )
  913. * @id_and_color: ID and color of the relevant Binding
  914. * @action: action to perform, one of FW_CTXT_ACTION_*
  915. * @apply_time: 0 means immediate apply and context switch.
  916. * other value means apply new params after X usecs
  917. * @tx_param_color: ???
  918. * @channel_info:
  919. * @txchain_info: ???
  920. * @rxchain_info: ???
  921. * @acquisition_data: ???
  922. * @dsp_cfg_flags: set to 0
  923. */
  924. struct iwl_phy_context_cmd {
  925. /* COMMON_INDEX_HDR_API_S_VER_1 */
  926. __le32 id_and_color;
  927. __le32 action;
  928. /* PHY_CONTEXT_DATA_API_S_VER_1 */
  929. __le32 apply_time;
  930. __le32 tx_param_color;
  931. struct iwl_fw_channel_info ci;
  932. __le32 txchain_info;
  933. __le32 rxchain_info;
  934. __le32 acquisition_data;
  935. __le32 dsp_cfg_flags;
  936. } __packed; /* PHY_CONTEXT_CMD_API_VER_1 */
  937. /*
  938. * Aux ROC command
  939. *
  940. * Command requests the firmware to create a time event for a certain duration
  941. * and remain on the given channel. This is done by using the Aux framework in
  942. * the FW.
  943. * The command was first used for Hot Spot issues - but can be used regardless
  944. * to Hot Spot.
  945. *
  946. * ( HOT_SPOT_CMD 0x53 )
  947. *
  948. * @id_and_color: ID and color of the MAC
  949. * @action: action to perform, one of FW_CTXT_ACTION_*
  950. * @event_unique_id: If the action FW_CTXT_ACTION_REMOVE then the
  951. * event_unique_id should be the id of the time event assigned by ucode.
  952. * Otherwise ignore the event_unique_id.
  953. * @sta_id_and_color: station id and color, resumed during "Remain On Channel"
  954. * activity.
  955. * @channel_info: channel info
  956. * @node_addr: Our MAC Address
  957. * @reserved: reserved for alignment
  958. * @apply_time: GP2 value to start (should always be the current GP2 value)
  959. * @apply_time_max_delay: Maximum apply time delay value in TU. Defines max
  960. * time by which start of the event is allowed to be postponed.
  961. * @duration: event duration in TU To calculate event duration:
  962. * timeEventDuration = min(duration, remainingQuota)
  963. */
  964. struct iwl_hs20_roc_req {
  965. /* COMMON_INDEX_HDR_API_S_VER_1 hdr */
  966. __le32 id_and_color;
  967. __le32 action;
  968. __le32 event_unique_id;
  969. __le32 sta_id_and_color;
  970. struct iwl_fw_channel_info channel_info;
  971. u8 node_addr[ETH_ALEN];
  972. __le16 reserved;
  973. __le32 apply_time;
  974. __le32 apply_time_max_delay;
  975. __le32 duration;
  976. } __packed; /* HOT_SPOT_CMD_API_S_VER_1 */
  977. /*
  978. * values for AUX ROC result values
  979. */
  980. enum iwl_mvm_hot_spot {
  981. HOT_SPOT_RSP_STATUS_OK,
  982. HOT_SPOT_RSP_STATUS_TOO_MANY_EVENTS,
  983. HOT_SPOT_MAX_NUM_OF_SESSIONS,
  984. };
  985. /*
  986. * Aux ROC command response
  987. *
  988. * In response to iwl_hs20_roc_req the FW sends this command to notify the
  989. * driver the uid of the timevent.
  990. *
  991. * ( HOT_SPOT_CMD 0x53 )
  992. *
  993. * @event_unique_id: Unique ID of time event assigned by ucode
  994. * @status: Return status 0 is success, all the rest used for specific errors
  995. */
  996. struct iwl_hs20_roc_res {
  997. __le32 event_unique_id;
  998. __le32 status;
  999. } __packed; /* HOT_SPOT_RSP_API_S_VER_1 */
  1000. /**
  1001. * struct iwl_radio_version_notif - information on the radio version
  1002. * ( RADIO_VERSION_NOTIFICATION = 0x68 )
  1003. * @radio_flavor:
  1004. * @radio_step:
  1005. * @radio_dash:
  1006. */
  1007. struct iwl_radio_version_notif {
  1008. __le32 radio_flavor;
  1009. __le32 radio_step;
  1010. __le32 radio_dash;
  1011. } __packed; /* RADIO_VERSION_NOTOFICATION_S_VER_1 */
  1012. enum iwl_card_state_flags {
  1013. CARD_ENABLED = 0x00,
  1014. HW_CARD_DISABLED = 0x01,
  1015. SW_CARD_DISABLED = 0x02,
  1016. CT_KILL_CARD_DISABLED = 0x04,
  1017. HALT_CARD_DISABLED = 0x08,
  1018. CARD_DISABLED_MSK = 0x0f,
  1019. CARD_IS_RX_ON = 0x10,
  1020. };
  1021. /**
  1022. * struct iwl_radio_version_notif - information on the radio version
  1023. * ( CARD_STATE_NOTIFICATION = 0xa1 )
  1024. * @flags: %iwl_card_state_flags
  1025. */
  1026. struct iwl_card_state_notif {
  1027. __le32 flags;
  1028. } __packed; /* CARD_STATE_NTFY_API_S_VER_1 */
  1029. /**
  1030. * struct iwl_missed_beacons_notif - information on missed beacons
  1031. * ( MISSED_BEACONS_NOTIFICATION = 0xa2 )
  1032. * @mac_id: interface ID
  1033. * @consec_missed_beacons_since_last_rx: number of consecutive missed
  1034. * beacons since last RX.
  1035. * @consec_missed_beacons: number of consecutive missed beacons
  1036. * @num_expected_beacons:
  1037. * @num_recvd_beacons:
  1038. */
  1039. struct iwl_missed_beacons_notif {
  1040. __le32 mac_id;
  1041. __le32 consec_missed_beacons_since_last_rx;
  1042. __le32 consec_missed_beacons;
  1043. __le32 num_expected_beacons;
  1044. __le32 num_recvd_beacons;
  1045. } __packed; /* MISSED_BEACON_NTFY_API_S_VER_3 */
  1046. /**
  1047. * struct iwl_mfuart_load_notif - mfuart image version & status
  1048. * ( MFUART_LOAD_NOTIFICATION = 0xb1 )
  1049. * @installed_ver: installed image version
  1050. * @external_ver: external image version
  1051. * @status: MFUART loading status
  1052. * @duration: MFUART loading time
  1053. */
  1054. struct iwl_mfuart_load_notif {
  1055. __le32 installed_ver;
  1056. __le32 external_ver;
  1057. __le32 status;
  1058. __le32 duration;
  1059. } __packed; /*MFU_LOADER_NTFY_API_S_VER_1*/
  1060. /**
  1061. * struct iwl_set_calib_default_cmd - set default value for calibration.
  1062. * ( SET_CALIB_DEFAULT_CMD = 0x8e )
  1063. * @calib_index: the calibration to set value for
  1064. * @length: of data
  1065. * @data: the value to set for the calibration result
  1066. */
  1067. struct iwl_set_calib_default_cmd {
  1068. __le16 calib_index;
  1069. __le16 length;
  1070. u8 data[0];
  1071. } __packed; /* PHY_CALIB_OVERRIDE_VALUES_S */
  1072. #define MAX_PORT_ID_NUM 2
  1073. #define MAX_MCAST_FILTERING_ADDRESSES 256
  1074. /**
  1075. * struct iwl_mcast_filter_cmd - configure multicast filter.
  1076. * @filter_own: Set 1 to filter out multicast packets sent by station itself
  1077. * @port_id: Multicast MAC addresses array specifier. This is a strange way
  1078. * to identify network interface adopted in host-device IF.
  1079. * It is used by FW as index in array of addresses. This array has
  1080. * MAX_PORT_ID_NUM members.
  1081. * @count: Number of MAC addresses in the array
  1082. * @pass_all: Set 1 to pass all multicast packets.
  1083. * @bssid: current association BSSID.
  1084. * @addr_list: Place holder for array of MAC addresses.
  1085. * IMPORTANT: add padding if necessary to ensure DWORD alignment.
  1086. */
  1087. struct iwl_mcast_filter_cmd {
  1088. u8 filter_own;
  1089. u8 port_id;
  1090. u8 count;
  1091. u8 pass_all;
  1092. u8 bssid[6];
  1093. u8 reserved[2];
  1094. u8 addr_list[0];
  1095. } __packed; /* MCAST_FILTERING_CMD_API_S_VER_1 */
  1096. #define MAX_BCAST_FILTERS 8
  1097. #define MAX_BCAST_FILTER_ATTRS 2
  1098. /**
  1099. * enum iwl_mvm_bcast_filter_attr_offset - written by fw for each Rx packet
  1100. * @BCAST_FILTER_OFFSET_PAYLOAD_START: offset is from payload start.
  1101. * @BCAST_FILTER_OFFSET_IP_END: offset is from ip header end (i.e.
  1102. * start of ip payload).
  1103. */
  1104. enum iwl_mvm_bcast_filter_attr_offset {
  1105. BCAST_FILTER_OFFSET_PAYLOAD_START = 0,
  1106. BCAST_FILTER_OFFSET_IP_END = 1,
  1107. };
  1108. /**
  1109. * struct iwl_fw_bcast_filter_attr - broadcast filter attribute
  1110. * @offset_type: &enum iwl_mvm_bcast_filter_attr_offset.
  1111. * @offset: starting offset of this pattern.
  1112. * @val: value to match - big endian (MSB is the first
  1113. * byte to match from offset pos).
  1114. * @mask: mask to match (big endian).
  1115. */
  1116. struct iwl_fw_bcast_filter_attr {
  1117. u8 offset_type;
  1118. u8 offset;
  1119. __le16 reserved1;
  1120. __be32 val;
  1121. __be32 mask;
  1122. } __packed; /* BCAST_FILTER_ATT_S_VER_1 */
  1123. /**
  1124. * enum iwl_mvm_bcast_filter_frame_type - filter frame type
  1125. * @BCAST_FILTER_FRAME_TYPE_ALL: consider all frames.
  1126. * @BCAST_FILTER_FRAME_TYPE_IPV4: consider only ipv4 frames
  1127. */
  1128. enum iwl_mvm_bcast_filter_frame_type {
  1129. BCAST_FILTER_FRAME_TYPE_ALL = 0,
  1130. BCAST_FILTER_FRAME_TYPE_IPV4 = 1,
  1131. };
  1132. /**
  1133. * struct iwl_fw_bcast_filter - broadcast filter
  1134. * @discard: discard frame (1) or let it pass (0).
  1135. * @frame_type: &enum iwl_mvm_bcast_filter_frame_type.
  1136. * @num_attrs: number of valid attributes in this filter.
  1137. * @attrs: attributes of this filter. a filter is considered matched
  1138. * only when all its attributes are matched (i.e. AND relationship)
  1139. */
  1140. struct iwl_fw_bcast_filter {
  1141. u8 discard;
  1142. u8 frame_type;
  1143. u8 num_attrs;
  1144. u8 reserved1;
  1145. struct iwl_fw_bcast_filter_attr attrs[MAX_BCAST_FILTER_ATTRS];
  1146. } __packed; /* BCAST_FILTER_S_VER_1 */
  1147. #define BA_WINDOW_STREAMS_MAX 16
  1148. #define BA_WINDOW_STATUS_TID_MSK 0x000F
  1149. #define BA_WINDOW_STATUS_STA_ID_POS 4
  1150. #define BA_WINDOW_STATUS_STA_ID_MSK 0x01F0
  1151. #define BA_WINDOW_STATUS_VALID_MSK BIT(9)
  1152. /**
  1153. * struct iwl_ba_window_status_notif - reordering window's status notification
  1154. * @bitmap: bitmap of received frames [start_seq_num + 0]..[start_seq_num + 63]
  1155. * @ra_tid: bit 3:0 - TID, bit 8:4 - STA_ID, bit 9 - valid
  1156. * @start_seq_num: the start sequence number of the bitmap
  1157. * @mpdu_rx_count: the number of received MPDUs since entering D0i3
  1158. */
  1159. struct iwl_ba_window_status_notif {
  1160. __le64 bitmap[BA_WINDOW_STREAMS_MAX];
  1161. __le16 ra_tid[BA_WINDOW_STREAMS_MAX];
  1162. __le32 start_seq_num[BA_WINDOW_STREAMS_MAX];
  1163. __le16 mpdu_rx_count[BA_WINDOW_STREAMS_MAX];
  1164. } __packed; /* BA_WINDOW_STATUS_NTFY_API_S_VER_1 */
  1165. /**
  1166. * struct iwl_fw_bcast_mac - per-mac broadcast filtering configuration.
  1167. * @default_discard: default action for this mac (discard (1) / pass (0)).
  1168. * @attached_filters: bitmap of relevant filters for this mac.
  1169. */
  1170. struct iwl_fw_bcast_mac {
  1171. u8 default_discard;
  1172. u8 reserved1;
  1173. __le16 attached_filters;
  1174. } __packed; /* BCAST_MAC_CONTEXT_S_VER_1 */
  1175. /**
  1176. * struct iwl_bcast_filter_cmd - broadcast filtering configuration
  1177. * @disable: enable (0) / disable (1)
  1178. * @max_bcast_filters: max number of filters (MAX_BCAST_FILTERS)
  1179. * @max_macs: max number of macs (NUM_MAC_INDEX_DRIVER)
  1180. * @filters: broadcast filters
  1181. * @macs: broadcast filtering configuration per-mac
  1182. */
  1183. struct iwl_bcast_filter_cmd {
  1184. u8 disable;
  1185. u8 max_bcast_filters;
  1186. u8 max_macs;
  1187. u8 reserved1;
  1188. struct iwl_fw_bcast_filter filters[MAX_BCAST_FILTERS];
  1189. struct iwl_fw_bcast_mac macs[NUM_MAC_INDEX_DRIVER];
  1190. } __packed; /* BCAST_FILTERING_HCMD_API_S_VER_1 */
  1191. /*
  1192. * enum iwl_mvm_marker_id - maker ids
  1193. *
  1194. * The ids for different type of markers to insert into the usniffer logs
  1195. */
  1196. enum iwl_mvm_marker_id {
  1197. MARKER_ID_TX_FRAME_LATENCY = 1,
  1198. }; /* MARKER_ID_API_E_VER_1 */
  1199. /**
  1200. * struct iwl_mvm_marker - mark info into the usniffer logs
  1201. *
  1202. * (MARKER_CMD = 0xcb)
  1203. *
  1204. * Mark the UTC time stamp into the usniffer logs together with additional
  1205. * metadata, so the usniffer output can be parsed.
  1206. * In the command response the ucode will return the GP2 time.
  1207. *
  1208. * @dw_len: The amount of dwords following this byte including this byte.
  1209. * @marker_id: A unique marker id (iwl_mvm_marker_id).
  1210. * @reserved: reserved.
  1211. * @timestamp: in milliseconds since 1970-01-01 00:00:00 UTC
  1212. * @metadata: additional meta data that will be written to the unsiffer log
  1213. */
  1214. struct iwl_mvm_marker {
  1215. u8 dwLen;
  1216. u8 markerId;
  1217. __le16 reserved;
  1218. __le64 timestamp;
  1219. __le32 metadata[0];
  1220. } __packed; /* MARKER_API_S_VER_1 */
  1221. /*
  1222. * enum iwl_dc2dc_config_id - flag ids
  1223. *
  1224. * Ids of dc2dc configuration flags
  1225. */
  1226. enum iwl_dc2dc_config_id {
  1227. DCDC_LOW_POWER_MODE_MSK_SET = 0x1, /* not used */
  1228. DCDC_FREQ_TUNE_SET = 0x2,
  1229. }; /* MARKER_ID_API_E_VER_1 */
  1230. /**
  1231. * struct iwl_dc2dc_config_cmd - configure dc2dc values
  1232. *
  1233. * (DC2DC_CONFIG_CMD = 0x83)
  1234. *
  1235. * Set/Get & configure dc2dc values.
  1236. * The command always returns the current dc2dc values.
  1237. *
  1238. * @flags: set/get dc2dc
  1239. * @enable_low_power_mode: not used.
  1240. * @dc2dc_freq_tune0: frequency divider - digital domain
  1241. * @dc2dc_freq_tune1: frequency divider - analog domain
  1242. */
  1243. struct iwl_dc2dc_config_cmd {
  1244. __le32 flags;
  1245. __le32 enable_low_power_mode; /* not used */
  1246. __le32 dc2dc_freq_tune0;
  1247. __le32 dc2dc_freq_tune1;
  1248. } __packed; /* DC2DC_CONFIG_CMD_API_S_VER_1 */
  1249. /**
  1250. * struct iwl_dc2dc_config_resp - response for iwl_dc2dc_config_cmd
  1251. *
  1252. * Current dc2dc values returned by the FW.
  1253. *
  1254. * @dc2dc_freq_tune0: frequency divider - digital domain
  1255. * @dc2dc_freq_tune1: frequency divider - analog domain
  1256. */
  1257. struct iwl_dc2dc_config_resp {
  1258. __le32 dc2dc_freq_tune0;
  1259. __le32 dc2dc_freq_tune1;
  1260. } __packed; /* DC2DC_CONFIG_RESP_API_S_VER_1 */
  1261. /***********************************
  1262. * Smart Fifo API
  1263. ***********************************/
  1264. /* Smart Fifo state */
  1265. enum iwl_sf_state {
  1266. SF_LONG_DELAY_ON = 0, /* should never be called by driver */
  1267. SF_FULL_ON,
  1268. SF_UNINIT,
  1269. SF_INIT_OFF,
  1270. SF_HW_NUM_STATES
  1271. };
  1272. /* Smart Fifo possible scenario */
  1273. enum iwl_sf_scenario {
  1274. SF_SCENARIO_SINGLE_UNICAST,
  1275. SF_SCENARIO_AGG_UNICAST,
  1276. SF_SCENARIO_MULTICAST,
  1277. SF_SCENARIO_BA_RESP,
  1278. SF_SCENARIO_TX_RESP,
  1279. SF_NUM_SCENARIO
  1280. };
  1281. #define SF_TRANSIENT_STATES_NUMBER 2 /* SF_LONG_DELAY_ON and SF_FULL_ON */
  1282. #define SF_NUM_TIMEOUT_TYPES 2 /* Aging timer and Idle timer */
  1283. /* smart FIFO default values */
  1284. #define SF_W_MARK_SISO 6144
  1285. #define SF_W_MARK_MIMO2 8192
  1286. #define SF_W_MARK_MIMO3 6144
  1287. #define SF_W_MARK_LEGACY 4096
  1288. #define SF_W_MARK_SCAN 4096
  1289. /* SF Scenarios timers for default configuration (aligned to 32 uSec) */
  1290. #define SF_SINGLE_UNICAST_IDLE_TIMER_DEF 160 /* 150 uSec */
  1291. #define SF_SINGLE_UNICAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
  1292. #define SF_AGG_UNICAST_IDLE_TIMER_DEF 160 /* 150 uSec */
  1293. #define SF_AGG_UNICAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
  1294. #define SF_MCAST_IDLE_TIMER_DEF 160 /* 150 mSec */
  1295. #define SF_MCAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
  1296. #define SF_BA_IDLE_TIMER_DEF 160 /* 150 uSec */
  1297. #define SF_BA_AGING_TIMER_DEF 400 /* 0.4 mSec */
  1298. #define SF_TX_RE_IDLE_TIMER_DEF 160 /* 150 uSec */
  1299. #define SF_TX_RE_AGING_TIMER_DEF 400 /* 0.4 mSec */
  1300. /* SF Scenarios timers for BSS MAC configuration (aligned to 32 uSec) */
  1301. #define SF_SINGLE_UNICAST_IDLE_TIMER 320 /* 300 uSec */
  1302. #define SF_SINGLE_UNICAST_AGING_TIMER 2016 /* 2 mSec */
  1303. #define SF_AGG_UNICAST_IDLE_TIMER 320 /* 300 uSec */
  1304. #define SF_AGG_UNICAST_AGING_TIMER 2016 /* 2 mSec */
  1305. #define SF_MCAST_IDLE_TIMER 2016 /* 2 mSec */
  1306. #define SF_MCAST_AGING_TIMER 10016 /* 10 mSec */
  1307. #define SF_BA_IDLE_TIMER 320 /* 300 uSec */
  1308. #define SF_BA_AGING_TIMER 2016 /* 2 mSec */
  1309. #define SF_TX_RE_IDLE_TIMER 320 /* 300 uSec */
  1310. #define SF_TX_RE_AGING_TIMER 2016 /* 2 mSec */
  1311. #define SF_LONG_DELAY_AGING_TIMER 1000000 /* 1 Sec */
  1312. #define SF_CFG_DUMMY_NOTIF_OFF BIT(16)
  1313. /**
  1314. * Smart Fifo configuration command.
  1315. * @state: smart fifo state, types listed in enum %iwl_sf_sate.
  1316. * @watermark: Minimum allowed availabe free space in RXF for transient state.
  1317. * @long_delay_timeouts: aging and idle timer values for each scenario
  1318. * in long delay state.
  1319. * @full_on_timeouts: timer values for each scenario in full on state.
  1320. */
  1321. struct iwl_sf_cfg_cmd {
  1322. __le32 state;
  1323. __le32 watermark[SF_TRANSIENT_STATES_NUMBER];
  1324. __le32 long_delay_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES];
  1325. __le32 full_on_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES];
  1326. } __packed; /* SF_CFG_API_S_VER_2 */
  1327. /***********************************
  1328. * Location Aware Regulatory (LAR) API - MCC updates
  1329. ***********************************/
  1330. /**
  1331. * struct iwl_mcc_update_cmd_v1 - Request the device to update geographic
  1332. * regulatory profile according to the given MCC (Mobile Country Code).
  1333. * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
  1334. * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
  1335. * MCC in the cmd response will be the relevant MCC in the NVM.
  1336. * @mcc: given mobile country code
  1337. * @source_id: the source from where we got the MCC, see iwl_mcc_source
  1338. * @reserved: reserved for alignment
  1339. */
  1340. struct iwl_mcc_update_cmd_v1 {
  1341. __le16 mcc;
  1342. u8 source_id;
  1343. u8 reserved;
  1344. } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_1 */
  1345. /**
  1346. * struct iwl_mcc_update_cmd - Request the device to update geographic
  1347. * regulatory profile according to the given MCC (Mobile Country Code).
  1348. * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
  1349. * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
  1350. * MCC in the cmd response will be the relevant MCC in the NVM.
  1351. * @mcc: given mobile country code
  1352. * @source_id: the source from where we got the MCC, see iwl_mcc_source
  1353. * @reserved: reserved for alignment
  1354. * @key: integrity key for MCC API OEM testing
  1355. * @reserved2: reserved
  1356. */
  1357. struct iwl_mcc_update_cmd {
  1358. __le16 mcc;
  1359. u8 source_id;
  1360. u8 reserved;
  1361. __le32 key;
  1362. __le32 reserved2[5];
  1363. } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */
  1364. /**
  1365. * iwl_mcc_update_resp_v1 - response to MCC_UPDATE_CMD.
  1366. * Contains the new channel control profile map, if changed, and the new MCC
  1367. * (mobile country code).
  1368. * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
  1369. * @status: see &enum iwl_mcc_update_status
  1370. * @mcc: the new applied MCC
  1371. * @cap: capabilities for all channels which matches the MCC
  1372. * @source_id: the MCC source, see iwl_mcc_source
  1373. * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
  1374. * channels, depending on platform)
  1375. * @channels: channel control data map, DWORD for each channel. Only the first
  1376. * 16bits are used.
  1377. */
  1378. struct iwl_mcc_update_resp_v1 {
  1379. __le32 status;
  1380. __le16 mcc;
  1381. u8 cap;
  1382. u8 source_id;
  1383. __le32 n_channels;
  1384. __le32 channels[0];
  1385. } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_1 */
  1386. /**
  1387. * iwl_mcc_update_resp - response to MCC_UPDATE_CMD.
  1388. * Contains the new channel control profile map, if changed, and the new MCC
  1389. * (mobile country code).
  1390. * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
  1391. * @status: see &enum iwl_mcc_update_status
  1392. * @mcc: the new applied MCC
  1393. * @cap: capabilities for all channels which matches the MCC
  1394. * @source_id: the MCC source, see iwl_mcc_source
  1395. * @time: time elapsed from the MCC test start (in 30 seconds TU)
  1396. * @reserved: reserved.
  1397. * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
  1398. * channels, depending on platform)
  1399. * @channels: channel control data map, DWORD for each channel. Only the first
  1400. * 16bits are used.
  1401. */
  1402. struct iwl_mcc_update_resp {
  1403. __le32 status;
  1404. __le16 mcc;
  1405. u8 cap;
  1406. u8 source_id;
  1407. __le16 time;
  1408. __le16 reserved;
  1409. __le32 n_channels;
  1410. __le32 channels[0];
  1411. } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_2 */
  1412. /**
  1413. * struct iwl_mcc_chub_notif - chub notifies of mcc change
  1414. * (MCC_CHUB_UPDATE_CMD = 0xc9)
  1415. * The Chub (Communication Hub, CommsHUB) is a HW component that connects to
  1416. * the cellular and connectivity cores that gets updates of the mcc, and
  1417. * notifies the ucode directly of any mcc change.
  1418. * The ucode requests the driver to request the device to update geographic
  1419. * regulatory profile according to the given MCC (Mobile Country Code).
  1420. * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
  1421. * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
  1422. * MCC in the cmd response will be the relevant MCC in the NVM.
  1423. * @mcc: given mobile country code
  1424. * @source_id: identity of the change originator, see iwl_mcc_source
  1425. * @reserved1: reserved for alignment
  1426. */
  1427. struct iwl_mcc_chub_notif {
  1428. u16 mcc;
  1429. u8 source_id;
  1430. u8 reserved1;
  1431. } __packed; /* LAR_MCC_NOTIFY_S */
  1432. enum iwl_mcc_update_status {
  1433. MCC_RESP_NEW_CHAN_PROFILE,
  1434. MCC_RESP_SAME_CHAN_PROFILE,
  1435. MCC_RESP_INVALID,
  1436. MCC_RESP_NVM_DISABLED,
  1437. MCC_RESP_ILLEGAL,
  1438. MCC_RESP_LOW_PRIORITY,
  1439. MCC_RESP_TEST_MODE_ACTIVE,
  1440. MCC_RESP_TEST_MODE_NOT_ACTIVE,
  1441. MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE,
  1442. };
  1443. enum iwl_mcc_source {
  1444. MCC_SOURCE_OLD_FW = 0,
  1445. MCC_SOURCE_ME = 1,
  1446. MCC_SOURCE_BIOS = 2,
  1447. MCC_SOURCE_3G_LTE_HOST = 3,
  1448. MCC_SOURCE_3G_LTE_DEVICE = 4,
  1449. MCC_SOURCE_WIFI = 5,
  1450. MCC_SOURCE_RESERVED = 6,
  1451. MCC_SOURCE_DEFAULT = 7,
  1452. MCC_SOURCE_UNINITIALIZED = 8,
  1453. MCC_SOURCE_MCC_API = 9,
  1454. MCC_SOURCE_GET_CURRENT = 0x10,
  1455. MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,
  1456. };
  1457. /* DTS measurements */
  1458. enum iwl_dts_measurement_flags {
  1459. DTS_TRIGGER_CMD_FLAGS_TEMP = BIT(0),
  1460. DTS_TRIGGER_CMD_FLAGS_VOLT = BIT(1),
  1461. };
  1462. /**
  1463. * iwl_dts_measurement_cmd - request DTS temperature and/or voltage measurements
  1464. *
  1465. * @flags: indicates which measurements we want as specified in &enum
  1466. * iwl_dts_measurement_flags
  1467. */
  1468. struct iwl_dts_measurement_cmd {
  1469. __le32 flags;
  1470. } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_CMD_S */
  1471. /**
  1472. * enum iwl_dts_control_measurement_mode - DTS measurement type
  1473. * @DTS_AUTOMATIC: Automatic mode (full SW control). Provide temperature read
  1474. * back (latest value. Not waiting for new value). Use automatic
  1475. * SW DTS configuration.
  1476. * @DTS_REQUEST_READ: Request DTS read. Configure DTS with manual settings,
  1477. * trigger DTS reading and provide read back temperature read
  1478. * when available.
  1479. * @DTS_OVER_WRITE: over-write the DTS temperatures in the SW until next read
  1480. * @DTS_DIRECT_WITHOUT_MEASURE: DTS returns its latest temperature result,
  1481. * without measurement trigger.
  1482. */
  1483. enum iwl_dts_control_measurement_mode {
  1484. DTS_AUTOMATIC = 0,
  1485. DTS_REQUEST_READ = 1,
  1486. DTS_OVER_WRITE = 2,
  1487. DTS_DIRECT_WITHOUT_MEASURE = 3,
  1488. };
  1489. /**
  1490. * enum iwl_dts_used - DTS to use or used for measurement in the DTS request
  1491. * @DTS_USE_TOP: Top
  1492. * @DTS_USE_CHAIN_A: chain A
  1493. * @DTS_USE_CHAIN_B: chain B
  1494. * @DTS_USE_CHAIN_C: chain C
  1495. * @XTAL_TEMPERATURE - read temperature from xtal
  1496. */
  1497. enum iwl_dts_used {
  1498. DTS_USE_TOP = 0,
  1499. DTS_USE_CHAIN_A = 1,
  1500. DTS_USE_CHAIN_B = 2,
  1501. DTS_USE_CHAIN_C = 3,
  1502. XTAL_TEMPERATURE = 4,
  1503. };
  1504. /**
  1505. * enum iwl_dts_bit_mode - bit-mode to use in DTS request read mode
  1506. * @DTS_BIT6_MODE: bit 6 mode
  1507. * @DTS_BIT8_MODE: bit 8 mode
  1508. */
  1509. enum iwl_dts_bit_mode {
  1510. DTS_BIT6_MODE = 0,
  1511. DTS_BIT8_MODE = 1,
  1512. };
  1513. /**
  1514. * iwl_ext_dts_measurement_cmd - request extended DTS temperature measurements
  1515. * @control_mode: see &enum iwl_dts_control_measurement_mode
  1516. * @temperature: used when over write DTS mode is selected
  1517. * @sensor: set temperature sensor to use. See &enum iwl_dts_used
  1518. * @avg_factor: average factor to DTS in request DTS read mode
  1519. * @bit_mode: value defines the DTS bit mode to use. See &enum iwl_dts_bit_mode
  1520. * @step_duration: step duration for the DTS
  1521. */
  1522. struct iwl_ext_dts_measurement_cmd {
  1523. __le32 control_mode;
  1524. __le32 temperature;
  1525. __le32 sensor;
  1526. __le32 avg_factor;
  1527. __le32 bit_mode;
  1528. __le32 step_duration;
  1529. } __packed; /* XVT_FW_DTS_CONTROL_MEASUREMENT_REQUEST_API_S */
  1530. /**
  1531. * struct iwl_dts_measurement_notif_v1 - measurements notification
  1532. *
  1533. * @temp: the measured temperature
  1534. * @voltage: the measured voltage
  1535. */
  1536. struct iwl_dts_measurement_notif_v1 {
  1537. __le32 temp;
  1538. __le32 voltage;
  1539. } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/
  1540. /**
  1541. * struct iwl_dts_measurement_notif_v2 - measurements notification
  1542. *
  1543. * @temp: the measured temperature
  1544. * @voltage: the measured voltage
  1545. * @threshold_idx: the trip index that was crossed
  1546. */
  1547. struct iwl_dts_measurement_notif_v2 {
  1548. __le32 temp;
  1549. __le32 voltage;
  1550. __le32 threshold_idx;
  1551. } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_2 */
  1552. /**
  1553. * struct ct_kill_notif - CT-kill entry notification
  1554. *
  1555. * @temperature: the current temperature in celsius
  1556. * @reserved: reserved
  1557. */
  1558. struct ct_kill_notif {
  1559. __le16 temperature;
  1560. __le16 reserved;
  1561. } __packed; /* GRP_PHY_CT_KILL_NTF */
  1562. /**
  1563. * enum ctdp_cmd_operation - CTDP command operations
  1564. * @CTDP_CMD_OPERATION_START: update the current budget
  1565. * @CTDP_CMD_OPERATION_STOP: stop ctdp
  1566. * @CTDP_CMD_OPERATION_REPORT: get the avgerage budget
  1567. */
  1568. enum iwl_mvm_ctdp_cmd_operation {
  1569. CTDP_CMD_OPERATION_START = 0x1,
  1570. CTDP_CMD_OPERATION_STOP = 0x2,
  1571. CTDP_CMD_OPERATION_REPORT = 0x4,
  1572. };/* CTDP_CMD_OPERATION_TYPE_E */
  1573. /**
  1574. * struct iwl_mvm_ctdp_cmd - track and manage the FW power consumption budget
  1575. *
  1576. * @operation: see &enum iwl_mvm_ctdp_cmd_operation
  1577. * @budget: the budget in milliwatt
  1578. * @window_size: defined in API but not used
  1579. */
  1580. struct iwl_mvm_ctdp_cmd {
  1581. __le32 operation;
  1582. __le32 budget;
  1583. __le32 window_size;
  1584. } __packed;
  1585. #define IWL_MAX_DTS_TRIPS 8
  1586. /**
  1587. * struct iwl_temp_report_ths_cmd - set temperature thresholds
  1588. *
  1589. * @num_temps: number of temperature thresholds passed
  1590. * @thresholds: array with the thresholds to be configured
  1591. */
  1592. struct temp_report_ths_cmd {
  1593. __le32 num_temps;
  1594. __le16 thresholds[IWL_MAX_DTS_TRIPS];
  1595. } __packed; /* GRP_PHY_TEMP_REPORTING_THRESHOLDS_CMD */
  1596. /***********************************
  1597. * TDLS API
  1598. ***********************************/
  1599. /* Type of TDLS request */
  1600. enum iwl_tdls_channel_switch_type {
  1601. TDLS_SEND_CHAN_SW_REQ = 0,
  1602. TDLS_SEND_CHAN_SW_RESP_AND_MOVE_CH,
  1603. TDLS_MOVE_CH,
  1604. }; /* TDLS_STA_CHANNEL_SWITCH_CMD_TYPE_API_E_VER_1 */
  1605. /**
  1606. * Switch timing sub-element in a TDLS channel-switch command
  1607. * @frame_timestamp: GP2 timestamp of channel-switch request/response packet
  1608. * received from peer
  1609. * @max_offchan_duration: What amount of microseconds out of a DTIM is given
  1610. * to the TDLS off-channel communication. For instance if the DTIM is
  1611. * 200TU and the TDLS peer is to be given 25% of the time, the value
  1612. * given will be 50TU, or 50 * 1024 if translated into microseconds.
  1613. * @switch_time: switch time the peer sent in its channel switch timing IE
  1614. * @switch_timout: switch timeout the peer sent in its channel switch timing IE
  1615. */
  1616. struct iwl_tdls_channel_switch_timing {
  1617. __le32 frame_timestamp; /* GP2 time of peer packet Rx */
  1618. __le32 max_offchan_duration; /* given in micro-seconds */
  1619. __le32 switch_time; /* given in micro-seconds */
  1620. __le32 switch_timeout; /* given in micro-seconds */
  1621. } __packed; /* TDLS_STA_CHANNEL_SWITCH_TIMING_DATA_API_S_VER_1 */
  1622. #define IWL_TDLS_CH_SW_FRAME_MAX_SIZE 200
  1623. /**
  1624. * TDLS channel switch frame template
  1625. *
  1626. * A template representing a TDLS channel-switch request or response frame
  1627. *
  1628. * @switch_time_offset: offset to the channel switch timing IE in the template
  1629. * @tx_cmd: Tx parameters for the frame
  1630. * @data: frame data
  1631. */
  1632. struct iwl_tdls_channel_switch_frame {
  1633. __le32 switch_time_offset;
  1634. struct iwl_tx_cmd tx_cmd;
  1635. u8 data[IWL_TDLS_CH_SW_FRAME_MAX_SIZE];
  1636. } __packed; /* TDLS_STA_CHANNEL_SWITCH_FRAME_API_S_VER_1 */
  1637. /**
  1638. * TDLS channel switch command
  1639. *
  1640. * The command is sent to initiate a channel switch and also in response to
  1641. * incoming TDLS channel-switch request/response packets from remote peers.
  1642. *
  1643. * @switch_type: see &enum iwl_tdls_channel_switch_type
  1644. * @peer_sta_id: station id of TDLS peer
  1645. * @ci: channel we switch to
  1646. * @timing: timing related data for command
  1647. * @frame: channel-switch request/response template, depending to switch_type
  1648. */
  1649. struct iwl_tdls_channel_switch_cmd {
  1650. u8 switch_type;
  1651. __le32 peer_sta_id;
  1652. struct iwl_fw_channel_info ci;
  1653. struct iwl_tdls_channel_switch_timing timing;
  1654. struct iwl_tdls_channel_switch_frame frame;
  1655. } __packed; /* TDLS_STA_CHANNEL_SWITCH_CMD_API_S_VER_1 */
  1656. /**
  1657. * TDLS channel switch start notification
  1658. *
  1659. * @status: non-zero on success
  1660. * @offchannel_duration: duration given in microseconds
  1661. * @sta_id: peer currently performing the channel-switch with
  1662. */
  1663. struct iwl_tdls_channel_switch_notif {
  1664. __le32 status;
  1665. __le32 offchannel_duration;
  1666. __le32 sta_id;
  1667. } __packed; /* TDLS_STA_CHANNEL_SWITCH_NTFY_API_S_VER_1 */
  1668. /**
  1669. * TDLS station info
  1670. *
  1671. * @sta_id: station id of the TDLS peer
  1672. * @tx_to_peer_tid: TID reserved vs. the peer for FW based Tx
  1673. * @tx_to_peer_ssn: initial SSN the FW should use for Tx on its TID vs the peer
  1674. * @is_initiator: 1 if the peer is the TDLS link initiator, 0 otherwise
  1675. */
  1676. struct iwl_tdls_sta_info {
  1677. u8 sta_id;
  1678. u8 tx_to_peer_tid;
  1679. __le16 tx_to_peer_ssn;
  1680. __le32 is_initiator;
  1681. } __packed; /* TDLS_STA_INFO_VER_1 */
  1682. /**
  1683. * TDLS basic config command
  1684. *
  1685. * @id_and_color: MAC id and color being configured
  1686. * @tdls_peer_count: amount of currently connected TDLS peers
  1687. * @tx_to_ap_tid: TID reverved vs. the AP for FW based Tx
  1688. * @tx_to_ap_ssn: initial SSN the FW should use for Tx on its TID vs. the AP
  1689. * @sta_info: per-station info. Only the first tdls_peer_count entries are set
  1690. * @pti_req_data_offset: offset of network-level data for the PTI template
  1691. * @pti_req_tx_cmd: Tx parameters for PTI request template
  1692. * @pti_req_template: PTI request template data
  1693. */
  1694. struct iwl_tdls_config_cmd {
  1695. __le32 id_and_color; /* mac id and color */
  1696. u8 tdls_peer_count;
  1697. u8 tx_to_ap_tid;
  1698. __le16 tx_to_ap_ssn;
  1699. struct iwl_tdls_sta_info sta_info[IWL_MVM_TDLS_STA_COUNT];
  1700. __le32 pti_req_data_offset;
  1701. struct iwl_tx_cmd pti_req_tx_cmd;
  1702. u8 pti_req_template[0];
  1703. } __packed; /* TDLS_CONFIG_CMD_API_S_VER_1 */
  1704. /**
  1705. * TDLS per-station config information from FW
  1706. *
  1707. * @sta_id: station id of the TDLS peer
  1708. * @tx_to_peer_last_seq: last sequence number used by FW during FW-based Tx to
  1709. * the peer
  1710. */
  1711. struct iwl_tdls_config_sta_info_res {
  1712. __le16 sta_id;
  1713. __le16 tx_to_peer_last_seq;
  1714. } __packed; /* TDLS_STA_INFO_RSP_VER_1 */
  1715. /**
  1716. * TDLS config information from FW
  1717. *
  1718. * @tx_to_ap_last_seq: last sequence number used by FW during FW-based Tx to AP
  1719. * @sta_info: per-station TDLS config information
  1720. */
  1721. struct iwl_tdls_config_res {
  1722. __le32 tx_to_ap_last_seq;
  1723. struct iwl_tdls_config_sta_info_res sta_info[IWL_MVM_TDLS_STA_COUNT];
  1724. } __packed; /* TDLS_CONFIG_RSP_API_S_VER_1 */
  1725. #define TX_FIFO_MAX_NUM 8
  1726. #define RX_FIFO_MAX_NUM 2
  1727. /**
  1728. * Shared memory configuration information from the FW
  1729. *
  1730. * @shared_mem_addr: shared memory addr (pre 8000 HW set to 0x0 as MARBH is not
  1731. * accessible)
  1732. * @shared_mem_size: shared memory size
  1733. * @sample_buff_addr: internal sample (mon/adc) buff addr (pre 8000 HW set to
  1734. * 0x0 as accessible only via DBGM RDAT)
  1735. * @sample_buff_size: internal sample buff size
  1736. * @txfifo_addr: start addr of TXF0 (excluding the context table 0.5KB), (pre
  1737. * 8000 HW set to 0x0 as not accessible)
  1738. * @txfifo_size: size of TXF0 ... TXF7
  1739. * @rxfifo_size: RXF1, RXF2 sizes. If there is no RXF2, it'll have a value of 0
  1740. * @page_buff_addr: used by UMAC and performance debug (page miss analysis),
  1741. * when paging is not supported this should be 0
  1742. * @page_buff_size: size of %page_buff_addr
  1743. */
  1744. struct iwl_shared_mem_cfg {
  1745. __le32 shared_mem_addr;
  1746. __le32 shared_mem_size;
  1747. __le32 sample_buff_addr;
  1748. __le32 sample_buff_size;
  1749. __le32 txfifo_addr;
  1750. __le32 txfifo_size[TX_FIFO_MAX_NUM];
  1751. __le32 rxfifo_size[RX_FIFO_MAX_NUM];
  1752. __le32 page_buff_addr;
  1753. __le32 page_buff_size;
  1754. } __packed; /* SHARED_MEM_ALLOC_API_S_VER_1 */
  1755. /**
  1756. * VHT MU-MIMO group configuration
  1757. *
  1758. * @membership_status: a bitmap of MU groups
  1759. * @user_position:the position of station in a group. If the station is in the
  1760. * group then bits (group * 2) is the position -1
  1761. */
  1762. struct iwl_mu_group_mgmt_cmd {
  1763. __le32 reserved;
  1764. __le32 membership_status[2];
  1765. __le32 user_position[4];
  1766. } __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */
  1767. /**
  1768. * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification
  1769. *
  1770. * @membership_status: a bitmap of MU groups
  1771. * @user_position: the position of station in a group. If the station is in the
  1772. * group then bits (group * 2) is the position -1
  1773. */
  1774. struct iwl_mu_group_mgmt_notif {
  1775. __le32 membership_status[2];
  1776. __le32 user_position[4];
  1777. } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */
  1778. #define MAX_STORED_BEACON_SIZE 600
  1779. /**
  1780. * Stored beacon notification
  1781. *
  1782. * @system_time: system time on air rise
  1783. * @tsf: TSF on air rise
  1784. * @beacon_timestamp: beacon on air rise
  1785. * @phy_flags: general phy flags: band, modulation, etc.
  1786. * @channel: channel this beacon was received on
  1787. * @rates: rate in ucode internal format
  1788. * @byte_count: frame's byte count
  1789. */
  1790. struct iwl_stored_beacon_notif {
  1791. __le32 system_time;
  1792. __le64 tsf;
  1793. __le32 beacon_timestamp;
  1794. __le16 phy_flags;
  1795. __le16 channel;
  1796. __le32 rates;
  1797. __le32 byte_count;
  1798. u8 data[MAX_STORED_BEACON_SIZE];
  1799. } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_1 */
  1800. #endif /* __fw_api_h__ */