fw-api.h 59 KB

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