forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/intel/iwlwifi/fw/file.h
....@@ -5,10 +5,9 @@
55 *
66 * GPL LICENSE SUMMARY
77 *
8
- * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
98 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
109 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
11
- * Copyright(c) 2018 Intel Corporation
10
+ * Copyright(c) 2008 - 2014, 2018 - 2020 Intel Corporation
1211 *
1312 * This program is free software; you can redistribute it and/or modify
1413 * it under the terms of version 2 of the GNU General Public License as
....@@ -19,11 +18,6 @@
1918 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2019 * General Public License for more details.
2120 *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program; if not, write to the Free Software
24
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
25
- * USA
26
- *
2721 * The full GNU General Public License is included in this distribution
2822 * in the file called COPYING.
2923 *
....@@ -33,10 +27,9 @@
3327 *
3428 * BSD LICENSE
3529 *
36
- * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
3730 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
3831 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
39
- * Copyright(c) 2018 Intel Corporation
32
+ * Copyright(c) 2008 - 2014, 2018 - 2020 Intel Corporation
4033 * All rights reserved.
4134 *
4235 * Redistribution and use in source and binary forms, with or without
....@@ -96,6 +89,9 @@
9689 } u;
9790 };
9891
92
+#define IWL_UCODE_TLV_DEBUG_BASE 0x1000005
93
+#define IWL_UCODE_TLV_CONST_BASE 0x100
94
+
9995 /*
10096 * new TLV uCode file layout
10197 *
....@@ -143,9 +139,27 @@
143139 IWL_UCODE_TLV_FW_DBG_DEST = 38,
144140 IWL_UCODE_TLV_FW_DBG_CONF = 39,
145141 IWL_UCODE_TLV_FW_DBG_TRIGGER = 40,
142
+ IWL_UCODE_TLV_CMD_VERSIONS = 48,
146143 IWL_UCODE_TLV_FW_GSCAN_CAPA = 50,
147144 IWL_UCODE_TLV_FW_MEM_SEG = 51,
148145 IWL_UCODE_TLV_IML = 52,
146
+ IWL_UCODE_TLV_UMAC_DEBUG_ADDRS = 54,
147
+ IWL_UCODE_TLV_LMAC_DEBUG_ADDRS = 55,
148
+ IWL_UCODE_TLV_FW_RECOVERY_INFO = 57,
149
+ IWL_UCODE_TLV_HW_TYPE = 58,
150
+ IWL_UCODE_TLV_FW_FSEQ_VERSION = 60,
151
+
152
+ IWL_UCODE_TLV_PNVM_VERSION = 62,
153
+ IWL_UCODE_TLV_PNVM_SKU = 64,
154
+
155
+ IWL_UCODE_TLV_FW_NUM_STATIONS = IWL_UCODE_TLV_CONST_BASE + 0,
156
+
157
+ IWL_UCODE_TLV_TYPE_DEBUG_INFO = IWL_UCODE_TLV_DEBUG_BASE + 0,
158
+ IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION = IWL_UCODE_TLV_DEBUG_BASE + 1,
159
+ IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_TLV_DEBUG_BASE + 2,
160
+ IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_TLV_DEBUG_BASE + 3,
161
+ IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_TLV_DEBUG_BASE + 4,
162
+ IWL_UCODE_TLV_DEBUG_MAX = IWL_UCODE_TLV_TYPE_TRIGGERS,
149163
150164 /* TLVs 0x1000-0x2000 are for internal driver usage */
151165 IWL_UCODE_TLV_FW_DBG_DUMP_LST = 0x1000,
....@@ -206,7 +220,7 @@
206220 * treats good CRC threshold as a boolean
207221 * @IWL_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w).
208222 * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: This uCode image supports uAPSD
209
- * @IWL_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan
223
+ * @IWL_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of block list instead of 64 in scan
210224 * offload profile config command.
211225 * @IWL_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS: D3 image supports up to six
212226 * (rather than two) IPv6 addresses
....@@ -258,6 +272,26 @@
258272 * deprecated.
259273 * @IWL_UCODE_TLV_API_ADAPTIVE_DWELL_V2: This ucode supports version 8
260274 * of scan request: SCAN_REQUEST_CMD_UMAC_API_S_VER_8
275
+ * @IWL_UCODE_TLV_API_FRAG_EBS: This ucode supports fragmented EBS
276
+ * @IWL_UCODE_TLV_API_REDUCE_TX_POWER: This ucode supports v5 of
277
+ * the REDUCE_TX_POWER_CMD.
278
+ * @IWL_UCODE_TLV_API_SHORT_BEACON_NOTIF: This ucode supports the short
279
+ * version of the beacon notification.
280
+ * @IWL_UCODE_TLV_API_BEACON_FILTER_V4: This ucode supports v4 of
281
+ * BEACON_FILTER_CONFIG_API_S_VER_4.
282
+ * @IWL_UCODE_TLV_API_REGULATORY_NVM_INFO: This ucode supports v4 of
283
+ * REGULATORY_NVM_GET_INFO_RSP_API_S.
284
+ * @IWL_UCODE_TLV_API_FTM_NEW_RANGE_REQ: This ucode supports v7 of
285
+ * LOCATION_RANGE_REQ_CMD_API_S and v6 of LOCATION_RANGE_RESP_NTFY_API_S.
286
+ * @IWL_UCODE_TLV_API_SCAN_OFFLOAD_CHANS: This ucode supports v2 of
287
+ * SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S and v3 of
288
+ * SCAN_OFFLOAD_PROFILES_QUERY_RSP_S.
289
+ * @IWL_UCODE_TLV_API_MBSSID_HE: This ucode supports v2 of
290
+ * STA_CONTEXT_DOT11AX_API_S
291
+ * @IWL_UCODE_TLV_CAPA_SAR_TABLE_VER: This ucode supports different sar
292
+ * version tables.
293
+ * @IWL_UCODE_TLV_API_REDUCED_SCAN_CONFIG: This ucode supports v3 of
294
+ * SCAN_CONFIG_DB_CMD_API_S.
261295 *
262296 * @NUM_IWL_UCODE_TLV_API: number of bits used
263297 */
....@@ -276,9 +310,26 @@
276310 IWL_UCODE_TLV_API_OCE = (__force iwl_ucode_tlv_api_t)33,
277311 IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE = (__force iwl_ucode_tlv_api_t)34,
278312 IWL_UCODE_TLV_API_NEW_RX_STATS = (__force iwl_ucode_tlv_api_t)35,
313
+ IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL = (__force iwl_ucode_tlv_api_t)36,
279314 IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY = (__force iwl_ucode_tlv_api_t)38,
280315 IWL_UCODE_TLV_API_DEPRECATE_TTAK = (__force iwl_ucode_tlv_api_t)41,
281316 IWL_UCODE_TLV_API_ADAPTIVE_DWELL_V2 = (__force iwl_ucode_tlv_api_t)42,
317
+ IWL_UCODE_TLV_API_FRAG_EBS = (__force iwl_ucode_tlv_api_t)44,
318
+ IWL_UCODE_TLV_API_REDUCE_TX_POWER = (__force iwl_ucode_tlv_api_t)45,
319
+ IWL_UCODE_TLV_API_SHORT_BEACON_NOTIF = (__force iwl_ucode_tlv_api_t)46,
320
+ IWL_UCODE_TLV_API_BEACON_FILTER_V4 = (__force iwl_ucode_tlv_api_t)47,
321
+ IWL_UCODE_TLV_API_REGULATORY_NVM_INFO = (__force iwl_ucode_tlv_api_t)48,
322
+ IWL_UCODE_TLV_API_FTM_NEW_RANGE_REQ = (__force iwl_ucode_tlv_api_t)49,
323
+ IWL_UCODE_TLV_API_SCAN_OFFLOAD_CHANS = (__force iwl_ucode_tlv_api_t)50,
324
+ IWL_UCODE_TLV_API_MBSSID_HE = (__force iwl_ucode_tlv_api_t)52,
325
+ IWL_UCODE_TLV_API_WOWLAN_TCP_SYN_WAKE = (__force iwl_ucode_tlv_api_t)53,
326
+ IWL_UCODE_TLV_API_FTM_RTT_ACCURACY = (__force iwl_ucode_tlv_api_t)54,
327
+ IWL_UCODE_TLV_API_SAR_TABLE_VER = (__force iwl_ucode_tlv_api_t)55,
328
+ IWL_UCODE_TLV_API_REDUCED_SCAN_CONFIG = (__force iwl_ucode_tlv_api_t)56,
329
+ IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP = (__force iwl_ucode_tlv_api_t)57,
330
+ IWL_UCODE_TLV_API_SCAN_EXT_CHAN_VER = (__force iwl_ucode_tlv_api_t)58,
331
+ IWL_UCODE_TLV_API_BAND_IN_RX_DATA = (__force iwl_ucode_tlv_api_t)59,
332
+
282333
283334 NUM_IWL_UCODE_TLV_API
284335 #ifdef __CHECKER__
....@@ -295,7 +346,6 @@
295346 * @IWL_UCODE_TLV_CAPA_LAR_SUPPORT: supports Location Aware Regulatory
296347 * @IWL_UCODE_TLV_CAPA_UMAC_SCAN: supports UMAC scan.
297348 * @IWL_UCODE_TLV_CAPA_BEAMFORMER: supports Beamformer
298
- * @IWL_UCODE_TLV_CAPA_TOF_SUPPORT: supports Time of Flight (802.11mc FTM)
299349 * @IWL_UCODE_TLV_CAPA_TDLS_SUPPORT: support basic TDLS functionality
300350 * @IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT: supports insertion of current
301351 * tx power value into TPC Report action frame and Link Measurement Report
....@@ -322,9 +372,16 @@
322372 * is supported.
323373 * @IWL_UCODE_TLV_CAPA_BT_COEX_RRC: supports BT Coex RRC
324374 * @IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT: supports gscan (no longer used)
375
+ * @IWL_UCODE_TLV_CAPA_SOC_LATENCY_SUPPORT: the firmware supports setting
376
+ * stabilization latency for SoCs.
325377 * @IWL_UCODE_TLV_CAPA_STA_PM_NOTIF: firmware will send STA PM notification
326378 * @IWL_UCODE_TLV_CAPA_TLC_OFFLOAD: firmware implements rate scaling algorithm
327379 * @IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA: firmware implements quota related
380
+ * @IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2: firmware implements Coex Schema 2
381
+ * IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD: firmware supports CSA command
382
+ * @IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS: firmware supports ultra high band
383
+ * (6 GHz).
384
+ * @IWL_UCODE_TLV_CAPA_CS_MODIFY: firmware supports modify action CSA command
328385 * @IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE: extended DTS measurement
329386 * @IWL_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS: supports short PM timeouts
330387 * @IWL_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT: supports bt-coex Multi-priority LUT
....@@ -335,7 +392,7 @@
335392 * antenna the beacon should be transmitted
336393 * @IWL_UCODE_TLV_CAPA_BEACON_STORING: firmware will store the latest beacon
337394 * from AP and will send it upon d0i3 exit.
338
- * @IWL_UCODE_TLV_CAPA_LAR_SUPPORT_V2: support LAR API V2
395
+ * @IWL_UCODE_TLV_CAPA_LAR_SUPPORT_V3: support LAR API V3
339396 * @IWL_UCODE_TLV_CAPA_CT_KILL_BY_FW: firmware responsible for CT-kill
340397 * @IWL_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT: supports temperature
341398 * thresholds reporting
....@@ -348,16 +405,24 @@
348405 * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger
349406 * command size (command version 4) that supports toggling ACK TX
350407 * power reduction.
408
+ * @IWL_UCODE_TLV_CAPA_D3_DEBUG: supports debug recording during D3
409
+ * @IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT: MCC response support 11ax
410
+ * capability.
411
+ * @IWL_UCODE_TLV_CAPA_CSI_REPORTING: firmware is capable of being configured
412
+ * to report the CSI information with (certain) RX frames
413
+ * @IWL_UCODE_TLV_CAPA_FTM_CALIBRATED: has FTM calibrated and thus supports both
414
+ * initiator and responder
351415 * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload
416
+ * @IWL_UCODE_TLV_CAPA_PROTECTED_TWT: Supports protection of TWT action frames
352417 *
353418 * @NUM_IWL_UCODE_TLV_CAPA: number of bits used
354419 */
355420 enum iwl_ucode_tlv_capa {
421
+ /* set 0 */
356422 IWL_UCODE_TLV_CAPA_D0I3_SUPPORT = (__force iwl_ucode_tlv_capa_t)0,
357423 IWL_UCODE_TLV_CAPA_LAR_SUPPORT = (__force iwl_ucode_tlv_capa_t)1,
358424 IWL_UCODE_TLV_CAPA_UMAC_SCAN = (__force iwl_ucode_tlv_capa_t)2,
359425 IWL_UCODE_TLV_CAPA_BEAMFORMER = (__force iwl_ucode_tlv_capa_t)3,
360
- IWL_UCODE_TLV_CAPA_TOF_SUPPORT = (__force iwl_ucode_tlv_capa_t)5,
361426 IWL_UCODE_TLV_CAPA_TDLS_SUPPORT = (__force iwl_ucode_tlv_capa_t)6,
362427 IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT = (__force iwl_ucode_tlv_capa_t)8,
363428 IWL_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT = (__force iwl_ucode_tlv_capa_t)9,
....@@ -375,12 +440,27 @@
375440 IWL_UCODE_TLV_CAPA_LAR_MULTI_MCC = (__force iwl_ucode_tlv_capa_t)29,
376441 IWL_UCODE_TLV_CAPA_BT_COEX_RRC = (__force iwl_ucode_tlv_capa_t)30,
377442 IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT = (__force iwl_ucode_tlv_capa_t)31,
443
+
444
+ /* set 1 */
445
+ IWL_UCODE_TLV_CAPA_SOC_LATENCY_SUPPORT = (__force iwl_ucode_tlv_capa_t)37,
378446 IWL_UCODE_TLV_CAPA_STA_PM_NOTIF = (__force iwl_ucode_tlv_capa_t)38,
379447 IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT = (__force iwl_ucode_tlv_capa_t)39,
380448 IWL_UCODE_TLV_CAPA_CDB_SUPPORT = (__force iwl_ucode_tlv_capa_t)40,
381449 IWL_UCODE_TLV_CAPA_D0I3_END_FIRST = (__force iwl_ucode_tlv_capa_t)41,
382450 IWL_UCODE_TLV_CAPA_TLC_OFFLOAD = (__force iwl_ucode_tlv_capa_t)43,
383451 IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA = (__force iwl_ucode_tlv_capa_t)44,
452
+ IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2 = (__force iwl_ucode_tlv_capa_t)45,
453
+ IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD = (__force iwl_ucode_tlv_capa_t)46,
454
+ IWL_UCODE_TLV_CAPA_FTM_CALIBRATED = (__force iwl_ucode_tlv_capa_t)47,
455
+ IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS = (__force iwl_ucode_tlv_capa_t)48,
456
+ IWL_UCODE_TLV_CAPA_CS_MODIFY = (__force iwl_ucode_tlv_capa_t)49,
457
+ IWL_UCODE_TLV_CAPA_SET_LTR_GEN2 = (__force iwl_ucode_tlv_capa_t)50,
458
+ IWL_UCODE_TLV_CAPA_SET_PPAG = (__force iwl_ucode_tlv_capa_t)52,
459
+ IWL_UCODE_TLV_CAPA_TAS_CFG = (__force iwl_ucode_tlv_capa_t)53,
460
+ IWL_UCODE_TLV_CAPA_SESSION_PROT_CMD = (__force iwl_ucode_tlv_capa_t)54,
461
+ IWL_UCODE_TLV_CAPA_PROTECTED_TWT = (__force iwl_ucode_tlv_capa_t)56,
462
+
463
+ /* set 2 */
384464 IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t)64,
385465 IWL_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS = (__force iwl_ucode_tlv_capa_t)65,
386466 IWL_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT = (__force iwl_ucode_tlv_capa_t)67,
....@@ -388,7 +468,7 @@
388468 IWL_UCODE_TLV_CAPA_CSA_AND_TBTT_OFFLOAD = (__force iwl_ucode_tlv_capa_t)70,
389469 IWL_UCODE_TLV_CAPA_BEACON_ANT_SELECTION = (__force iwl_ucode_tlv_capa_t)71,
390470 IWL_UCODE_TLV_CAPA_BEACON_STORING = (__force iwl_ucode_tlv_capa_t)72,
391
- IWL_UCODE_TLV_CAPA_LAR_SUPPORT_V2 = (__force iwl_ucode_tlv_capa_t)73,
471
+ IWL_UCODE_TLV_CAPA_LAR_SUPPORT_V3 = (__force iwl_ucode_tlv_capa_t)73,
392472 IWL_UCODE_TLV_CAPA_CT_KILL_BY_FW = (__force iwl_ucode_tlv_capa_t)74,
393473 IWL_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT = (__force iwl_ucode_tlv_capa_t)75,
394474 IWL_UCODE_TLV_CAPA_CTDP_SUPPORT = (__force iwl_ucode_tlv_capa_t)76,
....@@ -396,7 +476,14 @@
396476 IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80,
397477 IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81,
398478 IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84,
399
- IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)86,
479
+ IWL_UCODE_TLV_CAPA_D3_DEBUG = (__force iwl_ucode_tlv_capa_t)87,
480
+ IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)88,
481
+ IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT = (__force iwl_ucode_tlv_capa_t)89,
482
+ IWL_UCODE_TLV_CAPA_CSI_REPORTING = (__force iwl_ucode_tlv_capa_t)90,
483
+ IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP = (__force iwl_ucode_tlv_capa_t)92,
484
+ IWL_UCODE_TLV_CAPA_DBG_BUF_ALLOC_CMD_SUPP = (__force iwl_ucode_tlv_capa_t)93,
485
+
486
+ /* set 3 */
400487 IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96,
401488
402489 NUM_IWL_UCODE_TLV_CAPA
....@@ -451,6 +538,10 @@
451538 FW_PHY_CFG_TX_CHAIN = 0xf << FW_PHY_CFG_TX_CHAIN_POS,
452539 FW_PHY_CFG_RX_CHAIN_POS = 20,
453540 FW_PHY_CFG_RX_CHAIN = 0xf << FW_PHY_CFG_RX_CHAIN_POS,
541
+ FW_PHY_CFG_CHAIN_SAD_POS = 23,
542
+ FW_PHY_CFG_CHAIN_SAD_ENABLED = 0x1 << FW_PHY_CFG_CHAIN_SAD_POS,
543
+ FW_PHY_CFG_CHAIN_SAD_ANT_A = 0x2 << FW_PHY_CFG_CHAIN_SAD_POS,
544
+ FW_PHY_CFG_CHAIN_SAD_ANT_B = 0x4 << FW_PHY_CFG_CHAIN_SAD_POS,
454545 FW_PHY_CFG_SHARED_CLK = BIT(31),
455546 };
456547
....@@ -528,22 +619,9 @@
528619 };
529620
530621 /**
531
- * enum iwl_fw_mem_seg_type - memory segment type
532
- * @FW_DBG_MEM_TYPE_MASK: mask for the type indication
533
- * @FW_DBG_MEM_TYPE_REGULAR: regular memory
534
- * @FW_DBG_MEM_TYPE_PRPH: periphery memory (requires special reading)
535
- */
536
-enum iwl_fw_mem_seg_type {
537
- FW_DBG_MEM_TYPE_MASK = 0xff000000,
538
- FW_DBG_MEM_TYPE_REGULAR = 0x00000000,
539
- FW_DBG_MEM_TYPE_PRPH = 0x01000000,
540
-};
541
-
542
-/**
543622 * struct iwl_fw_dbg_mem_seg_tlv - configures the debug data memory segments
544623 *
545
- * @data_type: the memory segment type to record, see &enum iwl_fw_mem_seg_type
546
- * for what we care about
624
+ * @data_type: the memory segment type to record
547625 * @ofs: the memory segment offset
548626 * @len: the memory segment length, in bytes
549627 *
....@@ -892,4 +970,35 @@
892970 struct iwl_fw_dbg_conf_hcmd hcmd;
893971 } __packed;
894972
973
+#define IWL_FW_CMD_VER_UNKNOWN 99
974
+
975
+/**
976
+ * struct iwl_fw_cmd_version - firmware command version entry
977
+ * @cmd: command ID
978
+ * @group: group ID
979
+ * @cmd_ver: command version
980
+ * @notif_ver: notification version
981
+ */
982
+struct iwl_fw_cmd_version {
983
+ u8 cmd;
984
+ u8 group;
985
+ u8 cmd_ver;
986
+ u8 notif_ver;
987
+} __packed;
988
+
989
+static inline size_t _iwl_tlv_array_len(const struct iwl_ucode_tlv *tlv,
990
+ size_t fixed_size, size_t var_size)
991
+{
992
+ size_t var_len = le32_to_cpu(tlv->length) - fixed_size;
993
+
994
+ if (WARN_ON(var_len % var_size))
995
+ return 0;
996
+
997
+ return var_len / var_size;
998
+}
999
+
1000
+#define iwl_tlv_array_len(_tlv_ptr, _struct_ptr, _memb) \
1001
+ _iwl_tlv_array_len((_tlv_ptr), sizeof(*(_struct_ptr)), \
1002
+ sizeof(_struct_ptr->_memb[0]))
1003
+
8951004 #endif /* __iwl_fw_file_h__ */