Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/datapath.h
48425 views
1
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2
/*
3
* Copyright (C) 2024-2025 Intel Corporation
4
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
5
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
6
* Copyright (C) 2016-2017 Intel Deutschland GmbH
7
*/
8
#ifndef __iwl_fw_api_datapath_h__
9
#define __iwl_fw_api_datapath_h__
10
11
/**
12
* enum iwl_data_path_subcmd_ids - data path group commands
13
*/
14
enum iwl_data_path_subcmd_ids {
15
/**
16
* @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd
17
*/
18
DQA_ENABLE_CMD = 0x0,
19
20
/**
21
* @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd
22
*/
23
UPDATE_MU_GROUPS_CMD = 0x1,
24
25
/**
26
* @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd
27
*/
28
TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2,
29
30
/**
31
* @WNM_PLATFORM_PTM_REQUEST_CMD: &struct iwl_time_sync_cfg_cmd
32
*/
33
WNM_PLATFORM_PTM_REQUEST_CMD = 0x3,
34
35
/**
36
* @WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD:
37
* &struct iwl_time_sync_cfg_cmd
38
*/
39
WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD = 0x4,
40
41
/**
42
* @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd_v1,
43
* &struct iwl_he_sta_context_cmd_v2 or
44
* &struct iwl_he_sta_context_cmd_v3
45
*/
46
STA_HE_CTXT_CMD = 0x7,
47
48
/**
49
* @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd
50
*/
51
RLC_CONFIG_CMD = 0x8,
52
53
/**
54
* @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config
55
*/
56
RFH_QUEUE_CONFIG_CMD = 0xD,
57
58
/**
59
* @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v4
60
*/
61
TLC_MNG_CONFIG_CMD = 0xF,
62
63
/**
64
* @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd
65
*/
66
HE_AIR_SNIFFER_CONFIG_CMD = 0x13,
67
68
/**
69
* @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI
70
* matrix collection, uses &struct iwl_channel_estimation_cfg
71
*/
72
CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14,
73
74
/**
75
* @RX_BAID_ALLOCATION_CONFIG_CMD: Allocate/deallocate a BAID for an RX
76
* blockack session, uses &struct iwl_rx_baid_cfg_cmd for the
77
* command, and &struct iwl_rx_baid_cfg_resp as a response.
78
*/
79
RX_BAID_ALLOCATION_CONFIG_CMD = 0x16,
80
81
/**
82
* @SCD_QUEUE_CONFIG_CMD: new scheduler queue allocation/config/removal
83
* command, uses &struct iwl_scd_queue_cfg_cmd and the response
84
* is (same as before) &struct iwl_tx_queue_cfg_rsp.
85
*/
86
SCD_QUEUE_CONFIG_CMD = 0x17,
87
88
/**
89
* @SEC_KEY_CMD: security key command, uses &struct iwl_sec_key_cmd
90
*/
91
SEC_KEY_CMD = 0x18,
92
93
/**
94
* @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode,
95
* uses &struct iwl_esr_mode_notif or &struct iwl_esr_mode_notif_v1
96
*/
97
ESR_MODE_NOTIF = 0xF3,
98
99
/**
100
* @MONITOR_NOTIF: Datapath monitoring notification, using
101
* &struct iwl_datapath_monitor_notif
102
*/
103
MONITOR_NOTIF = 0xF4,
104
105
/**
106
* @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data or &struct iwl_rx_no_data_ver_3
107
*/
108
RX_NO_DATA_NOTIF = 0xF5,
109
110
/**
111
* @THERMAL_DUAL_CHAIN_REQUEST: firmware request for SMPS mode,
112
* &struct iwl_thermal_dual_chain_request
113
*/
114
THERMAL_DUAL_CHAIN_REQUEST = 0xF6,
115
116
/**
117
* @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif
118
*/
119
TLC_MNG_UPDATE_NOTIF = 0xF7,
120
121
/**
122
* @BEACON_FILTER_IN_NOTIF: &struct iwl_beacon_filter_notif
123
*/
124
BEACON_FILTER_IN_NOTIF = 0xF8,
125
126
/**
127
* @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification
128
*/
129
STA_PM_NOTIF = 0xFD,
130
131
/**
132
* @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif
133
*/
134
MU_GROUP_MGMT_NOTIF = 0xFE,
135
136
/**
137
* @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification
138
*/
139
RX_QUEUES_NOTIFICATION = 0xFF,
140
};
141
142
/**
143
* struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration
144
*
145
* @reserved: reserved
146
* @membership_status: a bitmap of MU groups
147
* @user_position:the position of station in a group. If the station is in the
148
* group then bits (group * 2) is the position -1
149
*/
150
struct iwl_mu_group_mgmt_cmd {
151
__le32 reserved;
152
__le32 membership_status[2];
153
__le32 user_position[4];
154
} __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */
155
156
/**
157
* struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification
158
*
159
* @membership_status: a bitmap of MU groups
160
* @user_position: the position of station in a group. If the station is in the
161
* group then bits (group * 2) is the position -1
162
*/
163
struct iwl_mu_group_mgmt_notif {
164
__le32 membership_status[2];
165
__le32 user_position[4];
166
} __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */
167
168
enum iwl_channel_estimation_flags {
169
IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0),
170
IWL_CHANNEL_ESTIMATION_TIMER = BIT(1),
171
IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2),
172
};
173
174
enum iwl_time_sync_protocol_type {
175
IWL_TIME_SYNC_PROTOCOL_TM = BIT(0),
176
IWL_TIME_SYNC_PROTOCOL_FTM = BIT(1),
177
}; /* WNM_TIMING_ENABLED_PROTOCOL_API_E_VER_1 */
178
179
/**
180
* struct iwl_time_sync_cfg_cmd - TM/FTM time sync measurement configuration
181
*
182
* @protocols: The type of frames to raise notifications for. A bitmap
183
* of @iwl_time_sync_protocol_type
184
* @peer_addr: peer address with which TM/FTM measurements are required
185
* @reserved: for alignment
186
*/
187
struct iwl_time_sync_cfg_cmd {
188
__le32 protocols;
189
u8 peer_addr[ETH_ALEN];
190
u8 reserved[2];
191
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD_API_S_VER_1 */
192
193
/**
194
* enum iwl_synced_time_operation - PTM request options
195
*
196
* @IWL_SYNCED_TIME_OPERATION_READ_ARTB: read only the ARTB time
197
* @IWL_SYNCED_TIME_OPERATION_READ_GP2: read only the GP2 time
198
* @IWL_SYNCED_TIME_OPERATION_READ_BOTH: latch the ARTB and GP2 clocks and
199
* provide timestamps from both clocks for the same time point
200
*/
201
enum iwl_synced_time_operation {
202
IWL_SYNCED_TIME_OPERATION_READ_ARTB = 1,
203
IWL_SYNCED_TIME_OPERATION_READ_GP2,
204
IWL_SYNCED_TIME_OPERATION_READ_BOTH,
205
};
206
207
/**
208
* struct iwl_synced_time_cmd - request synced GP2/ARTB timestamps
209
*
210
* @operation: one of &enum iwl_synced_time_operation
211
*/
212
struct iwl_synced_time_cmd {
213
__le32 operation;
214
} __packed; /* WNM_80211V_TIMING_CMD_API_S_VER_1 */
215
216
/**
217
* struct iwl_synced_time_rsp - response to iwl_synced_time_cmd
218
*
219
* @operation: one of &enum iwl_synced_time_operation
220
* @platform_timestamp_hi: high DWORD of the ARTB clock timestamp in nanoseconds
221
* @platform_timestamp_lo: low DWORD of the ARTB clock timestamp in nanoseconds
222
* @gp2_timestamp_hi: high DWORD of the GP2 clock timestamp in 10's of
223
* nanoseconds
224
* @gp2_timestamp_lo: low DWORD of the GP2 clock timestamp in 10's of
225
* nanoseconds
226
*/
227
struct iwl_synced_time_rsp {
228
__le32 operation;
229
__le32 platform_timestamp_hi;
230
__le32 platform_timestamp_lo;
231
__le32 gp2_timestamp_hi;
232
__le32 gp2_timestamp_lo;
233
} __packed; /* WNM_80211V_TIMING_RSP_API_S_VER_1 */
234
235
/* PTP_CTX_MAX_DATA_SIZE_IN_API_D_VER_1 */
236
#define PTP_CTX_MAX_DATA_SIZE 128
237
238
/**
239
* struct iwl_time_msmt_ptp_ctx - Vendor specific element
240
* to allow a space for flexibility for the userspace App
241
*
242
* @ftm: FTM specific vendor element
243
* @ftm.element_id: element id of vendor specific ie
244
* @ftm.length: length of vendor specific ie
245
* @ftm.reserved: for alignment
246
* @ftm.data: vendor specific data blob
247
* @tm: TM specific vendor element
248
* @tm.element_id: element id of vendor specific ie
249
* @tm.length: length of vendor specific ie
250
* @tm.data: vendor specific data blob
251
*/
252
struct iwl_time_msmt_ptp_ctx {
253
/* Differentiate between FTM and TM specific Vendor elements */
254
union {
255
struct {
256
u8 element_id;
257
u8 length;
258
__le16 reserved;
259
u8 data[PTP_CTX_MAX_DATA_SIZE];
260
} ftm;
261
struct {
262
u8 element_id;
263
u8 length;
264
u8 data[PTP_CTX_MAX_DATA_SIZE];
265
} tm;
266
};
267
} __packed /* PTP_CTX_VER_1 */;
268
269
/**
270
* struct iwl_time_msmt_notify - Time Sync measurement notification
271
* for TM/FTM, along with additional meta data.
272
*
273
* @peer_addr: peer address
274
* @reserved: for alignment
275
* @dialog_token: measurement flow dialog token number
276
* @followup_dialog_token: Measurement flow previous dialog token number
277
* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on
278
* sender side in units of 10 nano seconds
279
* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on
280
* sender side in units of 10 nano seconds
281
* @t1_max_err: maximum t1-time error in units of 10 nano seconds
282
* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on
283
* sender side in units of 10 nano seconds
284
* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on
285
* sender side in units of 10 nano seconds
286
* @t4_max_err: maximum t4-time error in units of 10 nano seconds
287
* @t2_hi: high dword of t2-time of the Rx'ed action frame arrival on
288
* receiver side in units of 10 nano seconds
289
* @t2_lo: low dword of t2-time of the Rx'ed action frame arrival on
290
* receiver side in units of 10 nano seconds
291
* @t2_max_err: maximum t2-time error in units of 10 nano seconds
292
* @t3_hi: high dword of t3-time of the Tx'ed action frame's Ack departure on
293
* receiver side in units of 10 nano seconds
294
* @t3_lo: low dword of t3-time of the Tx'ed action frame's Ack departure on
295
* receiver side in units of 10 nano seconds
296
* @t3_max_err: maximum t3-time error in units of 10 nano seconds
297
* @ptp: vendor specific information element
298
*/
299
struct iwl_time_msmt_notify {
300
u8 peer_addr[ETH_ALEN];
301
u8 reserved[2];
302
__le32 dialog_token;
303
__le32 followup_dialog_token;
304
__le32 t1_hi;
305
__le32 t1_lo;
306
__le32 t1_max_err;
307
__le32 t4_hi;
308
__le32 t4_lo;
309
__le32 t4_max_err;
310
__le32 t2_hi;
311
__le32 t2_lo;
312
__le32 t2_max_err;
313
__le32 t3_hi;
314
__le32 t3_lo;
315
__le32 t3_max_err;
316
struct iwl_time_msmt_ptp_ctx ptp;
317
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_NTFY_API_S_VER_1 */
318
319
/**
320
* struct iwl_time_msmt_cfm_notify - Time Sync measurement confirmation
321
* notification for TM/FTM. Sent on receipt of 802.11 Ack from peer for the
322
* Tx'ed TM/FTM measurement action frame.
323
*
324
* @peer_addr: peer address
325
* @reserved: for alignment
326
* @dialog_token: measurement flow dialog token number
327
* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on
328
* sender side in units of 10 nano seconds
329
* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on
330
* sender side in units of 10 nano seconds
331
* @t1_max_err: maximum t1-time error in units of 10 nano seconds
332
* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on
333
* sender side in units of 10 nano seconds
334
* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on
335
* sender side in units of 10 nano seconds
336
* @t4_max_err: maximum t4-time error in units of 10 nano seconds
337
*/
338
struct iwl_time_msmt_cfm_notify {
339
u8 peer_addr[ETH_ALEN];
340
u8 reserved[2];
341
__le32 dialog_token;
342
__le32 t1_hi;
343
__le32 t1_lo;
344
__le32 t1_max_err;
345
__le32 t4_hi;
346
__le32 t4_lo;
347
__le32 t4_max_err;
348
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIRM_NTFY_API_S_VER_1 */
349
350
/**
351
* struct iwl_channel_estimation_cfg - channel estimation reporting config
352
*/
353
struct iwl_channel_estimation_cfg {
354
/**
355
* @flags: flags, see &enum iwl_channel_estimation_flags
356
*/
357
__le32 flags;
358
/**
359
* @timer: if enabled via flags, automatically disable after this many
360
* microseconds
361
*/
362
__le32 timer;
363
/**
364
* @count: if enabled via flags, automatically disable after this many
365
* frames with channel estimation matrix were captured
366
*/
367
__le32 count;
368
/**
369
* @rate_n_flags_mask: only try to record the channel estimation matrix
370
* if the rate_n_flags value for the received frame (let's call
371
* that rx_rnf) matches the mask/value given here like this:
372
* (rx_rnf & rate_n_flags_mask) == rate_n_flags_val.
373
*/
374
__le32 rate_n_flags_mask;
375
/**
376
* @rate_n_flags_val: see @rate_n_flags_mask
377
*/
378
__le32 rate_n_flags_val;
379
/**
380
* @reserved: reserved (for alignment)
381
*/
382
__le32 reserved;
383
/**
384
* @frame_types: bitmap of frame types to capture, the received frame's
385
* subtype|type takes 6 bits in the frame and the corresponding bit
386
* in this field must be set to 1 to capture channel estimation for
387
* that frame type. Set to all-ones to enable capturing for all
388
* frame types.
389
*/
390
__le64 frame_types;
391
} __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */
392
393
enum iwl_datapath_monitor_notif_type {
394
IWL_DP_MON_NOTIF_TYPE_EXT_CCA,
395
};
396
397
struct iwl_datapath_monitor_notif {
398
__le32 type;
399
u8 link_id;
400
u8 reserved[3];
401
} __packed; /* MONITOR_NTF_API_S_VER_1 */
402
403
/**
404
* enum iwl_thermal_dual_chain_req_events - firmware SMPS request event
405
* @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation
406
* (subject to other constraints)
407
* @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation
408
* (static SMPS)
409
*/
410
enum iwl_thermal_dual_chain_req_events {
411
THERMAL_DUAL_CHAIN_REQ_ENABLE,
412
THERMAL_DUAL_CHAIN_REQ_DISABLE,
413
}; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */
414
415
/**
416
* struct iwl_thermal_dual_chain_request - SMPS request
417
* @event: the type of request, see &enum iwl_thermal_dual_chain_req_events
418
*/
419
struct iwl_thermal_dual_chain_request {
420
__le32 event;
421
} __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */
422
423
enum iwl_rlc_chain_info {
424
IWL_RLC_CHAIN_INFO_DRIVER_FORCE = BIT(0),
425
IWL_RLC_CHAIN_INFO_VALID = 0x000e,
426
IWL_RLC_CHAIN_INFO_FORCE = 0x0070,
427
IWL_RLC_CHAIN_INFO_FORCE_MIMO = 0x0380,
428
IWL_RLC_CHAIN_INFO_COUNT = 0x0c00,
429
IWL_RLC_CHAIN_INFO_MIMO_COUNT = 0x3000,
430
};
431
432
/**
433
* struct iwl_rlc_properties - RLC properties
434
* @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info
435
* @reserved: reserved
436
*/
437
struct iwl_rlc_properties {
438
__le32 rx_chain_info;
439
__le32 reserved;
440
} __packed; /* RLC_PROPERTIES_S_VER_1 */
441
442
enum iwl_sad_mode {
443
IWL_SAD_MODE_ENABLED = BIT(0),
444
IWL_SAD_MODE_DEFAULT_ANT_MSK = 0x6,
445
IWL_SAD_MODE_DEFAULT_ANT_FW = 0x0,
446
IWL_SAD_MODE_DEFAULT_ANT_A = 0x2,
447
IWL_SAD_MODE_DEFAULT_ANT_B = 0x4,
448
};
449
450
/**
451
* struct iwl_sad_properties - SAD properties
452
* @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode
453
* @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode
454
* @mac_id: MAC index
455
* @reserved: reserved
456
*/
457
struct iwl_sad_properties {
458
__le32 chain_a_sad_mode;
459
__le32 chain_b_sad_mode;
460
__le32 mac_id;
461
__le32 reserved;
462
} __packed;
463
464
/**
465
* struct iwl_rlc_config_cmd - RLC configuration
466
* @phy_id: PHY index
467
* @rlc: RLC properties, &struct iwl_rlc_properties
468
* @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties
469
* @flags: flags (unused)
470
* @reserved: reserved
471
*/
472
struct iwl_rlc_config_cmd {
473
__le32 phy_id;
474
struct iwl_rlc_properties rlc;
475
struct iwl_sad_properties sad;
476
u8 flags;
477
u8 reserved[3];
478
} __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */
479
480
#define IWL_MAX_BAID_OLD 16 /* MAX_IMMEDIATE_BA_API_D_VER_2 */
481
#define IWL_MAX_BAID 32 /* MAX_IMMEDIATE_BA_API_D_VER_3 */
482
483
/**
484
* enum iwl_rx_baid_action - BAID allocation/config action
485
* @IWL_RX_BAID_ACTION_ADD: add a new BAID session
486
* @IWL_RX_BAID_ACTION_MODIFY: modify the BAID session
487
* @IWL_RX_BAID_ACTION_REMOVE: remove the BAID session
488
*/
489
enum iwl_rx_baid_action {
490
IWL_RX_BAID_ACTION_ADD,
491
IWL_RX_BAID_ACTION_MODIFY,
492
IWL_RX_BAID_ACTION_REMOVE,
493
}; /* RX_BAID_ALLOCATION_ACTION_E_VER_1 */
494
495
/**
496
* struct iwl_rx_baid_cfg_cmd_alloc - BAID allocation data
497
* @sta_id_mask: station ID mask
498
* @tid: the TID for this session
499
* @reserved: reserved
500
* @ssn: the starting sequence number
501
* @win_size: RX BA session window size
502
*/
503
struct iwl_rx_baid_cfg_cmd_alloc {
504
__le32 sta_id_mask;
505
u8 tid;
506
u8 reserved[3];
507
__le16 ssn;
508
__le16 win_size;
509
} __packed; /* RX_BAID_ALLOCATION_ADD_CMD_API_S_VER_1 */
510
511
/**
512
* struct iwl_rx_baid_cfg_cmd_modify - BAID modification data
513
* @old_sta_id_mask: old station ID mask
514
* @new_sta_id_mask: new station ID mask
515
* @tid: TID of the BAID
516
*/
517
struct iwl_rx_baid_cfg_cmd_modify {
518
__le32 old_sta_id_mask;
519
__le32 new_sta_id_mask;
520
__le32 tid;
521
} __packed; /* RX_BAID_ALLOCATION_MODIFY_CMD_API_S_VER_2 */
522
523
/**
524
* struct iwl_rx_baid_cfg_cmd_remove_v1 - BAID removal data
525
* @baid: the BAID to remove
526
*/
527
struct iwl_rx_baid_cfg_cmd_remove_v1 {
528
__le32 baid;
529
} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_1 */
530
531
/**
532
* struct iwl_rx_baid_cfg_cmd_remove - BAID removal data
533
* @sta_id_mask: the station mask of the BAID to remove
534
* @tid: the TID of the BAID to remove
535
*/
536
struct iwl_rx_baid_cfg_cmd_remove {
537
__le32 sta_id_mask;
538
__le32 tid;
539
} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_2 */
540
541
/**
542
* struct iwl_rx_baid_cfg_cmd - BAID allocation/config command
543
* @action: the action, from &enum iwl_rx_baid_action
544
* @alloc: allocation data
545
* @modify: modify data
546
* @remove_v1: remove data (version 1)
547
* @remove: remove data
548
*/
549
struct iwl_rx_baid_cfg_cmd {
550
__le32 action;
551
union {
552
struct iwl_rx_baid_cfg_cmd_alloc alloc;
553
struct iwl_rx_baid_cfg_cmd_modify modify;
554
struct iwl_rx_baid_cfg_cmd_remove_v1 remove_v1;
555
struct iwl_rx_baid_cfg_cmd_remove remove;
556
}; /* RX_BAID_ALLOCATION_OPERATION_API_U_VER_2 */
557
} __packed; /* RX_BAID_ALLOCATION_CONFIG_CMD_API_S_VER_2 */
558
559
/**
560
* struct iwl_rx_baid_cfg_resp - BAID allocation response
561
* @baid: the allocated BAID
562
*/
563
struct iwl_rx_baid_cfg_resp {
564
__le32 baid;
565
}; /* RX_BAID_ALLOCATION_RESPONSE_API_S_VER_1 */
566
567
/**
568
* enum iwl_scd_queue_cfg_operation - scheduler queue operation
569
* @IWL_SCD_QUEUE_ADD: allocate a new queue
570
* @IWL_SCD_QUEUE_REMOVE: remove a queue
571
* @IWL_SCD_QUEUE_MODIFY: modify a queue
572
*/
573
enum iwl_scd_queue_cfg_operation {
574
IWL_SCD_QUEUE_ADD = 0,
575
IWL_SCD_QUEUE_REMOVE = 1,
576
IWL_SCD_QUEUE_MODIFY = 2,
577
};
578
579
/**
580
* struct iwl_scd_queue_cfg_cmd - scheduler queue allocation command
581
* @operation: the operation, see &enum iwl_scd_queue_cfg_operation
582
* @u: union depending on command usage
583
* @u.add.sta_mask: station mask
584
* @u.add.tid: TID
585
* @u.add.reserved: reserved
586
* @u.add.flags: flags from &enum iwl_tx_queue_cfg_actions, except
587
* %TX_QUEUE_CFG_ENABLE_QUEUE is not valid
588
* @u.add.cb_size: size code
589
* @u.add.bc_dram_addr: byte-count table IOVA
590
* @u.add.tfdq_dram_addr: TFD queue IOVA
591
* @u.remove.sta_mask: station mask of queue to remove
592
* @u.remove.tid: TID of queue to remove
593
* @u.modify.old_sta_mask: old station mask for modify
594
* @u.modify.tid: TID of queue to modify
595
* @u.modify.new_sta_mask: new station mask for modify
596
*/
597
struct iwl_scd_queue_cfg_cmd {
598
__le32 operation;
599
union {
600
struct {
601
__le32 sta_mask;
602
u8 tid;
603
u8 reserved[3];
604
__le32 flags;
605
__le32 cb_size;
606
__le64 bc_dram_addr;
607
__le64 tfdq_dram_addr;
608
} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */
609
struct {
610
__le32 sta_mask;
611
__le32 tid;
612
} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */
613
struct {
614
__le32 old_sta_mask;
615
__le32 tid;
616
__le32 new_sta_mask;
617
} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */
618
} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */
619
} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */
620
621
/**
622
* enum iwl_sec_key_flags - security key command key flags
623
* @IWL_SEC_KEY_FLAG_CIPHER_MASK: cipher mask
624
* @IWL_SEC_KEY_FLAG_CIPHER_WEP: WEP cipher
625
* @IWL_SEC_KEY_FLAG_CIPHER_CCMP: CCMP/CMAC cipher
626
* @IWL_SEC_KEY_FLAG_CIPHER_TKIP: TKIP cipher
627
* @IWL_SEC_KEY_FLAG_CIPHER_GCMP: GCMP/GMAC cipher
628
* @IWL_SEC_KEY_FLAG_NO_TX: don't install for TX
629
* @IWL_SEC_KEY_FLAG_KEY_SIZE: large key size (WEP-104, GCMP-256, GMAC-256)
630
* @IWL_SEC_KEY_FLAG_MFP: MFP is in used for this key
631
* @IWL_SEC_KEY_FLAG_MCAST_KEY: this is a multicast key
632
* @IWL_SEC_KEY_FLAG_SPP_AMSDU: SPP A-MSDU should be used
633
*/
634
enum iwl_sec_key_flags {
635
IWL_SEC_KEY_FLAG_CIPHER_MASK = 0x07,
636
IWL_SEC_KEY_FLAG_CIPHER_WEP = 0x01,
637
IWL_SEC_KEY_FLAG_CIPHER_CCMP = 0x02,
638
IWL_SEC_KEY_FLAG_CIPHER_TKIP = 0x03,
639
IWL_SEC_KEY_FLAG_CIPHER_GCMP = 0x05,
640
IWL_SEC_KEY_FLAG_NO_TX = 0x08,
641
IWL_SEC_KEY_FLAG_KEY_SIZE = 0x10,
642
IWL_SEC_KEY_FLAG_MFP = 0x20,
643
IWL_SEC_KEY_FLAG_MCAST_KEY = 0x40,
644
IWL_SEC_KEY_FLAG_SPP_AMSDU = 0x80,
645
};
646
647
#define IWL_SEC_WEP_KEY_OFFSET 3
648
649
/**
650
* struct iwl_sec_key_cmd - security key command
651
* @action: action from &enum iwl_ctxt_action
652
* @u: union depending on command type
653
* @u.add.sta_mask: station mask for the new key
654
* @u.add.key_id: key ID (0-7) for the new key
655
* @u.add.key_flags: key flags per &enum iwl_sec_key_flags
656
* @u.add.key: key material. WEP keys should start from &IWL_SEC_WEP_KEY_OFFSET.
657
* @u.add.tkip_mic_rx_key: TKIP MIC RX key
658
* @u.add.tkip_mic_tx_key: TKIP MIC TX key
659
* @u.add.rx_seq: RX sequence counter value
660
* @u.add.tx_seq: TX sequence counter value
661
* @u.modify.old_sta_mask: old station mask
662
* @u.modify.new_sta_mask: new station mask
663
* @u.modify.key_id: key ID
664
* @u.modify.key_flags: new key flags
665
* @u.remove.sta_mask: station mask
666
* @u.remove.key_id: key ID
667
* @u.remove.key_flags: key flags
668
*/
669
struct iwl_sec_key_cmd {
670
__le32 action;
671
union {
672
struct {
673
__le32 sta_mask;
674
__le32 key_id;
675
__le32 key_flags;
676
u8 key[32];
677
u8 tkip_mic_rx_key[8];
678
u8 tkip_mic_tx_key[8];
679
__le64 rx_seq;
680
__le64 tx_seq;
681
} __packed add; /* SEC_KEY_ADD_CMD_API_S_VER_1 */
682
struct {
683
__le32 old_sta_mask;
684
__le32 new_sta_mask;
685
__le32 key_id;
686
__le32 key_flags;
687
} __packed modify; /* SEC_KEY_MODIFY_CMD_API_S_VER_1 */
688
struct {
689
__le32 sta_mask;
690
__le32 key_id;
691
__le32 key_flags;
692
} __packed remove; /* SEC_KEY_REMOVE_CMD_API_S_VER_1 */
693
} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */
694
} __packed; /* SEC_KEY_CMD_API_S_VER_1 */
695
696
#endif /* __iwl_fw_api_datapath_h__ */
697
698