fw-api.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  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 - 2013 Intel Corporation. All rights reserved.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of version 2 of the GNU General Public License as
  12. * published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
  22. * USA
  23. *
  24. * The full GNU General Public License is included in this distribution
  25. * in the file called COPYING.
  26. *
  27. * Contact Information:
  28. * Intel Linux Wireless <ilw@linux.intel.com>
  29. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  30. *
  31. * BSD LICENSE
  32. *
  33. * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved.
  34. * All rights reserved.
  35. *
  36. * Redistribution and use in source and binary forms, with or without
  37. * modification, are permitted provided that the following conditions
  38. * are met:
  39. *
  40. * * Redistributions of source code must retain the above copyright
  41. * notice, this list of conditions and the following disclaimer.
  42. * * Redistributions in binary form must reproduce the above copyright
  43. * notice, this list of conditions and the following disclaimer in
  44. * the documentation and/or other materials provided with the
  45. * distribution.
  46. * * Neither the name Intel Corporation nor the names of its
  47. * contributors may be used to endorse or promote products derived
  48. * from this software without specific prior written permission.
  49. *
  50. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  51. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  52. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  53. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  54. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  55. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  56. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  57. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  58. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  59. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  60. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  61. *
  62. *****************************************************************************/
  63. #ifndef __fw_api_h__
  64. #define __fw_api_h__
  65. #include "fw-api-rs.h"
  66. #include "fw-api-tx.h"
  67. #include "fw-api-sta.h"
  68. #include "fw-api-mac.h"
  69. #include "fw-api-power.h"
  70. #include "fw-api-d3.h"
  71. #include "fw-api-bt-coex.h"
  72. /* queue and FIFO numbers by usage */
  73. enum {
  74. IWL_MVM_OFFCHANNEL_QUEUE = 8,
  75. IWL_MVM_CMD_QUEUE = 9,
  76. IWL_MVM_AUX_QUEUE = 15,
  77. IWL_MVM_FIRST_AGG_QUEUE = 16,
  78. IWL_MVM_NUM_QUEUES = 20,
  79. IWL_MVM_LAST_AGG_QUEUE = IWL_MVM_NUM_QUEUES - 1,
  80. IWL_MVM_CMD_FIFO = 7
  81. };
  82. #define IWL_MVM_STATION_COUNT 16
  83. /* commands */
  84. enum {
  85. MVM_ALIVE = 0x1,
  86. REPLY_ERROR = 0x2,
  87. INIT_COMPLETE_NOTIF = 0x4,
  88. /* PHY context commands */
  89. PHY_CONTEXT_CMD = 0x8,
  90. DBG_CFG = 0x9,
  91. /* station table */
  92. ADD_STA = 0x18,
  93. REMOVE_STA = 0x19,
  94. /* TX */
  95. TX_CMD = 0x1c,
  96. TXPATH_FLUSH = 0x1e,
  97. MGMT_MCAST_KEY = 0x1f,
  98. /* global key */
  99. WEP_KEY = 0x20,
  100. /* MAC and Binding commands */
  101. MAC_CONTEXT_CMD = 0x28,
  102. TIME_EVENT_CMD = 0x29, /* both CMD and response */
  103. TIME_EVENT_NOTIFICATION = 0x2a,
  104. BINDING_CONTEXT_CMD = 0x2b,
  105. TIME_QUOTA_CMD = 0x2c,
  106. LQ_CMD = 0x4e,
  107. /* Calibration */
  108. TEMPERATURE_NOTIFICATION = 0x62,
  109. CALIBRATION_CFG_CMD = 0x65,
  110. CALIBRATION_RES_NOTIFICATION = 0x66,
  111. CALIBRATION_COMPLETE_NOTIFICATION = 0x67,
  112. RADIO_VERSION_NOTIFICATION = 0x68,
  113. /* Scan offload */
  114. SCAN_OFFLOAD_REQUEST_CMD = 0x51,
  115. SCAN_OFFLOAD_ABORT_CMD = 0x52,
  116. SCAN_OFFLOAD_COMPLETE = 0x6D,
  117. SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6E,
  118. SCAN_OFFLOAD_CONFIG_CMD = 0x6f,
  119. /* Phy */
  120. PHY_CONFIGURATION_CMD = 0x6a,
  121. CALIB_RES_NOTIF_PHY_DB = 0x6b,
  122. /* PHY_DB_CMD = 0x6c, */
  123. /* Power */
  124. POWER_TABLE_CMD = 0x77,
  125. /* Scanning */
  126. SCAN_REQUEST_CMD = 0x80,
  127. SCAN_ABORT_CMD = 0x81,
  128. SCAN_START_NOTIFICATION = 0x82,
  129. SCAN_RESULTS_NOTIFICATION = 0x83,
  130. SCAN_COMPLETE_NOTIFICATION = 0x84,
  131. /* NVM */
  132. NVM_ACCESS_CMD = 0x88,
  133. SET_CALIB_DEFAULT_CMD = 0x8e,
  134. BEACON_NOTIFICATION = 0x90,
  135. BEACON_TEMPLATE_CMD = 0x91,
  136. TX_ANT_CONFIGURATION_CMD = 0x98,
  137. BT_CONFIG = 0x9b,
  138. STATISTICS_NOTIFICATION = 0x9d,
  139. /* RF-KILL commands and notifications */
  140. CARD_STATE_CMD = 0xa0,
  141. CARD_STATE_NOTIFICATION = 0xa1,
  142. REPLY_RX_PHY_CMD = 0xc0,
  143. REPLY_RX_MPDU_CMD = 0xc1,
  144. BA_NOTIF = 0xc5,
  145. /* BT Coex */
  146. BT_COEX_PRIO_TABLE = 0xcc,
  147. BT_COEX_PROT_ENV = 0xcd,
  148. BT_PROFILE_NOTIFICATION = 0xce,
  149. REPLY_DEBUG_CMD = 0xf0,
  150. DEBUG_LOG_MSG = 0xf7,
  151. /* D3 commands/notifications */
  152. D3_CONFIG_CMD = 0xd3,
  153. PROT_OFFLOAD_CONFIG_CMD = 0xd4,
  154. OFFLOADS_QUERY_CMD = 0xd5,
  155. REMOTE_WAKE_CONFIG_CMD = 0xd6,
  156. /* for WoWLAN in particular */
  157. WOWLAN_PATTERNS = 0xe0,
  158. WOWLAN_CONFIGURATION = 0xe1,
  159. WOWLAN_TSC_RSC_PARAM = 0xe2,
  160. WOWLAN_TKIP_PARAM = 0xe3,
  161. WOWLAN_KEK_KCK_MATERIAL = 0xe4,
  162. WOWLAN_GET_STATUSES = 0xe5,
  163. WOWLAN_TX_POWER_PER_DB = 0xe6,
  164. /* and for NetDetect */
  165. NET_DETECT_CONFIG_CMD = 0x54,
  166. NET_DETECT_PROFILES_QUERY_CMD = 0x56,
  167. NET_DETECT_PROFILES_CMD = 0x57,
  168. NET_DETECT_HOTSPOTS_CMD = 0x58,
  169. NET_DETECT_HOTSPOTS_QUERY_CMD = 0x59,
  170. REPLY_MAX = 0xff,
  171. };
  172. /**
  173. * struct iwl_cmd_response - generic response struct for most commands
  174. * @status: status of the command asked, changes for each one
  175. */
  176. struct iwl_cmd_response {
  177. __le32 status;
  178. };
  179. /*
  180. * struct iwl_tx_ant_cfg_cmd
  181. * @valid: valid antenna configuration
  182. */
  183. struct iwl_tx_ant_cfg_cmd {
  184. __le32 valid;
  185. } __packed;
  186. /*
  187. * Calibration control struct.
  188. * Sent as part of the phy configuration command.
  189. * @flow_trigger: bitmap for which calibrations to perform according to
  190. * flow triggers.
  191. * @event_trigger: bitmap for which calibrations to perform according to
  192. * event triggers.
  193. */
  194. struct iwl_calib_ctrl {
  195. __le32 flow_trigger;
  196. __le32 event_trigger;
  197. } __packed;
  198. /* This enum defines the bitmap of various calibrations to enable in both
  199. * init ucode and runtime ucode through CALIBRATION_CFG_CMD.
  200. */
  201. enum iwl_calib_cfg {
  202. IWL_CALIB_CFG_XTAL_IDX = BIT(0),
  203. IWL_CALIB_CFG_TEMPERATURE_IDX = BIT(1),
  204. IWL_CALIB_CFG_VOLTAGE_READ_IDX = BIT(2),
  205. IWL_CALIB_CFG_PAPD_IDX = BIT(3),
  206. IWL_CALIB_CFG_TX_PWR_IDX = BIT(4),
  207. IWL_CALIB_CFG_DC_IDX = BIT(5),
  208. IWL_CALIB_CFG_BB_FILTER_IDX = BIT(6),
  209. IWL_CALIB_CFG_LO_LEAKAGE_IDX = BIT(7),
  210. IWL_CALIB_CFG_TX_IQ_IDX = BIT(8),
  211. IWL_CALIB_CFG_TX_IQ_SKEW_IDX = BIT(9),
  212. IWL_CALIB_CFG_RX_IQ_IDX = BIT(10),
  213. IWL_CALIB_CFG_RX_IQ_SKEW_IDX = BIT(11),
  214. IWL_CALIB_CFG_SENSITIVITY_IDX = BIT(12),
  215. IWL_CALIB_CFG_CHAIN_NOISE_IDX = BIT(13),
  216. IWL_CALIB_CFG_DISCONNECTED_ANT_IDX = BIT(14),
  217. IWL_CALIB_CFG_ANT_COUPLING_IDX = BIT(15),
  218. IWL_CALIB_CFG_DAC_IDX = BIT(16),
  219. IWL_CALIB_CFG_ABS_IDX = BIT(17),
  220. IWL_CALIB_CFG_AGC_IDX = BIT(18),
  221. };
  222. /*
  223. * Phy configuration command.
  224. */
  225. struct iwl_phy_cfg_cmd {
  226. __le32 phy_cfg;
  227. struct iwl_calib_ctrl calib_control;
  228. } __packed;
  229. #define PHY_CFG_RADIO_TYPE (BIT(0) | BIT(1))
  230. #define PHY_CFG_RADIO_STEP (BIT(2) | BIT(3))
  231. #define PHY_CFG_RADIO_DASH (BIT(4) | BIT(5))
  232. #define PHY_CFG_PRODUCT_NUMBER (BIT(6) | BIT(7))
  233. #define PHY_CFG_TX_CHAIN_A BIT(8)
  234. #define PHY_CFG_TX_CHAIN_B BIT(9)
  235. #define PHY_CFG_TX_CHAIN_C BIT(10)
  236. #define PHY_CFG_RX_CHAIN_A BIT(12)
  237. #define PHY_CFG_RX_CHAIN_B BIT(13)
  238. #define PHY_CFG_RX_CHAIN_C BIT(14)
  239. /* Target of the NVM_ACCESS_CMD */
  240. enum {
  241. NVM_ACCESS_TARGET_CACHE = 0,
  242. NVM_ACCESS_TARGET_OTP = 1,
  243. NVM_ACCESS_TARGET_EEPROM = 2,
  244. };
  245. /* Section types for NVM_ACCESS_CMD */
  246. enum {
  247. NVM_SECTION_TYPE_HW = 0,
  248. NVM_SECTION_TYPE_SW,
  249. NVM_SECTION_TYPE_PAPD,
  250. NVM_SECTION_TYPE_BT,
  251. NVM_SECTION_TYPE_CALIBRATION,
  252. NVM_SECTION_TYPE_PRODUCTION,
  253. NVM_SECTION_TYPE_POST_FCS_CALIB,
  254. NVM_NUM_OF_SECTIONS,
  255. };
  256. /**
  257. * struct iwl_nvm_access_cmd_ver2 - Request the device to send an NVM section
  258. * @op_code: 0 - read, 1 - write
  259. * @target: NVM_ACCESS_TARGET_*
  260. * @type: NVM_SECTION_TYPE_*
  261. * @offset: offset in bytes into the section
  262. * @length: in bytes, to read/write
  263. * @data: if write operation, the data to write. On read its empty
  264. */
  265. struct iwl_nvm_access_cmd {
  266. u8 op_code;
  267. u8 target;
  268. __le16 type;
  269. __le16 offset;
  270. __le16 length;
  271. u8 data[];
  272. } __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */
  273. /**
  274. * struct iwl_nvm_access_resp_ver2 - response to NVM_ACCESS_CMD
  275. * @offset: offset in bytes into the section
  276. * @length: in bytes, either how much was written or read
  277. * @type: NVM_SECTION_TYPE_*
  278. * @status: 0 for success, fail otherwise
  279. * @data: if read operation, the data returned. Empty on write.
  280. */
  281. struct iwl_nvm_access_resp {
  282. __le16 offset;
  283. __le16 length;
  284. __le16 type;
  285. __le16 status;
  286. u8 data[];
  287. } __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */
  288. /* MVM_ALIVE 0x1 */
  289. /* alive response is_valid values */
  290. #define ALIVE_RESP_UCODE_OK BIT(0)
  291. #define ALIVE_RESP_RFKILL BIT(1)
  292. /* alive response ver_type values */
  293. enum {
  294. FW_TYPE_HW = 0,
  295. FW_TYPE_PROT = 1,
  296. FW_TYPE_AP = 2,
  297. FW_TYPE_WOWLAN = 3,
  298. FW_TYPE_TIMING = 4,
  299. FW_TYPE_WIPAN = 5
  300. };
  301. /* alive response ver_subtype values */
  302. enum {
  303. FW_SUBTYPE_FULL_FEATURE = 0,
  304. FW_SUBTYPE_BOOTSRAP = 1, /* Not valid */
  305. FW_SUBTYPE_REDUCED = 2,
  306. FW_SUBTYPE_ALIVE_ONLY = 3,
  307. FW_SUBTYPE_WOWLAN = 4,
  308. FW_SUBTYPE_AP_SUBTYPE = 5,
  309. FW_SUBTYPE_WIPAN = 6,
  310. FW_SUBTYPE_INITIALIZE = 9
  311. };
  312. #define IWL_ALIVE_STATUS_ERR 0xDEAD
  313. #define IWL_ALIVE_STATUS_OK 0xCAFE
  314. #define IWL_ALIVE_FLG_RFKILL BIT(0)
  315. struct mvm_alive_resp {
  316. __le16 status;
  317. __le16 flags;
  318. u8 ucode_minor;
  319. u8 ucode_major;
  320. __le16 id;
  321. u8 api_minor;
  322. u8 api_major;
  323. u8 ver_subtype;
  324. u8 ver_type;
  325. u8 mac;
  326. u8 opt;
  327. __le16 reserved2;
  328. __le32 timestamp;
  329. __le32 error_event_table_ptr; /* SRAM address for error log */
  330. __le32 log_event_table_ptr; /* SRAM address for event log */
  331. __le32 cpu_register_ptr;
  332. __le32 dbgm_config_ptr;
  333. __le32 alive_counter_ptr;
  334. __le32 scd_base_ptr; /* SRAM address for SCD */
  335. } __packed; /* ALIVE_RES_API_S_VER_1 */
  336. /* Error response/notification */
  337. enum {
  338. FW_ERR_UNKNOWN_CMD = 0x0,
  339. FW_ERR_INVALID_CMD_PARAM = 0x1,
  340. FW_ERR_SERVICE = 0x2,
  341. FW_ERR_ARC_MEMORY = 0x3,
  342. FW_ERR_ARC_CODE = 0x4,
  343. FW_ERR_WATCH_DOG = 0x5,
  344. FW_ERR_WEP_GRP_KEY_INDX = 0x10,
  345. FW_ERR_WEP_KEY_SIZE = 0x11,
  346. FW_ERR_OBSOLETE_FUNC = 0x12,
  347. FW_ERR_UNEXPECTED = 0xFE,
  348. FW_ERR_FATAL = 0xFF
  349. };
  350. /**
  351. * struct iwl_error_resp - FW error indication
  352. * ( REPLY_ERROR = 0x2 )
  353. * @error_type: one of FW_ERR_*
  354. * @cmd_id: the command ID for which the error occured
  355. * @bad_cmd_seq_num: sequence number of the erroneous command
  356. * @error_service: which service created the error, applicable only if
  357. * error_type = 2, otherwise 0
  358. * @timestamp: TSF in usecs.
  359. */
  360. struct iwl_error_resp {
  361. __le32 error_type;
  362. u8 cmd_id;
  363. u8 reserved1;
  364. __le16 bad_cmd_seq_num;
  365. __le32 error_service;
  366. __le64 timestamp;
  367. } __packed;
  368. /* Common PHY, MAC and Bindings definitions */
  369. #define MAX_MACS_IN_BINDING (3)
  370. #define MAX_BINDINGS (4)
  371. #define AUX_BINDING_INDEX (3)
  372. #define MAX_PHYS (4)
  373. /* Used to extract ID and color from the context dword */
  374. #define FW_CTXT_ID_POS (0)
  375. #define FW_CTXT_ID_MSK (0xff << FW_CTXT_ID_POS)
  376. #define FW_CTXT_COLOR_POS (8)
  377. #define FW_CTXT_COLOR_MSK (0xff << FW_CTXT_COLOR_POS)
  378. #define FW_CTXT_INVALID (0xffffffff)
  379. #define FW_CMD_ID_AND_COLOR(_id, _color) ((_id << FW_CTXT_ID_POS) |\
  380. (_color << FW_CTXT_COLOR_POS))
  381. /* Possible actions on PHYs, MACs and Bindings */
  382. enum {
  383. FW_CTXT_ACTION_STUB = 0,
  384. FW_CTXT_ACTION_ADD,
  385. FW_CTXT_ACTION_MODIFY,
  386. FW_CTXT_ACTION_REMOVE,
  387. FW_CTXT_ACTION_NUM
  388. }; /* COMMON_CONTEXT_ACTION_API_E_VER_1 */
  389. /* Time Events */
  390. /* Time Event types, according to MAC type */
  391. enum iwl_time_event_type {
  392. /* BSS Station Events */
  393. TE_BSS_STA_AGGRESSIVE_ASSOC,
  394. TE_BSS_STA_ASSOC,
  395. TE_BSS_EAP_DHCP_PROT,
  396. TE_BSS_QUIET_PERIOD,
  397. /* P2P Device Events */
  398. TE_P2P_DEVICE_DISCOVERABLE,
  399. TE_P2P_DEVICE_LISTEN,
  400. TE_P2P_DEVICE_ACTION_SCAN,
  401. TE_P2P_DEVICE_FULL_SCAN,
  402. /* P2P Client Events */
  403. TE_P2P_CLIENT_AGGRESSIVE_ASSOC,
  404. TE_P2P_CLIENT_ASSOC,
  405. TE_P2P_CLIENT_QUIET_PERIOD,
  406. /* P2P GO Events */
  407. TE_P2P_GO_ASSOC_PROT,
  408. TE_P2P_GO_REPETITIVE_NOA,
  409. TE_P2P_GO_CT_WINDOW,
  410. /* WiDi Sync Events */
  411. TE_WIDI_TX_SYNC,
  412. TE_MAX
  413. }; /* MAC_EVENT_TYPE_API_E_VER_1 */
  414. /* Time Event dependencies: none, on another TE, or in a specific time */
  415. enum {
  416. TE_INDEPENDENT = 0,
  417. TE_DEP_OTHER = 1,
  418. TE_DEP_TSF = 2,
  419. TE_EVENT_SOCIOPATHIC = 4,
  420. }; /* MAC_EVENT_DEPENDENCY_POLICY_API_E_VER_2 */
  421. /*
  422. * Supported Time event notifications configuration.
  423. * A notification (both event and fragment) includes a status indicating weather
  424. * the FW was able to schedule the event or not. For fragment start/end
  425. * notification the status is always success. There is no start/end fragment
  426. * notification for monolithic events.
  427. *
  428. * @TE_NOTIF_NONE: no notifications
  429. * @TE_NOTIF_HOST_EVENT_START: request/receive notification on event start
  430. * @TE_NOTIF_HOST_EVENT_END:request/receive notification on event end
  431. * @TE_NOTIF_INTERNAL_EVENT_START: internal FW use
  432. * @TE_NOTIF_INTERNAL_EVENT_END: internal FW use.
  433. * @TE_NOTIF_HOST_FRAG_START: request/receive notification on frag start
  434. * @TE_NOTIF_HOST_FRAG_END:request/receive notification on frag end
  435. * @TE_NOTIF_INTERNAL_FRAG_START: internal FW use.
  436. * @TE_NOTIF_INTERNAL_FRAG_END: internal FW use.
  437. */
  438. enum {
  439. TE_NOTIF_NONE = 0,
  440. TE_NOTIF_HOST_EVENT_START = 0x1,
  441. TE_NOTIF_HOST_EVENT_END = 0x2,
  442. TE_NOTIF_INTERNAL_EVENT_START = 0x4,
  443. TE_NOTIF_INTERNAL_EVENT_END = 0x8,
  444. TE_NOTIF_HOST_FRAG_START = 0x10,
  445. TE_NOTIF_HOST_FRAG_END = 0x20,
  446. TE_NOTIF_INTERNAL_FRAG_START = 0x40,
  447. TE_NOTIF_INTERNAL_FRAG_END = 0x80
  448. }; /* MAC_EVENT_ACTION_API_E_VER_2 */
  449. /*
  450. * @TE_FRAG_NONE: fragmentation of the time event is NOT allowed.
  451. * @TE_FRAG_SINGLE: fragmentation of the time event is allowed, but only
  452. * the first fragment is scheduled.
  453. * @TE_FRAG_DUAL: fragmentation of the time event is allowed, but only
  454. * the first 2 fragments are scheduled.
  455. * @TE_FRAG_ENDLESS: fragmentation of the time event is allowed, and any number
  456. * of fragments are valid.
  457. *
  458. * Other than the constant defined above, specifying a fragmentation value 'x'
  459. * means that the event can be fragmented but only the first 'x' will be
  460. * scheduled.
  461. */
  462. enum {
  463. TE_FRAG_NONE = 0,
  464. TE_FRAG_SINGLE = 1,
  465. TE_FRAG_DUAL = 2,
  466. TE_FRAG_ENDLESS = 0xffffffff
  467. };
  468. /* Repeat the time event endlessly (until removed) */
  469. #define TE_REPEAT_ENDLESS (0xffffffff)
  470. /* If a Time Event has bounded repetitions, this is the maximal value */
  471. #define TE_REPEAT_MAX_MSK (0x0fffffff)
  472. /* If a Time Event can be fragmented, this is the max number of fragments */
  473. #define TE_FRAG_MAX_MSK (0x0fffffff)
  474. /**
  475. * struct iwl_time_event_cmd - configuring Time Events
  476. * ( TIME_EVENT_CMD = 0x29 )
  477. * @id_and_color: ID and color of the relevant MAC
  478. * @action: action to perform, one of FW_CTXT_ACTION_*
  479. * @id: this field has two meanings, depending on the action:
  480. * If the action is ADD, then it means the type of event to add.
  481. * For all other actions it is the unique event ID assigned when the
  482. * event was added by the FW.
  483. * @apply_time: When to start the Time Event (in GP2)
  484. * @max_delay: maximum delay to event's start (apply time), in TU
  485. * @depends_on: the unique ID of the event we depend on (if any)
  486. * @interval: interval between repetitions, in TU
  487. * @interval_reciprocal: 2^32 / interval
  488. * @duration: duration of event in TU
  489. * @repeat: how many repetitions to do, can be TE_REPEAT_ENDLESS
  490. * @dep_policy: one of TE_INDEPENDENT, TE_DEP_OTHER, TE_DEP_TSF
  491. * @is_present: 0 or 1, are we present or absent during the Time Event
  492. * @max_frags: maximal number of fragments the Time Event can be divided to
  493. * @notify: notifications using TE_NOTIF_* (whom to notify when)
  494. */
  495. struct iwl_time_event_cmd {
  496. /* COMMON_INDEX_HDR_API_S_VER_1 */
  497. __le32 id_and_color;
  498. __le32 action;
  499. __le32 id;
  500. /* MAC_TIME_EVENT_DATA_API_S_VER_1 */
  501. __le32 apply_time;
  502. __le32 max_delay;
  503. __le32 dep_policy;
  504. __le32 depends_on;
  505. __le32 is_present;
  506. __le32 max_frags;
  507. __le32 interval;
  508. __le32 interval_reciprocal;
  509. __le32 duration;
  510. __le32 repeat;
  511. __le32 notify;
  512. } __packed; /* MAC_TIME_EVENT_CMD_API_S_VER_1 */
  513. /**
  514. * struct iwl_time_event_resp - response structure to iwl_time_event_cmd
  515. * @status: bit 0 indicates success, all others specify errors
  516. * @id: the Time Event type
  517. * @unique_id: the unique ID assigned (in ADD) or given (others) to the TE
  518. * @id_and_color: ID and color of the relevant MAC
  519. */
  520. struct iwl_time_event_resp {
  521. __le32 status;
  522. __le32 id;
  523. __le32 unique_id;
  524. __le32 id_and_color;
  525. } __packed; /* MAC_TIME_EVENT_RSP_API_S_VER_1 */
  526. /**
  527. * struct iwl_time_event_notif - notifications of time event start/stop
  528. * ( TIME_EVENT_NOTIFICATION = 0x2a )
  529. * @timestamp: action timestamp in GP2
  530. * @session_id: session's unique id
  531. * @unique_id: unique id of the Time Event itself
  532. * @id_and_color: ID and color of the relevant MAC
  533. * @action: one of TE_NOTIF_START or TE_NOTIF_END
  534. * @status: true if scheduled, false otherwise (not executed)
  535. */
  536. struct iwl_time_event_notif {
  537. __le32 timestamp;
  538. __le32 session_id;
  539. __le32 unique_id;
  540. __le32 id_and_color;
  541. __le32 action;
  542. __le32 status;
  543. } __packed; /* MAC_TIME_EVENT_NTFY_API_S_VER_1 */
  544. /* Bindings and Time Quota */
  545. /**
  546. * struct iwl_binding_cmd - configuring bindings
  547. * ( BINDING_CONTEXT_CMD = 0x2b )
  548. * @id_and_color: ID and color of the relevant Binding
  549. * @action: action to perform, one of FW_CTXT_ACTION_*
  550. * @macs: array of MAC id and colors which belong to the binding
  551. * @phy: PHY id and color which belongs to the binding
  552. */
  553. struct iwl_binding_cmd {
  554. /* COMMON_INDEX_HDR_API_S_VER_1 */
  555. __le32 id_and_color;
  556. __le32 action;
  557. /* BINDING_DATA_API_S_VER_1 */
  558. __le32 macs[MAX_MACS_IN_BINDING];
  559. __le32 phy;
  560. } __packed; /* BINDING_CMD_API_S_VER_1 */
  561. /* The maximal number of fragments in the FW's schedule session */
  562. #define IWL_MVM_MAX_QUOTA 128
  563. /**
  564. * struct iwl_time_quota_data - configuration of time quota per binding
  565. * @id_and_color: ID and color of the relevant Binding
  566. * @quota: absolute time quota in TU. The scheduler will try to divide the
  567. * remainig quota (after Time Events) according to this quota.
  568. * @max_duration: max uninterrupted context duration in TU
  569. */
  570. struct iwl_time_quota_data {
  571. __le32 id_and_color;
  572. __le32 quota;
  573. __le32 max_duration;
  574. } __packed; /* TIME_QUOTA_DATA_API_S_VER_1 */
  575. /**
  576. * struct iwl_time_quota_cmd - configuration of time quota between bindings
  577. * ( TIME_QUOTA_CMD = 0x2c )
  578. * @quotas: allocations per binding
  579. */
  580. struct iwl_time_quota_cmd {
  581. struct iwl_time_quota_data quotas[MAX_BINDINGS];
  582. } __packed; /* TIME_QUOTA_ALLOCATION_CMD_API_S_VER_1 */
  583. /* PHY context */
  584. /* Supported bands */
  585. #define PHY_BAND_5 (0)
  586. #define PHY_BAND_24 (1)
  587. /* Supported channel width, vary if there is VHT support */
  588. #define PHY_VHT_CHANNEL_MODE20 (0x0)
  589. #define PHY_VHT_CHANNEL_MODE40 (0x1)
  590. #define PHY_VHT_CHANNEL_MODE80 (0x2)
  591. #define PHY_VHT_CHANNEL_MODE160 (0x3)
  592. /*
  593. * Control channel position:
  594. * For legacy set bit means upper channel, otherwise lower.
  595. * For VHT - bit-2 marks if the control is lower/upper relative to center-freq
  596. * bits-1:0 mark the distance from the center freq. for 20Mhz, offset is 0.
  597. * center_freq
  598. * |
  599. * 40Mhz |_______|_______|
  600. * 80Mhz |_______|_______|_______|_______|
  601. * 160Mhz |_______|_______|_______|_______|_______|_______|_______|_______|
  602. * code 011 010 001 000 | 100 101 110 111
  603. */
  604. #define PHY_VHT_CTRL_POS_1_BELOW (0x0)
  605. #define PHY_VHT_CTRL_POS_2_BELOW (0x1)
  606. #define PHY_VHT_CTRL_POS_3_BELOW (0x2)
  607. #define PHY_VHT_CTRL_POS_4_BELOW (0x3)
  608. #define PHY_VHT_CTRL_POS_1_ABOVE (0x4)
  609. #define PHY_VHT_CTRL_POS_2_ABOVE (0x5)
  610. #define PHY_VHT_CTRL_POS_3_ABOVE (0x6)
  611. #define PHY_VHT_CTRL_POS_4_ABOVE (0x7)
  612. /*
  613. * @band: PHY_BAND_*
  614. * @channel: channel number
  615. * @width: PHY_[VHT|LEGACY]_CHANNEL_*
  616. * @ctrl channel: PHY_[VHT|LEGACY]_CTRL_*
  617. */
  618. struct iwl_fw_channel_info {
  619. u8 band;
  620. u8 channel;
  621. u8 width;
  622. u8 ctrl_pos;
  623. } __packed;
  624. #define PHY_RX_CHAIN_DRIVER_FORCE_POS (0)
  625. #define PHY_RX_CHAIN_DRIVER_FORCE_MSK \
  626. (0x1 << PHY_RX_CHAIN_DRIVER_FORCE_POS)
  627. #define PHY_RX_CHAIN_VALID_POS (1)
  628. #define PHY_RX_CHAIN_VALID_MSK \
  629. (0x7 << PHY_RX_CHAIN_VALID_POS)
  630. #define PHY_RX_CHAIN_FORCE_SEL_POS (4)
  631. #define PHY_RX_CHAIN_FORCE_SEL_MSK \
  632. (0x7 << PHY_RX_CHAIN_FORCE_SEL_POS)
  633. #define PHY_RX_CHAIN_FORCE_MIMO_SEL_POS (7)
  634. #define PHY_RX_CHAIN_FORCE_MIMO_SEL_MSK \
  635. (0x7 << PHY_RX_CHAIN_FORCE_MIMO_SEL_POS)
  636. #define PHY_RX_CHAIN_CNT_POS (10)
  637. #define PHY_RX_CHAIN_CNT_MSK \
  638. (0x3 << PHY_RX_CHAIN_CNT_POS)
  639. #define PHY_RX_CHAIN_MIMO_CNT_POS (12)
  640. #define PHY_RX_CHAIN_MIMO_CNT_MSK \
  641. (0x3 << PHY_RX_CHAIN_MIMO_CNT_POS)
  642. #define PHY_RX_CHAIN_MIMO_FORCE_POS (14)
  643. #define PHY_RX_CHAIN_MIMO_FORCE_MSK \
  644. (0x1 << PHY_RX_CHAIN_MIMO_FORCE_POS)
  645. /* TODO: fix the value, make it depend on firmware at runtime? */
  646. #define NUM_PHY_CTX 3
  647. /* TODO: complete missing documentation */
  648. /**
  649. * struct iwl_phy_context_cmd - config of the PHY context
  650. * ( PHY_CONTEXT_CMD = 0x8 )
  651. * @id_and_color: ID and color of the relevant Binding
  652. * @action: action to perform, one of FW_CTXT_ACTION_*
  653. * @apply_time: 0 means immediate apply and context switch.
  654. * other value means apply new params after X usecs
  655. * @tx_param_color: ???
  656. * @channel_info:
  657. * @txchain_info: ???
  658. * @rxchain_info: ???
  659. * @acquisition_data: ???
  660. * @dsp_cfg_flags: set to 0
  661. */
  662. struct iwl_phy_context_cmd {
  663. /* COMMON_INDEX_HDR_API_S_VER_1 */
  664. __le32 id_and_color;
  665. __le32 action;
  666. /* PHY_CONTEXT_DATA_API_S_VER_1 */
  667. __le32 apply_time;
  668. __le32 tx_param_color;
  669. struct iwl_fw_channel_info ci;
  670. __le32 txchain_info;
  671. __le32 rxchain_info;
  672. __le32 acquisition_data;
  673. __le32 dsp_cfg_flags;
  674. } __packed; /* PHY_CONTEXT_CMD_API_VER_1 */
  675. #define IWL_RX_INFO_PHY_CNT 8
  676. #define IWL_RX_INFO_AGC_IDX 1
  677. #define IWL_RX_INFO_RSSI_AB_IDX 2
  678. #define IWL_OFDM_AGC_A_MSK 0x0000007f
  679. #define IWL_OFDM_AGC_A_POS 0
  680. #define IWL_OFDM_AGC_B_MSK 0x00003f80
  681. #define IWL_OFDM_AGC_B_POS 7
  682. #define IWL_OFDM_AGC_CODE_MSK 0x3fe00000
  683. #define IWL_OFDM_AGC_CODE_POS 20
  684. #define IWL_OFDM_RSSI_INBAND_A_MSK 0x00ff
  685. #define IWL_OFDM_RSSI_A_POS 0
  686. #define IWL_OFDM_RSSI_ALLBAND_A_MSK 0xff00
  687. #define IWL_OFDM_RSSI_ALLBAND_A_POS 8
  688. #define IWL_OFDM_RSSI_INBAND_B_MSK 0xff0000
  689. #define IWL_OFDM_RSSI_B_POS 16
  690. #define IWL_OFDM_RSSI_ALLBAND_B_MSK 0xff000000
  691. #define IWL_OFDM_RSSI_ALLBAND_B_POS 24
  692. /**
  693. * struct iwl_rx_phy_info - phy info
  694. * (REPLY_RX_PHY_CMD = 0xc0)
  695. * @non_cfg_phy_cnt: non configurable DSP phy data byte count
  696. * @cfg_phy_cnt: configurable DSP phy data byte count
  697. * @stat_id: configurable DSP phy data set ID
  698. * @reserved1:
  699. * @system_timestamp: GP2 at on air rise
  700. * @timestamp: TSF at on air rise
  701. * @beacon_time_stamp: beacon at on-air rise
  702. * @phy_flags: general phy flags: band, modulation, ...
  703. * @channel: channel number
  704. * @non_cfg_phy_buf: for various implementations of non_cfg_phy
  705. * @rate_n_flags: RATE_MCS_*
  706. * @byte_count: frame's byte-count
  707. * @frame_time: frame's time on the air, based on byte count and frame rate
  708. * calculation
  709. * @mac_active_msk: what MACs were active when the frame was received
  710. *
  711. * Before each Rx, the device sends this data. It contains PHY information
  712. * about the reception of the packet.
  713. */
  714. struct iwl_rx_phy_info {
  715. u8 non_cfg_phy_cnt;
  716. u8 cfg_phy_cnt;
  717. u8 stat_id;
  718. u8 reserved1;
  719. __le32 system_timestamp;
  720. __le64 timestamp;
  721. __le32 beacon_time_stamp;
  722. __le16 phy_flags;
  723. __le16 channel;
  724. __le32 non_cfg_phy[IWL_RX_INFO_PHY_CNT];
  725. __le32 rate_n_flags;
  726. __le32 byte_count;
  727. __le16 mac_active_msk;
  728. __le16 frame_time;
  729. } __packed;
  730. struct iwl_rx_mpdu_res_start {
  731. __le16 byte_count;
  732. __le16 reserved;
  733. } __packed;
  734. /**
  735. * enum iwl_rx_phy_flags - to parse %iwl_rx_phy_info phy_flags
  736. * @RX_RES_PHY_FLAGS_BAND_24: true if the packet was received on 2.4 band
  737. * @RX_RES_PHY_FLAGS_MOD_CCK:
  738. * @RX_RES_PHY_FLAGS_SHORT_PREAMBLE: true if packet's preamble was short
  739. * @RX_RES_PHY_FLAGS_NARROW_BAND:
  740. * @RX_RES_PHY_FLAGS_ANTENNA: antenna on which the packet was received
  741. * @RX_RES_PHY_FLAGS_AGG: set if the packet was part of an A-MPDU
  742. * @RX_RES_PHY_FLAGS_OFDM_HT: The frame was an HT frame
  743. * @RX_RES_PHY_FLAGS_OFDM_GF: The frame used GF preamble
  744. * @RX_RES_PHY_FLAGS_OFDM_VHT: The frame was a VHT frame
  745. */
  746. enum iwl_rx_phy_flags {
  747. RX_RES_PHY_FLAGS_BAND_24 = BIT(0),
  748. RX_RES_PHY_FLAGS_MOD_CCK = BIT(1),
  749. RX_RES_PHY_FLAGS_SHORT_PREAMBLE = BIT(2),
  750. RX_RES_PHY_FLAGS_NARROW_BAND = BIT(3),
  751. RX_RES_PHY_FLAGS_ANTENNA = (0x7 << 4),
  752. RX_RES_PHY_FLAGS_ANTENNA_POS = 4,
  753. RX_RES_PHY_FLAGS_AGG = BIT(7),
  754. RX_RES_PHY_FLAGS_OFDM_HT = BIT(8),
  755. RX_RES_PHY_FLAGS_OFDM_GF = BIT(9),
  756. RX_RES_PHY_FLAGS_OFDM_VHT = BIT(10),
  757. };
  758. /**
  759. * enum iwl_mvm_rx_status - written by fw for each Rx packet
  760. * @RX_MPDU_RES_STATUS_CRC_OK: CRC is fine
  761. * @RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow
  762. * @RX_MPDU_RES_STATUS_SRC_STA_FOUND:
  763. * @RX_MPDU_RES_STATUS_KEY_VALID:
  764. * @RX_MPDU_RES_STATUS_KEY_PARAM_OK:
  765. * @RX_MPDU_RES_STATUS_ICV_OK: ICV is fine, if not, the packet is destroyed
  766. * @RX_MPDU_RES_STATUS_MIC_OK: used for CCM alg only. TKIP MIC is checked
  767. * in the driver.
  768. * @RX_MPDU_RES_STATUS_TTAK_OK: TTAK is fine
  769. * @RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR: valid for alg = CCM_CMAC or
  770. * alg = CCM only. Checks replay attack for 11w frames. Relevant only if
  771. * %RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME is set.
  772. * @RX_MPDU_RES_STATUS_SEC_NO_ENC: this frame is not encrypted
  773. * @RX_MPDU_RES_STATUS_SEC_WEP_ENC: this frame is encrypted using WEP
  774. * @RX_MPDU_RES_STATUS_SEC_CCM_ENC: this frame is encrypted using CCM
  775. * @RX_MPDU_RES_STATUS_SEC_TKIP_ENC: this frame is encrypted using TKIP
  776. * @RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC: this frame is encrypted using CCM_CMAC
  777. * @RX_MPDU_RES_STATUS_SEC_ENC_ERR: this frame couldn't be decrypted
  778. * @RX_MPDU_RES_STATUS_SEC_ENC_MSK: bitmask of the encryption algorithm
  779. * @RX_MPDU_RES_STATUS_DEC_DONE: this frame has been successfully decrypted
  780. * @RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP:
  781. * @RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP:
  782. * @RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT:
  783. * @RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME: this frame is an 11w management frame
  784. * @RX_MPDU_RES_STATUS_HASH_INDEX_MSK:
  785. * @RX_MPDU_RES_STATUS_STA_ID_MSK:
  786. * @RX_MPDU_RES_STATUS_RRF_KILL:
  787. * @RX_MPDU_RES_STATUS_FILTERING_MSK:
  788. * @RX_MPDU_RES_STATUS2_FILTERING_MSK:
  789. */
  790. enum iwl_mvm_rx_status {
  791. RX_MPDU_RES_STATUS_CRC_OK = BIT(0),
  792. RX_MPDU_RES_STATUS_OVERRUN_OK = BIT(1),
  793. RX_MPDU_RES_STATUS_SRC_STA_FOUND = BIT(2),
  794. RX_MPDU_RES_STATUS_KEY_VALID = BIT(3),
  795. RX_MPDU_RES_STATUS_KEY_PARAM_OK = BIT(4),
  796. RX_MPDU_RES_STATUS_ICV_OK = BIT(5),
  797. RX_MPDU_RES_STATUS_MIC_OK = BIT(6),
  798. RX_MPDU_RES_STATUS_TTAK_OK = BIT(7),
  799. RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR = BIT(7),
  800. RX_MPDU_RES_STATUS_SEC_NO_ENC = (0 << 8),
  801. RX_MPDU_RES_STATUS_SEC_WEP_ENC = (1 << 8),
  802. RX_MPDU_RES_STATUS_SEC_CCM_ENC = (2 << 8),
  803. RX_MPDU_RES_STATUS_SEC_TKIP_ENC = (3 << 8),
  804. RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC = (6 << 8),
  805. RX_MPDU_RES_STATUS_SEC_ENC_ERR = (7 << 8),
  806. RX_MPDU_RES_STATUS_SEC_ENC_MSK = (7 << 8),
  807. RX_MPDU_RES_STATUS_DEC_DONE = BIT(11),
  808. RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP = BIT(12),
  809. RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP = BIT(13),
  810. RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT = BIT(14),
  811. RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME = BIT(15),
  812. RX_MPDU_RES_STATUS_HASH_INDEX_MSK = (0x3F0000),
  813. RX_MPDU_RES_STATUS_STA_ID_MSK = (0x1f000000),
  814. RX_MPDU_RES_STATUS_RRF_KILL = BIT(29),
  815. RX_MPDU_RES_STATUS_FILTERING_MSK = (0xc00000),
  816. RX_MPDU_RES_STATUS2_FILTERING_MSK = (0xc0000000),
  817. };
  818. /**
  819. * struct iwl_radio_version_notif - information on the radio version
  820. * ( RADIO_VERSION_NOTIFICATION = 0x68 )
  821. * @radio_flavor:
  822. * @radio_step:
  823. * @radio_dash:
  824. */
  825. struct iwl_radio_version_notif {
  826. __le32 radio_flavor;
  827. __le32 radio_step;
  828. __le32 radio_dash;
  829. } __packed; /* RADIO_VERSION_NOTOFICATION_S_VER_1 */
  830. enum iwl_card_state_flags {
  831. CARD_ENABLED = 0x00,
  832. HW_CARD_DISABLED = 0x01,
  833. SW_CARD_DISABLED = 0x02,
  834. CT_KILL_CARD_DISABLED = 0x04,
  835. HALT_CARD_DISABLED = 0x08,
  836. CARD_DISABLED_MSK = 0x0f,
  837. CARD_IS_RX_ON = 0x10,
  838. };
  839. /**
  840. * struct iwl_radio_version_notif - information on the radio version
  841. * ( CARD_STATE_NOTIFICATION = 0xa1 )
  842. * @flags: %iwl_card_state_flags
  843. */
  844. struct iwl_card_state_notif {
  845. __le32 flags;
  846. } __packed; /* CARD_STATE_NTFY_API_S_VER_1 */
  847. /**
  848. * struct iwl_set_calib_default_cmd - set default value for calibration.
  849. * ( SET_CALIB_DEFAULT_CMD = 0x8e )
  850. * @calib_index: the calibration to set value for
  851. * @length: of data
  852. * @data: the value to set for the calibration result
  853. */
  854. struct iwl_set_calib_default_cmd {
  855. __le16 calib_index;
  856. __le16 length;
  857. u8 data[0];
  858. } __packed; /* PHY_CALIB_OVERRIDE_VALUES_S */
  859. #endif /* __fw_api_h__ */