Merge tag 'wireless-next-2022-03-11' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / wireless / intel / iwlwifi / fw / api / commands.h
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
4  * Copyright (C) 2016-2017 Intel Deutschland GmbH
5  * Copyright (C) 2018-2020 Intel Corporation
6  */
7 #ifndef __iwl_fw_api_commands_h__
8 #define __iwl_fw_api_commands_h__
9
10 /**
11  * enum iwl_mvm_command_groups - command groups for the firmware
12  * @LEGACY_GROUP: legacy group, uses command IDs from &enum iwl_legacy_cmds
13  * @LONG_GROUP: legacy group with long header, also uses command IDs
14  *      from &enum iwl_legacy_cmds
15  * @SYSTEM_GROUP: system group, uses command IDs from
16  *      &enum iwl_system_subcmd_ids
17  * @MAC_CONF_GROUP: MAC configuration group, uses command IDs from
18  *      &enum iwl_mac_conf_subcmd_ids
19  * @PHY_OPS_GROUP: PHY operations group, uses command IDs from
20  *      &enum iwl_phy_ops_subcmd_ids
21  * @DATA_PATH_GROUP: data path group, uses command IDs from
22  *      &enum iwl_data_path_subcmd_ids
23  * @NAN_GROUP: NAN group, uses command IDs from &enum iwl_nan_subcmd_ids
24  * @LOCATION_GROUP: location group, uses command IDs from
25  *      &enum iwl_location_subcmd_ids
26  * @PROT_OFFLOAD_GROUP: protocol offload group, uses command IDs from
27  *      &enum iwl_prot_offload_subcmd_ids
28  * @REGULATORY_AND_NVM_GROUP: regulatory/NVM group, uses command IDs from
29  *      &enum iwl_regulatory_and_nvm_subcmd_ids
30  * @DEBUG_GROUP: Debug group, uses command IDs from &enum iwl_debug_cmds
31  */
32 enum iwl_mvm_command_groups {
33         LEGACY_GROUP = 0x0,
34         LONG_GROUP = 0x1,
35         SYSTEM_GROUP = 0x2,
36         MAC_CONF_GROUP = 0x3,
37         PHY_OPS_GROUP = 0x4,
38         DATA_PATH_GROUP = 0x5,
39         NAN_GROUP = 0x7,
40         LOCATION_GROUP = 0x8,
41         PROT_OFFLOAD_GROUP = 0xb,
42         REGULATORY_AND_NVM_GROUP = 0xc,
43         DEBUG_GROUP = 0xf,
44 };
45
46 /**
47  * enum iwl_legacy_cmds - legacy group command IDs
48  */
49 enum iwl_legacy_cmds {
50         /**
51          * @UCODE_ALIVE_NTFY:
52          * Alive data from the firmware, as described in
53          * &struct iwl_alive_ntf_v3 or &struct iwl_alive_ntf_v4 or
54          * &struct iwl_alive_ntf_v5 or &struct iwl_alive_ntf_v6.
55          */
56         UCODE_ALIVE_NTFY = 0x1,
57
58         /**
59          * @REPLY_ERROR: Cause an error in the firmware, for testing purposes.
60          */
61         REPLY_ERROR = 0x2,
62
63         /**
64          * @ECHO_CMD: Send data to the device to have it returned immediately.
65          */
66         ECHO_CMD = 0x3,
67
68         /**
69          * @INIT_COMPLETE_NOTIF: Notification that initialization is complete.
70          */
71         INIT_COMPLETE_NOTIF = 0x4,
72
73         /**
74          * @PHY_CONTEXT_CMD:
75          * Add/modify/remove a PHY context, using &struct iwl_phy_context_cmd
76          *      or &struct iwl_phy_context_cmd_v1.
77          */
78         PHY_CONTEXT_CMD = 0x8,
79
80         /**
81          * @DBG_CFG: Debug configuration command.
82          */
83         DBG_CFG = 0x9,
84
85         /**
86          * @SCAN_ITERATION_COMPLETE_UMAC:
87          * Firmware indicates a scan iteration completed, using
88          * &struct iwl_umac_scan_iter_complete_notif.
89          */
90         SCAN_ITERATION_COMPLETE_UMAC = 0xb5,
91
92         /**
93          * @SCAN_CFG_CMD:
94          * uses &struct iwl_scan_config_v1, &struct iwl_scan_config_v2
95          * or &struct iwl_scan_config
96          */
97         SCAN_CFG_CMD = 0xc,
98
99         /**
100          * @SCAN_REQ_UMAC: uses &struct iwl_scan_req_umac
101          */
102         SCAN_REQ_UMAC = 0xd,
103
104         /**
105          * @SCAN_ABORT_UMAC: uses &struct iwl_umac_scan_abort
106          */
107         SCAN_ABORT_UMAC = 0xe,
108
109         /**
110          * @SCAN_COMPLETE_UMAC: uses &struct iwl_umac_scan_complete
111          */
112         SCAN_COMPLETE_UMAC = 0xf,
113
114         /**
115          * @BA_WINDOW_STATUS_NOTIFICATION_ID:
116          * uses &struct iwl_ba_window_status_notif
117          */
118         BA_WINDOW_STATUS_NOTIFICATION_ID = 0x13,
119
120         /**
121          * @ADD_STA_KEY:
122          * &struct iwl_mvm_add_sta_key_cmd_v1 or
123          * &struct iwl_mvm_add_sta_key_cmd.
124          */
125         ADD_STA_KEY = 0x17,
126
127         /**
128          * @ADD_STA:
129          * &struct iwl_mvm_add_sta_cmd or &struct iwl_mvm_add_sta_cmd_v7.
130          */
131         ADD_STA = 0x18,
132
133         /**
134          * @REMOVE_STA: &struct iwl_mvm_rm_sta_cmd
135          */
136         REMOVE_STA = 0x19,
137
138         /**
139          * @FW_GET_ITEM_CMD: uses &struct iwl_fw_get_item_cmd
140          */
141         FW_GET_ITEM_CMD = 0x1a,
142
143         /**
144          * @TX_CMD: uses &struct iwl_tx_cmd or &struct iwl_tx_cmd_gen2 or
145          *      &struct iwl_tx_cmd_gen3,
146          *      response in &struct iwl_mvm_tx_resp or
147          *      &struct iwl_mvm_tx_resp_v3
148          */
149         TX_CMD = 0x1c,
150
151         /**
152          * @TXPATH_FLUSH: &struct iwl_tx_path_flush_cmd
153          */
154         TXPATH_FLUSH = 0x1e,
155
156         /**
157          * @MGMT_MCAST_KEY:
158          * &struct iwl_mvm_mgmt_mcast_key_cmd or
159          * &struct iwl_mvm_mgmt_mcast_key_cmd_v1
160          */
161         MGMT_MCAST_KEY = 0x1f,
162
163         /* scheduler config */
164         /**
165          * @SCD_QUEUE_CFG: &struct iwl_scd_txq_cfg_cmd for older hardware,
166          *      &struct iwl_tx_queue_cfg_cmd with &struct iwl_tx_queue_cfg_rsp
167          *      for newer (22000) hardware.
168          */
169         SCD_QUEUE_CFG = 0x1d,
170
171         /**
172          * @WEP_KEY: uses &struct iwl_mvm_wep_key_cmd
173          */
174         WEP_KEY = 0x20,
175
176         /**
177          * @SHARED_MEM_CFG:
178          * retrieve shared memory configuration - response in
179          * &struct iwl_shared_mem_cfg
180          */
181         SHARED_MEM_CFG = 0x25,
182
183         /**
184          * @TDLS_CHANNEL_SWITCH_CMD: uses &struct iwl_tdls_channel_switch_cmd
185          */
186         TDLS_CHANNEL_SWITCH_CMD = 0x27,
187
188         /**
189          * @TDLS_CHANNEL_SWITCH_NOTIFICATION:
190          * uses &struct iwl_tdls_channel_switch_notif
191          */
192         TDLS_CHANNEL_SWITCH_NOTIFICATION = 0xaa,
193
194         /**
195          * @TDLS_CONFIG_CMD:
196          * &struct iwl_tdls_config_cmd, response in &struct iwl_tdls_config_res
197          */
198         TDLS_CONFIG_CMD = 0xa7,
199
200         /**
201          * @MAC_CONTEXT_CMD: &struct iwl_mac_ctx_cmd
202          */
203         MAC_CONTEXT_CMD = 0x28,
204
205         /**
206          * @TIME_EVENT_CMD:
207          * &struct iwl_time_event_cmd, response in &struct iwl_time_event_resp
208          */
209         TIME_EVENT_CMD = 0x29, /* both CMD and response */
210
211         /**
212          * @TIME_EVENT_NOTIFICATION: &struct iwl_time_event_notif
213          */
214         TIME_EVENT_NOTIFICATION = 0x2a,
215
216         /**
217          * @BINDING_CONTEXT_CMD:
218          * &struct iwl_binding_cmd or &struct iwl_binding_cmd_v1
219          */
220         BINDING_CONTEXT_CMD = 0x2b,
221
222         /**
223          * @TIME_QUOTA_CMD: &struct iwl_time_quota_cmd
224          */
225         TIME_QUOTA_CMD = 0x2c,
226
227         /**
228          * @NON_QOS_TX_COUNTER_CMD:
229          * command is &struct iwl_nonqos_seq_query_cmd
230          */
231         NON_QOS_TX_COUNTER_CMD = 0x2d,
232
233         /**
234          * @LEDS_CMD: command is &struct iwl_led_cmd
235          */
236         LEDS_CMD = 0x48,
237
238         /**
239          * @LQ_CMD: using &struct iwl_lq_cmd
240          */
241         LQ_CMD = 0x4e,
242
243         /**
244          * @FW_PAGING_BLOCK_CMD:
245          * &struct iwl_fw_paging_cmd
246          */
247         FW_PAGING_BLOCK_CMD = 0x4f,
248
249         /**
250          * @SCAN_OFFLOAD_REQUEST_CMD: uses &struct iwl_scan_req_lmac
251          */
252         SCAN_OFFLOAD_REQUEST_CMD = 0x51,
253
254         /**
255          * @SCAN_OFFLOAD_ABORT_CMD: abort the scan - no further contents
256          */
257         SCAN_OFFLOAD_ABORT_CMD = 0x52,
258
259         /**
260          * @HOT_SPOT_CMD: uses &struct iwl_hs20_roc_req
261          */
262         HOT_SPOT_CMD = 0x53,
263
264         /**
265          * @SCAN_OFFLOAD_COMPLETE:
266          * notification, &struct iwl_periodic_scan_complete
267          */
268         SCAN_OFFLOAD_COMPLETE = 0x6D,
269
270         /**
271          * @SCAN_OFFLOAD_UPDATE_PROFILES_CMD:
272          * update scan offload (scheduled scan) profiles/blocklist/etc.
273          */
274         SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6E,
275
276         /**
277          * @MATCH_FOUND_NOTIFICATION: scan match found
278          */
279         MATCH_FOUND_NOTIFICATION = 0xd9,
280
281         /**
282          * @SCAN_ITERATION_COMPLETE:
283          * uses &struct iwl_lmac_scan_complete_notif
284          */
285         SCAN_ITERATION_COMPLETE = 0xe7,
286
287         /* Phy */
288         /**
289          * @PHY_CONFIGURATION_CMD: &struct iwl_phy_cfg_cmd_v1 or &struct iwl_phy_cfg_cmd_v3
290          */
291         PHY_CONFIGURATION_CMD = 0x6a,
292
293         /**
294          * @CALIB_RES_NOTIF_PHY_DB: &struct iwl_calib_res_notif_phy_db
295          */
296         CALIB_RES_NOTIF_PHY_DB = 0x6b,
297
298         /**
299          * @PHY_DB_CMD: &struct iwl_phy_db_cmd
300          */
301         PHY_DB_CMD = 0x6c,
302
303         /**
304          * @POWER_TABLE_CMD: &struct iwl_device_power_cmd
305          */
306         POWER_TABLE_CMD = 0x77,
307
308         /**
309          * @PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION:
310          * &struct iwl_uapsd_misbehaving_ap_notif
311          */
312         PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78,
313
314         /**
315          * @LTR_CONFIG: &struct iwl_ltr_config_cmd
316          */
317         LTR_CONFIG = 0xee,
318
319         /**
320          * @REPLY_THERMAL_MNG_BACKOFF:
321          * Thermal throttling command
322          */
323         REPLY_THERMAL_MNG_BACKOFF = 0x7e,
324
325         /**
326          * @NVM_ACCESS_CMD: using &struct iwl_nvm_access_cmd
327          */
328         NVM_ACCESS_CMD = 0x88,
329
330         /**
331          * @BEACON_NOTIFICATION: &struct iwl_extended_beacon_notif
332          */
333         BEACON_NOTIFICATION = 0x90,
334
335         /**
336          * @BEACON_TEMPLATE_CMD:
337          *      Uses one of &struct iwl_mac_beacon_cmd_v6,
338          *      &struct iwl_mac_beacon_cmd_v7 or &struct iwl_mac_beacon_cmd
339          *      depending on the device version.
340          */
341         BEACON_TEMPLATE_CMD = 0x91,
342         /**
343          * @TX_ANT_CONFIGURATION_CMD: &struct iwl_tx_ant_cfg_cmd
344          */
345         TX_ANT_CONFIGURATION_CMD = 0x98,
346
347         /**
348          * @STATISTICS_CMD:
349          * one of &struct iwl_statistics_cmd,
350          * &struct iwl_notif_statistics_v11,
351          * &struct iwl_notif_statistics_v10,
352          * &struct iwl_notif_statistics,
353          * &struct iwl_statistics_operational_ntfy_ver_14
354          */
355         STATISTICS_CMD = 0x9c,
356
357         /**
358          * @STATISTICS_NOTIFICATION:
359          * one of &struct iwl_notif_statistics_v10,
360          * &struct iwl_notif_statistics_v11,
361          * &struct iwl_notif_statistic,
362          * &struct iwl_statistics_operational_ntfy_ver_14
363          * &struct iwl_statistics_operational_ntfy
364          */
365         STATISTICS_NOTIFICATION = 0x9d,
366
367         /**
368          * @EOSP_NOTIFICATION:
369          * Notify that a service period ended,
370          * &struct iwl_mvm_eosp_notification
371          */
372         EOSP_NOTIFICATION = 0x9e,
373
374         /**
375          * @REDUCE_TX_POWER_CMD:
376          * &struct iwl_dev_tx_power_cmd
377          */
378         REDUCE_TX_POWER_CMD = 0x9f,
379
380         /**
381          * @MISSED_BEACONS_NOTIFICATION: &struct iwl_missed_beacons_notif
382          */
383         MISSED_BEACONS_NOTIFICATION = 0xa2,
384
385         /**
386          * @MAC_PM_POWER_TABLE: using &struct iwl_mac_power_cmd
387          */
388         MAC_PM_POWER_TABLE = 0xa9,
389
390         /**
391          * @MFUART_LOAD_NOTIFICATION: &struct iwl_mfuart_load_notif
392          */
393         MFUART_LOAD_NOTIFICATION = 0xb1,
394
395         /**
396          * @RSS_CONFIG_CMD: &struct iwl_rss_config_cmd
397          */
398         RSS_CONFIG_CMD = 0xb3,
399
400         /**
401          * @REPLY_RX_PHY_CMD: &struct iwl_rx_phy_info
402          */
403         REPLY_RX_PHY_CMD = 0xc0,
404
405         /**
406          * @REPLY_RX_MPDU_CMD:
407          * &struct iwl_rx_mpdu_res_start or &struct iwl_rx_mpdu_desc
408          */
409         REPLY_RX_MPDU_CMD = 0xc1,
410
411         /**
412          * @BAR_FRAME_RELEASE: Frame release from BAR notification, used for
413          *      multi-TID BAR (previously, the BAR frame itself was reported
414          *      instead). Uses &struct iwl_bar_frame_release.
415          */
416         BAR_FRAME_RELEASE = 0xc2,
417
418         /**
419          * @FRAME_RELEASE:
420          * Frame release (reorder helper) notification, uses
421          * &struct iwl_frame_release
422          */
423         FRAME_RELEASE = 0xc3,
424
425         /**
426          * @BA_NOTIF:
427          * BlockAck notification, uses &struct iwl_mvm_compressed_ba_notif
428          * or &struct iwl_mvm_ba_notif depending on the HW
429          */
430         BA_NOTIF = 0xc5,
431
432         /* Location Aware Regulatory */
433         /**
434          * @MCC_UPDATE_CMD: using &struct iwl_mcc_update_cmd
435          */
436         MCC_UPDATE_CMD = 0xc8,
437
438         /**
439          * @MCC_CHUB_UPDATE_CMD: using &struct iwl_mcc_chub_notif
440          */
441         MCC_CHUB_UPDATE_CMD = 0xc9,
442
443         /**
444          * @MARKER_CMD: trace marker command, uses &struct iwl_mvm_marker
445          * with &struct iwl_mvm_marker_rsp
446          */
447         MARKER_CMD = 0xcb,
448
449         /**
450          * @BT_PROFILE_NOTIFICATION: &struct iwl_bt_coex_profile_notif
451          */
452         BT_PROFILE_NOTIFICATION = 0xce,
453
454         /**
455          * @BT_CONFIG: &struct iwl_bt_coex_cmd
456          */
457         BT_CONFIG = 0x9b,
458
459         /**
460          * @BT_COEX_UPDATE_REDUCED_TXP:
461          * &struct iwl_bt_coex_reduced_txp_update_cmd
462          */
463         BT_COEX_UPDATE_REDUCED_TXP = 0x5c,
464
465         /**
466          * @BT_COEX_CI: &struct iwl_bt_coex_ci_cmd
467          */
468         BT_COEX_CI = 0x5d,
469
470         /**
471          * @REPLY_SF_CFG_CMD: &struct iwl_sf_cfg_cmd
472          */
473         REPLY_SF_CFG_CMD = 0xd1,
474         /**
475          * @REPLY_BEACON_FILTERING_CMD: &struct iwl_beacon_filter_cmd
476          */
477         REPLY_BEACON_FILTERING_CMD = 0xd2,
478
479         /**
480          * @DTS_MEASUREMENT_NOTIFICATION:
481          * &struct iwl_dts_measurement_notif_v1 or
482          * &struct iwl_dts_measurement_notif_v2
483          */
484         DTS_MEASUREMENT_NOTIFICATION = 0xdd,
485
486         /**
487          * @LDBG_CONFIG_CMD: configure continuous trace recording
488          */
489         LDBG_CONFIG_CMD = 0xf6,
490
491         /**
492          * @DEBUG_LOG_MSG: Debugging log data from firmware
493          */
494         DEBUG_LOG_MSG = 0xf7,
495
496         /**
497          * @MCAST_FILTER_CMD: &struct iwl_mcast_filter_cmd
498          */
499         MCAST_FILTER_CMD = 0xd0,
500
501         /**
502          * @D3_CONFIG_CMD: &struct iwl_d3_manager_config
503          */
504         D3_CONFIG_CMD = 0xd3,
505
506         /**
507          * @PROT_OFFLOAD_CONFIG_CMD: Depending on firmware, uses one of
508          * &struct iwl_proto_offload_cmd_v1, &struct iwl_proto_offload_cmd_v2,
509          * &struct iwl_proto_offload_cmd_v3_small,
510          * &struct iwl_proto_offload_cmd_v3_large
511          */
512         PROT_OFFLOAD_CONFIG_CMD = 0xd4,
513
514         /**
515          * @OFFLOADS_QUERY_CMD:
516          * No data in command, response in &struct iwl_wowlan_status
517          */
518         OFFLOADS_QUERY_CMD = 0xd5,
519
520         /**
521          * @D0I3_END_CMD: End D0i3/D3 state, no command data
522          */
523         D0I3_END_CMD = 0xed,
524
525         /**
526          * @WOWLAN_PATTERNS: &struct iwl_wowlan_patterns_cmd
527          */
528         WOWLAN_PATTERNS = 0xe0,
529
530         /**
531          * @WOWLAN_CONFIGURATION: &struct iwl_wowlan_config_cmd
532          */
533         WOWLAN_CONFIGURATION = 0xe1,
534
535         /**
536          * @WOWLAN_TSC_RSC_PARAM: &struct iwl_wowlan_rsc_tsc_params_cmd_v4,
537          *      &struct iwl_wowlan_rsc_tsc_params_cmd
538          */
539         WOWLAN_TSC_RSC_PARAM = 0xe2,
540
541         /**
542          * @WOWLAN_TKIP_PARAM: &struct iwl_wowlan_tkip_params_cmd
543          */
544         WOWLAN_TKIP_PARAM = 0xe3,
545
546         /**
547          * @WOWLAN_KEK_KCK_MATERIAL: &struct iwl_wowlan_kek_kck_material_cmd
548          */
549         WOWLAN_KEK_KCK_MATERIAL = 0xe4,
550
551         /**
552          * @WOWLAN_GET_STATUSES: response in &struct iwl_wowlan_status
553          */
554         WOWLAN_GET_STATUSES = 0xe5,
555
556         /**
557          * @SCAN_OFFLOAD_PROFILES_QUERY_CMD:
558          * No command data, response is &struct iwl_scan_offload_profiles_query
559          */
560         SCAN_OFFLOAD_PROFILES_QUERY_CMD = 0x56,
561 };
562
563 /**
564  * enum iwl_system_subcmd_ids - system group command IDs
565  */
566 enum iwl_system_subcmd_ids {
567         /**
568          * @SHARED_MEM_CFG_CMD:
569          * response in &struct iwl_shared_mem_cfg or
570          * &struct iwl_shared_mem_cfg_v2
571          */
572         SHARED_MEM_CFG_CMD = 0x0,
573
574         /**
575          * @SOC_CONFIGURATION_CMD: &struct iwl_soc_configuration_cmd
576          */
577         SOC_CONFIGURATION_CMD = 0x01,
578
579         /**
580          * @INIT_EXTENDED_CFG_CMD: &struct iwl_init_extended_cfg_cmd
581          */
582         INIT_EXTENDED_CFG_CMD = 0x03,
583
584         /**
585          * @FW_ERROR_RECOVERY_CMD: &struct iwl_fw_error_recovery_cmd
586          */
587         FW_ERROR_RECOVERY_CMD = 0x7,
588
589         /**
590          * @RFI_CONFIG_CMD: &struct iwl_rfi_config_cmd
591          */
592         RFI_CONFIG_CMD = 0xb,
593
594         /**
595          * @RFI_GET_FREQ_TABLE_CMD: &struct iwl_rfi_config_cmd
596          */
597         RFI_GET_FREQ_TABLE_CMD = 0xc,
598
599         /**
600          * @SYSTEM_FEATURES_CONTROL_CMD: &struct iwl_system_features_control_cmd
601          */
602         SYSTEM_FEATURES_CONTROL_CMD = 0xd,
603
604         /**
605          * @RFI_DEACTIVATE_NOTIF: &struct iwl_rfi_deactivate_notif
606          */
607         RFI_DEACTIVATE_NOTIF = 0xff,
608 };
609
610 #endif /* __iwl_fw_api_commands_h__ */