.. | .. |
---|
5 | 5 | * |
---|
6 | 6 | * GPL LICENSE SUMMARY |
---|
7 | 7 | * |
---|
8 | | - * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
9 | 8 | * Copyright(c) 2017 Intel Deutschland GmbH |
---|
10 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 9 | + * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
---|
11 | 10 | * |
---|
12 | 11 | * This program is free software; you can redistribute it and/or modify |
---|
13 | 12 | * it under the terms of version 2 of the GNU General Public License as |
---|
.. | .. |
---|
27 | 26 | * |
---|
28 | 27 | * BSD LICENSE |
---|
29 | 28 | * |
---|
30 | | - * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
31 | 29 | * Copyright(c) 2017 Intel Deutschland GmbH |
---|
32 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 30 | + * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation |
---|
33 | 31 | * All rights reserved. |
---|
34 | 32 | * |
---|
35 | 33 | * Redistribution and use in source and binary forms, with or without |
---|
.. | .. |
---|
72 | 70 | #define NUM_MAC_INDEX (NUM_MAC_INDEX_DRIVER + 1) |
---|
73 | 71 | #define NUM_MAC_INDEX_CDB (NUM_MAC_INDEX_DRIVER + 2) |
---|
74 | 72 | |
---|
75 | | -#define IWL_MVM_STATION_COUNT 16 |
---|
| 73 | +#define IWL_MVM_STATION_COUNT_MAX 16 |
---|
76 | 74 | #define IWL_MVM_INVALID_STA 0xFF |
---|
77 | 75 | |
---|
78 | 76 | enum iwl_ac { |
---|
.. | .. |
---|
151 | 149 | * @beacon_time: beacon transmit time in system time |
---|
152 | 150 | * @beacon_tsf: beacon transmit time in TSF |
---|
153 | 151 | * @bi: beacon interval in TU |
---|
154 | | - * @bi_reciprocal: 2^32 / bi |
---|
| 152 | + * @reserved1: reserved |
---|
155 | 153 | * @dtim_interval: dtim transmit time in TU |
---|
156 | | - * @dtim_reciprocal: 2^32 / dtim_interval |
---|
| 154 | + * @reserved2: reserved |
---|
157 | 155 | * @mcast_qid: queue ID for multicast traffic. |
---|
158 | 156 | * NOTE: obsolete from VER2 and on |
---|
159 | 157 | * @beacon_template: beacon template ID |
---|
.. | .. |
---|
162 | 160 | __le32 beacon_time; |
---|
163 | 161 | __le64 beacon_tsf; |
---|
164 | 162 | __le32 bi; |
---|
165 | | - __le32 bi_reciprocal; |
---|
| 163 | + __le32 reserved1; |
---|
166 | 164 | __le32 dtim_interval; |
---|
167 | | - __le32 dtim_reciprocal; |
---|
| 165 | + __le32 reserved2; |
---|
168 | 166 | __le32 mcast_qid; |
---|
169 | 167 | __le32 beacon_template; |
---|
170 | 168 | } __packed; /* AP_MAC_DATA_API_S_VER_2 */ |
---|
.. | .. |
---|
174 | 172 | * @beacon_time: beacon transmit time in system time |
---|
175 | 173 | * @beacon_tsf: beacon transmit time in TSF |
---|
176 | 174 | * @bi: beacon interval in TU |
---|
177 | | - * @bi_reciprocal: 2^32 / bi |
---|
| 175 | + * @reserved: reserved |
---|
178 | 176 | * @beacon_template: beacon template ID |
---|
179 | 177 | */ |
---|
180 | 178 | struct iwl_mac_data_ibss { |
---|
181 | 179 | __le32 beacon_time; |
---|
182 | 180 | __le64 beacon_tsf; |
---|
183 | 181 | __le32 bi; |
---|
184 | | - __le32 bi_reciprocal; |
---|
| 182 | + __le32 reserved; |
---|
185 | 183 | __le32 beacon_template; |
---|
186 | 184 | } __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 | +}; |
---|
187 | 201 | |
---|
188 | 202 | /** |
---|
189 | 203 | * struct iwl_mac_data_sta - configuration data for station MAC context |
---|
.. | .. |
---|
191 | 205 | * @dtim_time: DTIM arrival time in system time |
---|
192 | 206 | * @dtim_tsf: DTIM arrival time in TSF |
---|
193 | 207 | * @bi: beacon interval in TU, applicable only when associated |
---|
194 | | - * @bi_reciprocal: 2^32 / bi , applicable only when associated |
---|
| 208 | + * @reserved1: reserved |
---|
195 | 209 | * @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 |
---|
197 | 211 | * @listen_interval: in beacon intervals, applicable only when associated |
---|
198 | 212 | * @assoc_id: unique ID assigned by the AP during association |
---|
199 | 213 | * @assoc_beacon_arrive_time: TSF of first beacon after association |
---|
.. | .. |
---|
203 | 217 | __le32 dtim_time; |
---|
204 | 218 | __le64 dtim_tsf; |
---|
205 | 219 | __le32 bi; |
---|
206 | | - __le32 bi_reciprocal; |
---|
| 220 | + __le32 reserved1; |
---|
207 | 221 | __le32 dtim_interval; |
---|
208 | | - __le32 dtim_reciprocal; |
---|
| 222 | + __le32 data_policy; |
---|
209 | 223 | __le32 listen_interval; |
---|
210 | 224 | __le32 assoc_id; |
---|
211 | 225 | __le32 assoc_beacon_arrive_time; |
---|
212 | | -} __packed; /* STA_MAC_DATA_API_S_VER_1 */ |
---|
| 226 | +} __packed; /* STA_MAC_DATA_API_S_VER_2 */ |
---|
213 | 227 | |
---|
214 | 228 | /** |
---|
215 | 229 | * struct iwl_mac_data_go - configuration data for P2P GO MAC context |
---|
.. | .. |
---|
233 | 247 | struct iwl_mac_data_p2p_sta { |
---|
234 | 248 | struct iwl_mac_data_sta sta; |
---|
235 | 249 | __le32 ctwin; |
---|
236 | | -} __packed; /* P2P_STA_MAC_DATA_API_S_VER_1 */ |
---|
| 250 | +} __packed; /* P2P_STA_MAC_DATA_API_S_VER_2 */ |
---|
237 | 251 | |
---|
238 | 252 | /** |
---|
239 | 253 | * struct iwl_mac_data_pibss - Pseudo IBSS config data |
---|
.. | .. |
---|
378 | 392 | }; |
---|
379 | 393 | } __packed; /* MAC_CONTEXT_CMD_API_S_VER_1 */ |
---|
380 | 394 | |
---|
381 | | -static inline u32 iwl_mvm_reciprocal(u32 v) |
---|
382 | | -{ |
---|
383 | | - if (!v) |
---|
384 | | - return 0; |
---|
385 | | - return 0xFFFFFFFF / v; |
---|
386 | | -} |
---|
387 | | - |
---|
388 | 395 | #define IWL_NONQOS_SEQ_GET 0x1 |
---|
389 | 396 | #define IWL_NONQOS_SEQ_SET 0x2 |
---|
390 | 397 | struct iwl_nonqos_seq_query_cmd { |
---|
.. | .. |
---|
432 | 439 | __le16 mu_time; |
---|
433 | 440 | } __packed; /* AC_QOS_DOT11AX_API_S */ |
---|
434 | 441 | |
---|
| 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 | + |
---|
435 | 464 | #define MAX_HE_SUPP_NSS 2 |
---|
436 | 465 | #define MAX_HE_CHANNEL_BW_INDX 4 |
---|
437 | 466 | |
---|
.. | .. |
---|
477 | 506 | * enabled AGG, i.e. both BACK and non-BACK frames in a single AGG |
---|
478 | 507 | * @STA_CTXT_HE_MU_EDCA_CW: indicates that there is an element of MU EDCA |
---|
479 | 508 | * 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). |
---|
480 | 512 | */ |
---|
481 | 513 | enum iwl_he_sta_ctxt_flags { |
---|
482 | 514 | STA_CTXT_HE_REF_BSSID_VALID = BIT(4), |
---|
.. | .. |
---|
488 | 520 | STA_CTXT_HE_CONST_TRIG_RND_ALLOC = BIT(10), |
---|
489 | 521 | STA_CTXT_HE_ACK_ENABLED = BIT(11), |
---|
490 | 522 | STA_CTXT_HE_MU_EDCA_CW = BIT(12), |
---|
| 523 | + STA_CTXT_HE_RU_2MHZ_BLOCK = BIT(14), |
---|
491 | 524 | }; |
---|
492 | 525 | |
---|
493 | 526 | /** |
---|
.. | .. |
---|
519 | 552 | #define IWL_HE_HTC_LINK_ADAP_BOTH (3 << IWL_HE_HTC_LINK_ADAP_POS) |
---|
520 | 553 | |
---|
521 | 554 | /** |
---|
| 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 | +/** |
---|
522 | 615 | * struct iwl_he_sta_context_cmd - configure FW to work with HE AP |
---|
523 | 616 | * @sta_id: STA id |
---|
524 | 617 | * @tid_limit: max num of TIDs in TX HE-SU multi-TID agg |
---|
.. | .. |
---|
541 | 634 | * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1 |
---|
542 | 635 | * @reserved3: reserved byte for future use |
---|
543 | 636 | * @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 |
---|
544 | 645 | */ |
---|
545 | 646 | struct iwl_he_sta_context_cmd { |
---|
546 | 647 | u8 sta_id; |
---|
.. | .. |
---|
576 | 677 | |
---|
577 | 678 | /* The below fields are set via MU EDCA parameter set element */ |
---|
578 | 679 | 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 */ |
---|
580 | 702 | |
---|
581 | 703 | #endif /* __iwl_fw_api_mac_h__ */ |
---|