.. | .. |
---|
8 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
9 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
---|
10 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
---|
11 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 11 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
12 | 12 | * |
---|
13 | 13 | * This program is free software; you can redistribute it and/or modify |
---|
14 | 14 | * it under the terms of version 2 of the GNU General Public License as |
---|
.. | .. |
---|
31 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
32 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
---|
33 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
---|
34 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 34 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
35 | 35 | * All rights reserved. |
---|
36 | 36 | * |
---|
37 | 37 | * Redistribution and use in source and binary forms, with or without |
---|
.. | .. |
---|
70 | 70 | /* Max number of IEs for direct SSID scans in a command */ |
---|
71 | 71 | #define PROBE_OPTION_MAX 20 |
---|
72 | 72 | |
---|
| 73 | +#define SCAN_SHORT_SSID_MAX_SIZE 8 |
---|
| 74 | +#define SCAN_BSSID_MAX_SIZE 16 |
---|
| 75 | + |
---|
73 | 76 | /** |
---|
74 | 77 | * struct iwl_ssid_ie - directed scan network information element |
---|
75 | 78 | * |
---|
.. | .. |
---|
92 | 95 | #define IWL_SCAN_MAX_BLACKLIST_LEN 64 |
---|
93 | 96 | #define IWL_SCAN_SHORT_BLACKLIST_LEN 16 |
---|
94 | 97 | #define IWL_SCAN_MAX_PROFILES 11 |
---|
| 98 | +#define IWL_SCAN_MAX_PROFILES_V2 8 |
---|
95 | 99 | #define SCAN_OFFLOAD_PROBE_REQ_SIZE 512 |
---|
| 100 | +#define SCAN_NUM_BAND_PROBE_DATA_V_1 2 |
---|
| 101 | +#define SCAN_NUM_BAND_PROBE_DATA_V_2 3 |
---|
96 | 102 | |
---|
97 | 103 | /* Default watchdog (in MS) for scheduled scan iteration */ |
---|
98 | 104 | #define IWL_SCHED_SCAN_WATCHDOG cpu_to_le16(15000) |
---|
.. | .. |
---|
111 | 117 | }; |
---|
112 | 118 | |
---|
113 | 119 | /** |
---|
114 | | - * struct iwl_scan_offload_blacklist - SCAN_OFFLOAD_BLACKLIST_S |
---|
| 120 | + * struct iwl_scan_offload_blocklist - SCAN_OFFLOAD_BLACKLIST_S |
---|
115 | 121 | * @ssid: MAC address to filter out |
---|
116 | 122 | * @reported_rssi: AP rssi reported to the host |
---|
117 | 123 | * @client_bitmap: clients ignore this entry - enum scan_framework_client |
---|
118 | 124 | */ |
---|
119 | | -struct iwl_scan_offload_blacklist { |
---|
| 125 | +struct iwl_scan_offload_blocklist { |
---|
120 | 126 | u8 ssid[ETH_ALEN]; |
---|
121 | 127 | u8 reported_rssi; |
---|
122 | 128 | u8 client_bitmap; |
---|
.. | .. |
---|
155 | 161 | } __packed; |
---|
156 | 162 | |
---|
157 | 163 | /** |
---|
158 | | - * struct iwl_scan_offload_profile_cfg - SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1 |
---|
159 | | - * @profiles: profiles to search for match |
---|
160 | | - * @blacklist_len: length of blacklist |
---|
| 164 | + * struct iwl_scan_offload_profile_cfg_data |
---|
| 165 | + * @blocklist_len: length of blocklist |
---|
161 | 166 | * @num_profiles: num of profiles in the list |
---|
162 | 167 | * @match_notify: clients waiting for match found notification |
---|
163 | 168 | * @pass_match: clients waiting for the results |
---|
.. | .. |
---|
165 | 170 | * @any_beacon_notify: clients waiting for match notification without match |
---|
166 | 171 | * @reserved: reserved |
---|
167 | 172 | */ |
---|
168 | | -struct iwl_scan_offload_profile_cfg { |
---|
169 | | - struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES]; |
---|
170 | | - u8 blacklist_len; |
---|
| 173 | +struct iwl_scan_offload_profile_cfg_data { |
---|
| 174 | + u8 blocklist_len; |
---|
171 | 175 | u8 num_profiles; |
---|
172 | 176 | u8 match_notify; |
---|
173 | 177 | u8 pass_match; |
---|
.. | .. |
---|
175 | 179 | u8 any_beacon_notify; |
---|
176 | 180 | u8 reserved[2]; |
---|
177 | 181 | } __packed; |
---|
| 182 | + |
---|
| 183 | +/** |
---|
| 184 | + * struct iwl_scan_offload_profile_cfg |
---|
| 185 | + * @profiles: profiles to search for match |
---|
| 186 | + * @data: the rest of the data for profile_cfg |
---|
| 187 | + */ |
---|
| 188 | +struct iwl_scan_offload_profile_cfg_v1 { |
---|
| 189 | + struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES]; |
---|
| 190 | + struct iwl_scan_offload_profile_cfg_data data; |
---|
| 191 | +} __packed; /* SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1-2*/ |
---|
| 192 | + |
---|
| 193 | +/** |
---|
| 194 | + * struct iwl_scan_offload_profile_cfg |
---|
| 195 | + * @profiles: profiles to search for match |
---|
| 196 | + * @data: the rest of the data for profile_cfg |
---|
| 197 | + */ |
---|
| 198 | +struct iwl_scan_offload_profile_cfg { |
---|
| 199 | + struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES_V2]; |
---|
| 200 | + struct iwl_scan_offload_profile_cfg_data data; |
---|
| 201 | +} __packed; /* SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_3*/ |
---|
178 | 202 | |
---|
179 | 203 | /** |
---|
180 | 204 | * struct iwl_scan_schedule_lmac - schedule of scan offload |
---|
.. | .. |
---|
251 | 275 | * @common_data: last (and common) part of the probe |
---|
252 | 276 | * @buf: raw data block |
---|
253 | 277 | */ |
---|
| 278 | +struct iwl_scan_probe_req_v1 { |
---|
| 279 | + struct iwl_scan_probe_segment mac_header; |
---|
| 280 | + struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_1]; |
---|
| 281 | + struct iwl_scan_probe_segment common_data; |
---|
| 282 | + u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE]; |
---|
| 283 | +} __packed; |
---|
| 284 | + |
---|
| 285 | +/* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2 |
---|
| 286 | + * @mac_header: first (and common) part of the probe |
---|
| 287 | + * @band_data: band specific data |
---|
| 288 | + * @common_data: last (and common) part of the probe |
---|
| 289 | + * @buf: raw data block |
---|
| 290 | + */ |
---|
254 | 291 | struct iwl_scan_probe_req { |
---|
255 | 292 | struct iwl_scan_probe_segment mac_header; |
---|
256 | | - struct iwl_scan_probe_segment band_data[2]; |
---|
| 293 | + struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_2]; |
---|
257 | 294 | struct iwl_scan_probe_segment common_data; |
---|
258 | 295 | u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE]; |
---|
259 | 296 | } __packed; |
---|
.. | .. |
---|
262 | 299 | IWL_SCAN_CHANNEL_FLAG_EBS = BIT(0), |
---|
263 | 300 | IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE = BIT(1), |
---|
264 | 301 | IWL_SCAN_CHANNEL_FLAG_CACHE_ADD = BIT(2), |
---|
| 302 | + IWL_SCAN_CHANNEL_FLAG_EBS_FRAG = BIT(3), |
---|
| 303 | + IWL_SCAN_CHANNEL_FLAG_FORCE_EBS = BIT(4), |
---|
| 304 | + IWL_SCAN_CHANNEL_FLAG_ENABLE_CHAN_ORDER = BIT(5), |
---|
| 305 | + IWL_SCAN_CHANNEL_FLAG_6G_PSC_NO_FILTER = BIT(6), |
---|
265 | 306 | }; |
---|
266 | 307 | |
---|
267 | 308 | /* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S |
---|
.. | .. |
---|
433 | 474 | /* The maximum of either of these cannot exceed 8, because we use an |
---|
434 | 475 | * 8-bit mask (see IWL_MVM_SCAN_MASK in mvm.h). |
---|
435 | 476 | */ |
---|
436 | | -#define IWL_MVM_MAX_UMAC_SCANS 8 |
---|
| 477 | +#define IWL_MVM_MAX_UMAC_SCANS 4 |
---|
437 | 478 | #define IWL_MVM_MAX_LMAC_SCANS 1 |
---|
438 | 479 | |
---|
439 | 480 | enum scan_config_flags { |
---|
.. | .. |
---|
504 | 545 | } __packed; |
---|
505 | 546 | |
---|
506 | 547 | /** |
---|
507 | | - * struct iwl_scan_config |
---|
| 548 | + * struct iwl_scan_config_v1 |
---|
508 | 549 | * @flags: enum scan_config_flags |
---|
509 | 550 | * @tx_chains: valid_tx antenna - ANT_* definitions |
---|
510 | 551 | * @rx_chains: valid_rx antenna - ANT_* definitions |
---|
.. | .. |
---|
536 | 577 | #define SCAN_LB_LMAC_IDX 0 |
---|
537 | 578 | #define SCAN_HB_LMAC_IDX 1 |
---|
538 | 579 | |
---|
539 | | -struct iwl_scan_config { |
---|
| 580 | +struct iwl_scan_config_v2 { |
---|
540 | 581 | __le32 flags; |
---|
541 | 582 | __le32 tx_chains; |
---|
542 | 583 | __le32 rx_chains; |
---|
.. | .. |
---|
548 | 589 | u8 bcast_sta_id; |
---|
549 | 590 | u8 channel_flags; |
---|
550 | 591 | u8 channel_array[]; |
---|
| 592 | +} __packed; /* SCAN_CONFIG_DB_CMD_API_S_2 */ |
---|
| 593 | + |
---|
| 594 | +/** |
---|
| 595 | + * struct iwl_scan_config |
---|
| 596 | + * @enable_cam_mode: whether to enable CAM mode. |
---|
| 597 | + * @enable_promiscouos_mode: whether to enable promiscouos mode |
---|
| 598 | + * @bcast_sta_id: the index of the station in the fw |
---|
| 599 | + * @reserved: reserved |
---|
| 600 | + * @tx_chains: valid_tx antenna - ANT_* definitions |
---|
| 601 | + * @rx_chains: valid_rx antenna - ANT_* definitions |
---|
| 602 | + */ |
---|
| 603 | +struct iwl_scan_config { |
---|
| 604 | + u8 enable_cam_mode; |
---|
| 605 | + u8 enable_promiscouos_mode; |
---|
| 606 | + u8 bcast_sta_id; |
---|
| 607 | + u8 reserved; |
---|
| 608 | + __le32 tx_chains; |
---|
| 609 | + __le32 rx_chains; |
---|
551 | 610 | } __packed; /* SCAN_CONFIG_DB_CMD_API_S_3 */ |
---|
552 | 611 | |
---|
553 | 612 | /** |
---|
.. | .. |
---|
595 | 654 | * enum iwl_umac_scan_general_flags2 - UMAC scan general flags #2 |
---|
596 | 655 | * @IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL: Whether to send a complete |
---|
597 | 656 | * notification per channel or not. |
---|
| 657 | + * @IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER: Whether to allow channel |
---|
| 658 | + * reorder optimization or not. |
---|
598 | 659 | */ |
---|
599 | 660 | enum iwl_umac_scan_general_flags2 { |
---|
600 | | - IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL = BIT(0), |
---|
| 661 | + IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL = BIT(0), |
---|
| 662 | + IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER = BIT(1), |
---|
| 663 | +}; |
---|
| 664 | + |
---|
| 665 | +/** |
---|
| 666 | + * enum iwl_umac_scan_general_flags_v2 - UMAC scan general flags version 2 |
---|
| 667 | + * |
---|
| 668 | + * The FW flags were reordered and hence the driver introduce version 2 |
---|
| 669 | + * |
---|
| 670 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC: periodic or scheduled |
---|
| 671 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL: pass all probe responses and beacons |
---|
| 672 | + * during scan iterations |
---|
| 673 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE: send complete notification |
---|
| 674 | + * on every iteration instead of only once after the last iteration |
---|
| 675 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1: fragmented scan LMAC1 |
---|
| 676 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2: fragmented scan LMAC2 |
---|
| 677 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH: does this scan check for profile matching |
---|
| 678 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS: use all valid chains for RX |
---|
| 679 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL: works with adaptive dwell |
---|
| 680 | + * for active channel |
---|
| 681 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE: can be preempted by other requests |
---|
| 682 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START: send notification of scan start |
---|
| 683 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID: matching on multiple SSIDs |
---|
| 684 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE: all the channels scanned |
---|
| 685 | + * as passive |
---|
| 686 | + * @IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN: at the end of 2.4GHz and |
---|
| 687 | + * 5.2Ghz bands scan, trigger scan on 6GHz band to discover |
---|
| 688 | + * the reported collocated APs |
---|
| 689 | + */ |
---|
| 690 | +enum iwl_umac_scan_general_flags_v2 { |
---|
| 691 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC = BIT(0), |
---|
| 692 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL = BIT(1), |
---|
| 693 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE = BIT(2), |
---|
| 694 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1 = BIT(3), |
---|
| 695 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2 = BIT(4), |
---|
| 696 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH = BIT(5), |
---|
| 697 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS = BIT(6), |
---|
| 698 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL = BIT(7), |
---|
| 699 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE = BIT(8), |
---|
| 700 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START = BIT(9), |
---|
| 701 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID = BIT(10), |
---|
| 702 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE = BIT(11), |
---|
| 703 | + IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN = BIT(12), |
---|
601 | 704 | }; |
---|
602 | 705 | |
---|
603 | 706 | /** |
---|
604 | 707 | * struct iwl_scan_channel_cfg_umac |
---|
605 | 708 | * @flags: bitmap - 0-19: directed scan to i'th ssid. |
---|
606 | 709 | * @channel_num: channel number 1-13 etc. |
---|
| 710 | + * @band: band of channel: 0 for 2GHz, 1 for 5GHz |
---|
607 | 711 | * @iter_count: repetition count for the channel. |
---|
608 | 712 | * @iter_interval: interval between two scan iterations on one channel. |
---|
609 | 713 | */ |
---|
610 | | -struct iwl_scan_channel_cfg_umac { |
---|
| 714 | +struct iwl_scan_channel_cfg_umac { |
---|
611 | 715 | __le32 flags; |
---|
612 | | - u8 channel_num; |
---|
613 | | - u8 iter_count; |
---|
614 | | - __le16 iter_interval; |
---|
615 | | -} __packed; /* SCAN_CHANNEL_CFG_S_VER2 */ |
---|
| 716 | + /* Both versions are of the same size, so use a union without adjusting |
---|
| 717 | + * the command size later |
---|
| 718 | + */ |
---|
| 719 | + union { |
---|
| 720 | + struct { |
---|
| 721 | + u8 channel_num; |
---|
| 722 | + u8 iter_count; |
---|
| 723 | + __le16 iter_interval; |
---|
| 724 | + } v1; /* SCAN_CHANNEL_CONFIG_API_S_VER_1 */ |
---|
| 725 | + struct { |
---|
| 726 | + u8 channel_num; |
---|
| 727 | + u8 band; |
---|
| 728 | + u8 iter_count; |
---|
| 729 | + u8 iter_interval; |
---|
| 730 | + } v2; /* SCAN_CHANNEL_CONFIG_API_S_VER_2 |
---|
| 731 | + * SCAN_CHANNEL_CONFIG_API_S_VER_3 |
---|
| 732 | + * SCAN_CHANNEL_CONFIG_API_S_VER_4 |
---|
| 733 | + */ |
---|
| 734 | + }; |
---|
| 735 | +} __packed; |
---|
616 | 736 | |
---|
617 | 737 | /** |
---|
618 | 738 | * struct iwl_scan_umac_schedule |
---|
.. | .. |
---|
626 | 746 | u8 reserved; |
---|
627 | 747 | } __packed; /* SCAN_SCHED_PARAM_API_S_VER_1 */ |
---|
628 | 748 | |
---|
| 749 | +struct iwl_scan_req_umac_tail_v1 { |
---|
| 750 | + /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */ |
---|
| 751 | + struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS]; |
---|
| 752 | + __le16 delay; |
---|
| 753 | + __le16 reserved; |
---|
| 754 | + /* SCAN_PROBE_PARAMS_API_S_VER_1 */ |
---|
| 755 | + struct iwl_scan_probe_req_v1 preq; |
---|
| 756 | + struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX]; |
---|
| 757 | +} __packed; |
---|
| 758 | + |
---|
629 | 759 | /** |
---|
630 | 760 | * struct iwl_scan_req_umac_tail - the rest of the UMAC scan request command |
---|
631 | 761 | * parameters following channels configuration array. |
---|
.. | .. |
---|
635 | 765 | * @preq: probe request with IEs blocks |
---|
636 | 766 | * @direct_scan: list of SSIDs for directed active scan |
---|
637 | 767 | */ |
---|
638 | | -struct iwl_scan_req_umac_tail { |
---|
| 768 | +struct iwl_scan_req_umac_tail_v2 { |
---|
639 | 769 | /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */ |
---|
640 | 770 | struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS]; |
---|
641 | 771 | __le16 delay; |
---|
642 | 772 | __le16 reserved; |
---|
643 | | - /* SCAN_PROBE_PARAMS_API_S_VER_1 */ |
---|
| 773 | + /* SCAN_PROBE_PARAMS_API_S_VER_2 */ |
---|
644 | 774 | struct iwl_scan_probe_req preq; |
---|
645 | 775 | struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX]; |
---|
646 | 776 | } __packed; |
---|
.. | .. |
---|
746 | 876 | struct iwl_scan_umac_chan_param channel; |
---|
747 | 877 | u8 data[]; |
---|
748 | 878 | } v8; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_8 */ |
---|
| 879 | + struct { |
---|
| 880 | + u8 active_dwell[SCAN_TWO_LMACS]; |
---|
| 881 | + u8 adwell_default_hb_n_aps; |
---|
| 882 | + u8 adwell_default_lb_n_aps; |
---|
| 883 | + u8 adwell_default_n_aps_social; |
---|
| 884 | + u8 general_flags2; |
---|
| 885 | + __le16 adwell_max_budget; |
---|
| 886 | + __le32 max_out_time[SCAN_TWO_LMACS]; |
---|
| 887 | + __le32 suspend_time[SCAN_TWO_LMACS]; |
---|
| 888 | + __le32 scan_priority; |
---|
| 889 | + u8 passive_dwell[SCAN_TWO_LMACS]; |
---|
| 890 | + u8 num_of_fragments[SCAN_TWO_LMACS]; |
---|
| 891 | + struct iwl_scan_umac_chan_param channel; |
---|
| 892 | + u8 data[]; |
---|
| 893 | + } v9; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_9 */ |
---|
749 | 894 | }; |
---|
750 | 895 | } __packed; |
---|
751 | 896 | |
---|
.. | .. |
---|
753 | 898 | #define IWL_SCAN_REQ_UMAC_SIZE_V7 48 |
---|
754 | 899 | #define IWL_SCAN_REQ_UMAC_SIZE_V6 44 |
---|
755 | 900 | #define IWL_SCAN_REQ_UMAC_SIZE_V1 36 |
---|
| 901 | + |
---|
| 902 | +/** |
---|
| 903 | + * struct iwl_scan_probe_params_v3 |
---|
| 904 | + * @preq: scan probe request params |
---|
| 905 | + * @ssid_num: number of valid SSIDs in direct scan array |
---|
| 906 | + * @short_ssid_num: number of valid short SSIDs in short ssid array |
---|
| 907 | + * @bssid_num: number of valid bssid in bssids array |
---|
| 908 | + * @reserved: reserved |
---|
| 909 | + * @direct_scan: list of ssids |
---|
| 910 | + * @short_ssid: array of short ssids |
---|
| 911 | + * @bssid_array: array of bssids |
---|
| 912 | + */ |
---|
| 913 | +struct iwl_scan_probe_params_v3 { |
---|
| 914 | + struct iwl_scan_probe_req preq; |
---|
| 915 | + u8 ssid_num; |
---|
| 916 | + u8 short_ssid_num; |
---|
| 917 | + u8 bssid_num; |
---|
| 918 | + u8 reserved; |
---|
| 919 | + struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX]; |
---|
| 920 | + __le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE]; |
---|
| 921 | + u8 bssid_array[ETH_ALEN][SCAN_BSSID_MAX_SIZE]; |
---|
| 922 | +} __packed; /* SCAN_PROBE_PARAMS_API_S_VER_3 */ |
---|
| 923 | + |
---|
| 924 | +/** |
---|
| 925 | + * struct iwl_scan_probe_params_v4 |
---|
| 926 | + * @preq: scan probe request params |
---|
| 927 | + * @short_ssid_num: number of valid short SSIDs in short ssid array |
---|
| 928 | + * @bssid_num: number of valid bssid in bssids array |
---|
| 929 | + * @reserved: reserved |
---|
| 930 | + * @direct_scan: list of ssids |
---|
| 931 | + * @short_ssid: array of short ssids |
---|
| 932 | + * @bssid_array: array of bssids |
---|
| 933 | + */ |
---|
| 934 | +struct iwl_scan_probe_params_v4 { |
---|
| 935 | + struct iwl_scan_probe_req preq; |
---|
| 936 | + u8 short_ssid_num; |
---|
| 937 | + u8 bssid_num; |
---|
| 938 | + __le16 reserved; |
---|
| 939 | + struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX]; |
---|
| 940 | + __le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE]; |
---|
| 941 | + u8 bssid_array[ETH_ALEN][SCAN_BSSID_MAX_SIZE]; |
---|
| 942 | +} __packed; /* SCAN_PROBE_PARAMS_API_S_VER_4 */ |
---|
| 943 | + |
---|
| 944 | +#define SCAN_MAX_NUM_CHANS_V3 67 |
---|
| 945 | + |
---|
| 946 | +/** |
---|
| 947 | + * struct iwl_scan_channel_params_v4 |
---|
| 948 | + * @flags: channel flags &enum iwl_scan_channel_flags |
---|
| 949 | + * @count: num of channels in scan request |
---|
| 950 | + * @num_of_aps_override: override the number of APs the FW uses to calculate |
---|
| 951 | + * dwell time when adaptive dwell is used |
---|
| 952 | + * @reserved: for future use and alignment |
---|
| 953 | + * @channel_config: array of explicit channel configurations |
---|
| 954 | + * for 2.4Ghz and 5.2Ghz bands |
---|
| 955 | + * @adwell_ch_override_bitmap: when using adaptive dwell, override the number |
---|
| 956 | + * of APs value with &num_of_aps_override for the channel. |
---|
| 957 | + * To cast channel to index, use &iwl_mvm_scan_ch_and_band_to_idx |
---|
| 958 | + */ |
---|
| 959 | +struct iwl_scan_channel_params_v4 { |
---|
| 960 | + u8 flags; |
---|
| 961 | + u8 count; |
---|
| 962 | + u8 num_of_aps_override; |
---|
| 963 | + u8 reserved; |
---|
| 964 | + struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3]; |
---|
| 965 | + u8 adwell_ch_override_bitmap[16]; |
---|
| 966 | +} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_4 also |
---|
| 967 | + SCAN_CHANNEL_PARAMS_API_S_VER_5 */ |
---|
| 968 | + |
---|
| 969 | +/** |
---|
| 970 | + * struct iwl_scan_channel_params_v6 |
---|
| 971 | + * @flags: channel flags &enum iwl_scan_channel_flags |
---|
| 972 | + * @count: num of channels in scan request |
---|
| 973 | + * @n_aps_override: override the number of APs the FW uses to calculate dwell |
---|
| 974 | + * time when adaptive dwell is used. |
---|
| 975 | + * Channel k will use n_aps_override[i] when BIT(20 + i) is set in |
---|
| 976 | + * channel_config[k].flags |
---|
| 977 | + * @channel_config: array of explicit channel configurations |
---|
| 978 | + * for 2.4Ghz and 5.2Ghz bands |
---|
| 979 | + */ |
---|
| 980 | +struct iwl_scan_channel_params_v6 { |
---|
| 981 | + u8 flags; |
---|
| 982 | + u8 count; |
---|
| 983 | + u8 n_aps_override[2]; |
---|
| 984 | + struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3]; |
---|
| 985 | +} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_6 */ |
---|
| 986 | + |
---|
| 987 | +/** |
---|
| 988 | + * struct iwl_scan_general_params_v10 |
---|
| 989 | + * @flags: &enum iwl_umac_scan_flags |
---|
| 990 | + * @reserved: reserved for future |
---|
| 991 | + * @scan_start_mac_id: report the scan start TSF time according to this mac TSF |
---|
| 992 | + * @active_dwell: dwell time for active scan per LMAC |
---|
| 993 | + * @adwell_default_2g: adaptive dwell default number of APs |
---|
| 994 | + * for 2.4GHz channel |
---|
| 995 | + * @adwell_default_5g: adaptive dwell default number of APs |
---|
| 996 | + * for 5GHz channels |
---|
| 997 | + * @adwell_default_social_chn: adaptive dwell default number of |
---|
| 998 | + * APs per social channel |
---|
| 999 | + * @reserved1: reserved for future |
---|
| 1000 | + * @adwell_max_budget: the maximal number of TUs that adaptive dwell |
---|
| 1001 | + * can add to the total scan time |
---|
| 1002 | + * @max_out_of_time: max out of serving channel time, per LMAC |
---|
| 1003 | + * @suspend_time: max suspend time, per LMAC |
---|
| 1004 | + * @scan_priority: priority of the request |
---|
| 1005 | + * @passive_dwell: continues dwell time for passive channel |
---|
| 1006 | + * (without adaptive dwell) |
---|
| 1007 | + * @num_of_fragments: number of fragments needed for full fragmented |
---|
| 1008 | + * scan coverage. |
---|
| 1009 | + */ |
---|
| 1010 | +struct iwl_scan_general_params_v10 { |
---|
| 1011 | + __le16 flags; |
---|
| 1012 | + u8 reserved; |
---|
| 1013 | + u8 scan_start_mac_id; |
---|
| 1014 | + u8 active_dwell[SCAN_TWO_LMACS]; |
---|
| 1015 | + u8 adwell_default_2g; |
---|
| 1016 | + u8 adwell_default_5g; |
---|
| 1017 | + u8 adwell_default_social_chn; |
---|
| 1018 | + u8 reserved1; |
---|
| 1019 | + __le16 adwell_max_budget; |
---|
| 1020 | + __le32 max_out_of_time[SCAN_TWO_LMACS]; |
---|
| 1021 | + __le32 suspend_time[SCAN_TWO_LMACS]; |
---|
| 1022 | + __le32 scan_priority; |
---|
| 1023 | + u8 passive_dwell[SCAN_TWO_LMACS]; |
---|
| 1024 | + u8 num_of_fragments[SCAN_TWO_LMACS]; |
---|
| 1025 | +} __packed; /* SCAN_GENERAL_PARAMS_API_S_VER_10 */ |
---|
| 1026 | + |
---|
| 1027 | +/** |
---|
| 1028 | + * struct iwl_scan_periodic_parms_v1 |
---|
| 1029 | + * @schedule: can scheduling parameter |
---|
| 1030 | + * @delay: initial delay of the periodic scan in seconds |
---|
| 1031 | + * @reserved: reserved for future |
---|
| 1032 | + */ |
---|
| 1033 | +struct iwl_scan_periodic_parms_v1 { |
---|
| 1034 | + struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS]; |
---|
| 1035 | + __le16 delay; |
---|
| 1036 | + __le16 reserved; |
---|
| 1037 | +} __packed; /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */ |
---|
| 1038 | + |
---|
| 1039 | +/** |
---|
| 1040 | + * struct iwl_scan_req_params_v12 |
---|
| 1041 | + * @general_params: &struct iwl_scan_general_params_v10 |
---|
| 1042 | + * @channel_params: &struct iwl_scan_channel_params_v4 |
---|
| 1043 | + * @periodic_params: &struct iwl_scan_periodic_parms_v1 |
---|
| 1044 | + * @probe_params: &struct iwl_scan_probe_params_v3 |
---|
| 1045 | + */ |
---|
| 1046 | +struct iwl_scan_req_params_v12 { |
---|
| 1047 | + struct iwl_scan_general_params_v10 general_params; |
---|
| 1048 | + struct iwl_scan_channel_params_v4 channel_params; |
---|
| 1049 | + struct iwl_scan_periodic_parms_v1 periodic_params; |
---|
| 1050 | + struct iwl_scan_probe_params_v3 probe_params; |
---|
| 1051 | +} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_12 */ |
---|
| 1052 | + |
---|
| 1053 | +/** |
---|
| 1054 | + * struct iwl_scan_req_params_v14 |
---|
| 1055 | + * @general_params: &struct iwl_scan_general_params_v10 |
---|
| 1056 | + * @channel_params: &struct iwl_scan_channel_params_v6 |
---|
| 1057 | + * @periodic_params: &struct iwl_scan_periodic_parms_v1 |
---|
| 1058 | + * @probe_params: &struct iwl_scan_probe_params_v4 |
---|
| 1059 | + */ |
---|
| 1060 | +struct iwl_scan_req_params_v14 { |
---|
| 1061 | + struct iwl_scan_general_params_v10 general_params; |
---|
| 1062 | + struct iwl_scan_channel_params_v6 channel_params; |
---|
| 1063 | + struct iwl_scan_periodic_parms_v1 periodic_params; |
---|
| 1064 | + struct iwl_scan_probe_params_v4 probe_params; |
---|
| 1065 | +} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_14 */ |
---|
| 1066 | + |
---|
| 1067 | +/** |
---|
| 1068 | + * struct iwl_scan_req_umac_v12 |
---|
| 1069 | + * @uid: scan id, &enum iwl_umac_scan_uid_offsets |
---|
| 1070 | + * @ooc_priority: out of channel priority - &enum iwl_scan_priority |
---|
| 1071 | + * @scan_params: scan parameters |
---|
| 1072 | + */ |
---|
| 1073 | +struct iwl_scan_req_umac_v12 { |
---|
| 1074 | + __le32 uid; |
---|
| 1075 | + __le32 ooc_priority; |
---|
| 1076 | + struct iwl_scan_req_params_v12 scan_params; |
---|
| 1077 | +} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_12 */ |
---|
| 1078 | + |
---|
| 1079 | +/** |
---|
| 1080 | + * struct iwl_scan_req_umac_v14 |
---|
| 1081 | + * @uid: scan id, &enum iwl_umac_scan_uid_offsets |
---|
| 1082 | + * @ooc_priority: out of channel priority - &enum iwl_scan_priority |
---|
| 1083 | + * @scan_params: scan parameters |
---|
| 1084 | + */ |
---|
| 1085 | +struct iwl_scan_req_umac_v14 { |
---|
| 1086 | + __le32 uid; |
---|
| 1087 | + __le32 ooc_priority; |
---|
| 1088 | + struct iwl_scan_req_params_v14 scan_params; |
---|
| 1089 | +} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_14 */ |
---|
756 | 1090 | |
---|
757 | 1091 | /** |
---|
758 | 1092 | * struct iwl_umac_scan_abort |
---|
.. | .. |
---|
784 | 1118 | __le32 reserved; |
---|
785 | 1119 | } __packed; /* SCAN_COMPLETE_NTF_UMAC_API_S_VER_1 */ |
---|
786 | 1120 | |
---|
787 | | -#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN 5 |
---|
| 1121 | +#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1 5 |
---|
| 1122 | +#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN 7 |
---|
| 1123 | + |
---|
| 1124 | +/** |
---|
| 1125 | + * struct iwl_scan_offload_profile_match_v1 - match information |
---|
| 1126 | + * @bssid: matched bssid |
---|
| 1127 | + * @reserved: reserved |
---|
| 1128 | + * @channel: channel where the match occurred |
---|
| 1129 | + * @energy: energy |
---|
| 1130 | + * @matching_feature: feature matches |
---|
| 1131 | + * @matching_channels: bitmap of channels that matched, referencing |
---|
| 1132 | + * the channels passed in the scan offload request. |
---|
| 1133 | + */ |
---|
| 1134 | +struct iwl_scan_offload_profile_match_v1 { |
---|
| 1135 | + u8 bssid[ETH_ALEN]; |
---|
| 1136 | + __le16 reserved; |
---|
| 1137 | + u8 channel; |
---|
| 1138 | + u8 energy; |
---|
| 1139 | + u8 matching_feature; |
---|
| 1140 | + u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1]; |
---|
| 1141 | +} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */ |
---|
| 1142 | + |
---|
| 1143 | +/** |
---|
| 1144 | + * struct iwl_scan_offload_profiles_query_v1 - match results query response |
---|
| 1145 | + * @matched_profiles: bitmap of matched profiles, referencing the |
---|
| 1146 | + * matches passed in the scan offload request |
---|
| 1147 | + * @last_scan_age: age of the last offloaded scan |
---|
| 1148 | + * @n_scans_done: number of offloaded scans done |
---|
| 1149 | + * @gp2_d0u: GP2 when D0U occurred |
---|
| 1150 | + * @gp2_invoked: GP2 when scan offload was invoked |
---|
| 1151 | + * @resume_while_scanning: not used |
---|
| 1152 | + * @self_recovery: obsolete |
---|
| 1153 | + * @reserved: reserved |
---|
| 1154 | + * @matches: array of match information, one for each match |
---|
| 1155 | + */ |
---|
| 1156 | +struct iwl_scan_offload_profiles_query_v1 { |
---|
| 1157 | + __le32 matched_profiles; |
---|
| 1158 | + __le32 last_scan_age; |
---|
| 1159 | + __le32 n_scans_done; |
---|
| 1160 | + __le32 gp2_d0u; |
---|
| 1161 | + __le32 gp2_invoked; |
---|
| 1162 | + u8 resume_while_scanning; |
---|
| 1163 | + u8 self_recovery; |
---|
| 1164 | + __le16 reserved; |
---|
| 1165 | + struct iwl_scan_offload_profile_match_v1 matches[0]; |
---|
| 1166 | +} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */ |
---|
| 1167 | + |
---|
788 | 1168 | /** |
---|
789 | 1169 | * struct iwl_scan_offload_profile_match - match information |
---|
790 | 1170 | * @bssid: matched bssid |
---|
.. | .. |
---|
793 | 1173 | * @energy: energy |
---|
794 | 1174 | * @matching_feature: feature matches |
---|
795 | 1175 | * @matching_channels: bitmap of channels that matched, referencing |
---|
796 | | - * the channels passed in tue scan offload request |
---|
| 1176 | + * the channels passed in the scan offload request. |
---|
797 | 1177 | */ |
---|
798 | 1178 | struct iwl_scan_offload_profile_match { |
---|
799 | 1179 | u8 bssid[ETH_ALEN]; |
---|
.. | .. |
---|
802 | 1182 | u8 energy; |
---|
803 | 1183 | u8 matching_feature; |
---|
804 | 1184 | u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN]; |
---|
805 | | -} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */ |
---|
| 1185 | +} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_2 */ |
---|
806 | 1186 | |
---|
807 | 1187 | /** |
---|
808 | 1188 | * struct iwl_scan_offload_profiles_query - match results query response |
---|
.. | .. |
---|
826 | 1206 | u8 resume_while_scanning; |
---|
827 | 1207 | u8 self_recovery; |
---|
828 | 1208 | __le16 reserved; |
---|
829 | | - struct iwl_scan_offload_profile_match matches[IWL_SCAN_MAX_PROFILES]; |
---|
830 | | -} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */ |
---|
| 1209 | + struct iwl_scan_offload_profile_match matches[0]; |
---|
| 1210 | +} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 */ |
---|
831 | 1211 | |
---|
832 | 1212 | /** |
---|
833 | 1213 | * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration |
---|