hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/wireless/intel/iwlwifi/fw/api/mac.h
....@@ -5,9 +5,8 @@
55 *
66 * GPL LICENSE SUMMARY
77 *
8
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
98 * Copyright(c) 2017 Intel Deutschland GmbH
10
- * Copyright(c) 2018 Intel Corporation
9
+ * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
1110 *
1211 * This program is free software; you can redistribute it and/or modify
1312 * it under the terms of version 2 of the GNU General Public License as
....@@ -27,9 +26,8 @@
2726 *
2827 * BSD LICENSE
2928 *
30
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
3129 * Copyright(c) 2017 Intel Deutschland GmbH
32
- * Copyright(c) 2018 Intel Corporation
30
+ * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
3331 * All rights reserved.
3432 *
3533 * Redistribution and use in source and binary forms, with or without
....@@ -72,7 +70,7 @@
7270 #define NUM_MAC_INDEX (NUM_MAC_INDEX_DRIVER + 1)
7371 #define NUM_MAC_INDEX_CDB (NUM_MAC_INDEX_DRIVER + 2)
7472
75
-#define IWL_MVM_STATION_COUNT 16
73
+#define IWL_MVM_STATION_COUNT_MAX 16
7674 #define IWL_MVM_INVALID_STA 0xFF
7775
7876 enum iwl_ac {
....@@ -151,9 +149,9 @@
151149 * @beacon_time: beacon transmit time in system time
152150 * @beacon_tsf: beacon transmit time in TSF
153151 * @bi: beacon interval in TU
154
- * @bi_reciprocal: 2^32 / bi
152
+ * @reserved1: reserved
155153 * @dtim_interval: dtim transmit time in TU
156
- * @dtim_reciprocal: 2^32 / dtim_interval
154
+ * @reserved2: reserved
157155 * @mcast_qid: queue ID for multicast traffic.
158156 * NOTE: obsolete from VER2 and on
159157 * @beacon_template: beacon template ID
....@@ -162,9 +160,9 @@
162160 __le32 beacon_time;
163161 __le64 beacon_tsf;
164162 __le32 bi;
165
- __le32 bi_reciprocal;
163
+ __le32 reserved1;
166164 __le32 dtim_interval;
167
- __le32 dtim_reciprocal;
165
+ __le32 reserved2;
168166 __le32 mcast_qid;
169167 __le32 beacon_template;
170168 } __packed; /* AP_MAC_DATA_API_S_VER_2 */
....@@ -174,16 +172,32 @@
174172 * @beacon_time: beacon transmit time in system time
175173 * @beacon_tsf: beacon transmit time in TSF
176174 * @bi: beacon interval in TU
177
- * @bi_reciprocal: 2^32 / bi
175
+ * @reserved: reserved
178176 * @beacon_template: beacon template ID
179177 */
180178 struct iwl_mac_data_ibss {
181179 __le32 beacon_time;
182180 __le64 beacon_tsf;
183181 __le32 bi;
184
- __le32 bi_reciprocal;
182
+ __le32 reserved;
185183 __le32 beacon_template;
186184 } __packed; /* IBSS_MAC_DATA_API_S_VER_1 */
185
+
186
+/**
187
+ * enum iwl_mac_data_policy - policy of the data path for this MAC
188
+ * @TWT_SUPPORTED: twt is supported
189
+ * @MORE_DATA_ACK_SUPPORTED: AP supports More Data Ack according to
190
+ * paragraph 9.4.1.17 in P802.11ax_D4 specification. Used for TWT
191
+ * early termination detection.
192
+ * @FLEXIBLE_TWT_SUPPORTED: AP supports flexible TWT schedule
193
+ * @PROTECTED_TWT_SUPPORTED: AP supports protected TWT frames (with 11w)
194
+ */
195
+enum iwl_mac_data_policy {
196
+ TWT_SUPPORTED = BIT(0),
197
+ MORE_DATA_ACK_SUPPORTED = BIT(1),
198
+ FLEXIBLE_TWT_SUPPORTED = BIT(2),
199
+ PROTECTED_TWT_SUPPORTED = BIT(3),
200
+};
187201
188202 /**
189203 * struct iwl_mac_data_sta - configuration data for station MAC context
....@@ -191,9 +205,9 @@
191205 * @dtim_time: DTIM arrival time in system time
192206 * @dtim_tsf: DTIM arrival time in TSF
193207 * @bi: beacon interval in TU, applicable only when associated
194
- * @bi_reciprocal: 2^32 / bi , applicable only when associated
208
+ * @reserved1: reserved
195209 * @dtim_interval: DTIM interval in TU, applicable only when associated
196
- * @dtim_reciprocal: 2^32 / dtim_interval , applicable only when associated
210
+ * @data_policy: see &enum iwl_mac_data_policy
197211 * @listen_interval: in beacon intervals, applicable only when associated
198212 * @assoc_id: unique ID assigned by the AP during association
199213 * @assoc_beacon_arrive_time: TSF of first beacon after association
....@@ -203,13 +217,13 @@
203217 __le32 dtim_time;
204218 __le64 dtim_tsf;
205219 __le32 bi;
206
- __le32 bi_reciprocal;
220
+ __le32 reserved1;
207221 __le32 dtim_interval;
208
- __le32 dtim_reciprocal;
222
+ __le32 data_policy;
209223 __le32 listen_interval;
210224 __le32 assoc_id;
211225 __le32 assoc_beacon_arrive_time;
212
-} __packed; /* STA_MAC_DATA_API_S_VER_1 */
226
+} __packed; /* STA_MAC_DATA_API_S_VER_2 */
213227
214228 /**
215229 * struct iwl_mac_data_go - configuration data for P2P GO MAC context
....@@ -233,7 +247,7 @@
233247 struct iwl_mac_data_p2p_sta {
234248 struct iwl_mac_data_sta sta;
235249 __le32 ctwin;
236
-} __packed; /* P2P_STA_MAC_DATA_API_S_VER_1 */
250
+} __packed; /* P2P_STA_MAC_DATA_API_S_VER_2 */
237251
238252 /**
239253 * struct iwl_mac_data_pibss - Pseudo IBSS config data
....@@ -378,13 +392,6 @@
378392 };
379393 } __packed; /* MAC_CONTEXT_CMD_API_S_VER_1 */
380394
381
-static inline u32 iwl_mvm_reciprocal(u32 v)
382
-{
383
- if (!v)
384
- return 0;
385
- return 0xFFFFFFFF / v;
386
-}
387
-
388395 #define IWL_NONQOS_SEQ_GET 0x1
389396 #define IWL_NONQOS_SEQ_SET 0x2
390397 struct iwl_nonqos_seq_query_cmd {
....@@ -432,6 +439,28 @@
432439 __le16 mu_time;
433440 } __packed; /* AC_QOS_DOT11AX_API_S */
434441
442
+/**
443
+ * enum iwl_he_pkt_ext_constellations - PPE constellation indices
444
+ * @IWL_HE_PKT_EXT_BPSK: BPSK
445
+ * @IWL_HE_PKT_EXT_QPSK: QPSK
446
+ * @IWL_HE_PKT_EXT_16QAM: 16-QAM
447
+ * @IWL_HE_PKT_EXT_64QAM: 64-QAM
448
+ * @IWL_HE_PKT_EXT_256QAM: 256-QAM
449
+ * @IWL_HE_PKT_EXT_1024QAM: 1024-QAM
450
+ * @IWL_HE_PKT_EXT_RESERVED: reserved value
451
+ * @IWL_HE_PKT_EXT_NONE: not defined
452
+ */
453
+enum iwl_he_pkt_ext_constellations {
454
+ IWL_HE_PKT_EXT_BPSK = 0,
455
+ IWL_HE_PKT_EXT_QPSK,
456
+ IWL_HE_PKT_EXT_16QAM,
457
+ IWL_HE_PKT_EXT_64QAM,
458
+ IWL_HE_PKT_EXT_256QAM,
459
+ IWL_HE_PKT_EXT_1024QAM,
460
+ IWL_HE_PKT_EXT_RESERVED,
461
+ IWL_HE_PKT_EXT_NONE,
462
+};
463
+
435464 #define MAX_HE_SUPP_NSS 2
436465 #define MAX_HE_CHANNEL_BW_INDX 4
437466
....@@ -477,6 +506,9 @@
477506 * enabled AGG, i.e. both BACK and non-BACK frames in a single AGG
478507 * @STA_CTXT_HE_MU_EDCA_CW: indicates that there is an element of MU EDCA
479508 * parameter set, i.e. the backoff counters for trig-based ACs
509
+ * @STA_CTXT_HE_RU_2MHZ_BLOCK: indicates that 26-tone RU OFDMA transmission are
510
+ * not allowed (as there are OBSS that might classify such transmissions as
511
+ * radar pulses).
480512 */
481513 enum iwl_he_sta_ctxt_flags {
482514 STA_CTXT_HE_REF_BSSID_VALID = BIT(4),
....@@ -488,6 +520,7 @@
488520 STA_CTXT_HE_CONST_TRIG_RND_ALLOC = BIT(10),
489521 STA_CTXT_HE_ACK_ENABLED = BIT(11),
490522 STA_CTXT_HE_MU_EDCA_CW = BIT(12),
523
+ STA_CTXT_HE_RU_2MHZ_BLOCK = BIT(14),
491524 };
492525
493526 /**
....@@ -519,6 +552,66 @@
519552 #define IWL_HE_HTC_LINK_ADAP_BOTH (3 << IWL_HE_HTC_LINK_ADAP_POS)
520553
521554 /**
555
+ * struct iwl_he_sta_context_cmd_v1 - configure FW to work with HE AP
556
+ * @sta_id: STA id
557
+ * @tid_limit: max num of TIDs in TX HE-SU multi-TID agg
558
+ * 0 - bad value, 1 - multi-tid not supported, 2..8 - tid limit
559
+ * @reserved1: reserved byte for future use
560
+ * @reserved2: reserved byte for future use
561
+ * @flags: see %iwl_11ax_sta_ctxt_flags
562
+ * @ref_bssid_addr: reference BSSID used by the AP
563
+ * @reserved0: reserved 2 bytes for aligning the ref_bssid_addr field to 8 bytes
564
+ * @htc_flags: which features are supported in HTC
565
+ * @frag_flags: frag support in A-MSDU
566
+ * @frag_level: frag support level
567
+ * @frag_max_num: max num of "open" MSDUs in the receiver (in power of 2)
568
+ * @frag_min_size: min frag size (except last frag)
569
+ * @pkt_ext: optional, exists according to PPE-present bit in the HE-PHY capa
570
+ * @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame
571
+ * @htc_trig_based_pkt_ext: default PE in 4us units
572
+ * @frame_time_rts_th: HE duration RTS threshold, in units of 32us
573
+ * @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1
574
+ * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1
575
+ * @reserved3: reserved byte for future use
576
+ * @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues
577
+ */
578
+struct iwl_he_sta_context_cmd_v1 {
579
+ u8 sta_id;
580
+ u8 tid_limit;
581
+ u8 reserved1;
582
+ u8 reserved2;
583
+ __le32 flags;
584
+
585
+ /* The below fields are set via Multiple BSSID IE */
586
+ u8 ref_bssid_addr[6];
587
+ __le16 reserved0;
588
+
589
+ /* The below fields are set via HE-capabilities IE */
590
+ __le32 htc_flags;
591
+
592
+ u8 frag_flags;
593
+ u8 frag_level;
594
+ u8 frag_max_num;
595
+ u8 frag_min_size;
596
+
597
+ /* The below fields are set via PPE thresholds element */
598
+ struct iwl_he_pkt_ext pkt_ext;
599
+
600
+ /* The below fields are set via HE-Operation IE */
601
+ u8 bss_color;
602
+ u8 htc_trig_based_pkt_ext;
603
+ __le16 frame_time_rts_th;
604
+
605
+ /* Random access parameter set (i.e. RAPS) */
606
+ u8 rand_alloc_ecwmin;
607
+ u8 rand_alloc_ecwmax;
608
+ __le16 reserved3;
609
+
610
+ /* The below fields are set via MU EDCA parameter set element */
611
+ struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
612
+} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_1 */
613
+
614
+/**
522615 * struct iwl_he_sta_context_cmd - configure FW to work with HE AP
523616 * @sta_id: STA id
524617 * @tid_limit: max num of TIDs in TX HE-SU multi-TID agg
....@@ -541,6 +634,14 @@
541634 * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1
542635 * @reserved3: reserved byte for future use
543636 * @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues
637
+ * @max_bssid_indicator: indicator of the max bssid supported on the associated
638
+ * bss
639
+ * @bssid_index: index of the associated VAP
640
+ * @ema_ap: AP supports enhanced Multi BSSID advertisement
641
+ * @profile_periodicity: number of Beacon periods that are needed to receive the
642
+ * complete VAPs info
643
+ * @bssid_count: actual number of VAPs in the MultiBSS Set
644
+ * @reserved4: alignment
544645 */
545646 struct iwl_he_sta_context_cmd {
546647 u8 sta_id;
....@@ -576,6 +677,27 @@
576677
577678 /* The below fields are set via MU EDCA parameter set element */
578679 struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
579
-} __packed; /* STA_CONTEXT_DOT11AX_API_S */
680
+
681
+ u8 max_bssid_indicator;
682
+ u8 bssid_index;
683
+ u8 ema_ap;
684
+ u8 profile_periodicity;
685
+ u8 bssid_count;
686
+ u8 reserved4[3];
687
+} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_2 */
688
+
689
+/**
690
+ * struct iwl_he_monitor_cmd - configure air sniffer for HE
691
+ * @bssid: the BSSID to sniff for
692
+ * @reserved1: reserved for dword alignment
693
+ * @aid: the AID to track on for HE MU
694
+ * @reserved2: reserved for future use
695
+ */
696
+struct iwl_he_monitor_cmd {
697
+ u8 bssid[6];
698
+ __le16 reserved1;
699
+ __le16 aid;
700
+ u8 reserved2[6];
701
+} __packed; /* HE_AIR_SNIFFER_CONFIG_CMD_API_S_VER_1 */
580702
581703 #endif /* __iwl_fw_api_mac_h__ */