Lines Matching +full:no +full:- +full:scan +full:- +full:on +full:- +full:init

1 /*-
2 * SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
7 /*-
8 * Based on BSD-licensed source modules in the Linux iwlwifi driver,
19 * Copyright(c) 2018 - 2019 Intel Corporation
33 * Copyright(c) 2018 - 2019 Intel Corporation
53 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
57 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
71 * enum iwx_context_info_flags - Context information control flags
73 * the init done for driver command that configures several system modes
77 * exponent, the actual size is 2**value, valid sizes are 8-2048.
80 * default is short format - not supported by the driver)
114 * struct iwx_context_info_version - version structure
127 * struct iwx_context_info_control - version structure
136 * struct iwx_context_info_dram - images DRAM map
149 * struct iwx_context_info_rbd_cfg - RBDs configuration
161 * struct iwx_context_info_hcmd_cfg - command queue configuration
172 * struct iwx_context_info_dump_cfg - Core Dump configuration
183 * struct iwx_context_info_pnvm_cfg - platform NVM data configuration
194 * struct iwx_context_info_early_dbg_cfg - early debug configuration for
206 * struct iwx_context_info - device INIT configuration
248 * iwx_prph_scratch_mtr_format - tfd size configuration
260 * iwx_prph_scratch_flags - PRPH scratch control flags
265 * @IWX_PRPH_SCRATCH_EDBG_DEST_INTERNAL: use buffer on SRAM
270 * @IWX_PRPH_SCRATCH_MTR_MODE: format used for completion - 0: for
297 * struct iwx_prph_scratch_version - version structure
311 * struct iwx_prph_scratch_control - control structure
321 * struct iwx_prph_scratch_pnvm_cfg - ror config
338 * struct iwx_prph_scratch_hwm_cfg - hwm config
350 * struct iwx_prph_scratch_rbd_cfg - RBDs configuration
360 * struct iwx_prph_scratch_uefi_cfg - prph scratch reduce power table
371 * struct iwx_prph_scratch_ctrl_cfg - prph scratch ctrl and config
388 * struct iwx_prph_scratch - peripheral scratch mapping
400 * struct iwx_prph_info - peripheral information
414 * struct iwx_context_info_gen3 - device INIT configuration
417 * @config: context in which the peripheral would execute - a subset of
492 #define IWX_RX_QUEUE_CB_SIZE(x) ((sizeof(x) <= 4) ? (fls(x) - 1) : (flsl(x) - 1))
499 * low power states due to driver-invoked device resets
500 * (e.g. IWX_CSR_RESET_REG_FLAG_SW_RESET) or uCode-driven power-saving modes.
505 * no need to "grab nic access" via IWX_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ.
513 #define IWX_CSR_INT_COALESCING (0x004) /* accum ints, 32-usec units */
527 * 31-16: Reserved
528 * 15-4: Type of device: see IWX_CSR_HW_REV_TYPE_xxx definitions
529 * 3-2: Revision step: 0 = A, 1 = B, 2 = C, 3 = D
530 * 1-0: "Dash" (-) value, as in A-1, etc.
539 * 11:8: Step (A - 0x0, B - 0x1, etc)
549 * UCODE-DRIVER GP (general purpose) mailbox registers.
650 * struct iwx_rx_transfer_desc - transfer descriptor AX210
664 * struct iwx_rx_completion_desc - completion descriptor AX210
689 * Indicates state of (platform's) hardware RF-Kill switch
690 * 26-24: POWER_SAVE_TYPE
691 * Indicates current power-saving mode:
692 * 000 -- No power saving
693 * 001 -- MAC power-down
694 * 010 -- PHY (radio) power-down
695 * 011 -- Error
696 * 9-6: SYS_CONFIG
697 * Indicates current system configuration, reflecting pins on chip
700 * Indicates MAC is entering a power-saving sleep power-down.
701 * Not a good time to access device-internal resources.
704 * access to device-internal resources. Host must wait for
705 * MAC_CLOCK_READY (and !GOING_TO_SLEEP) before accessing non-CSR
715 * init or post-power-down restore of internal SRAM memory.
718 * Later devices (5xxx/6xxx/1xxx) use non-volatile SRAM, and
759 * UCODE-DRIVER GP (general purpose) mailbox register 1
770 * Host sets this during RF KILL power-down sequence (HW, SW, CT KILL)
778 * uCode sets this when preparing a power-saving power-down.
779 * uCode resets this when power-up is complete and SRAM is sane.
783 * Later devices (5xxx/6xxx/1xxx) use non-volatile SRAM, and
842 * Turning on bit 31 will kick the SRAM2DRAM DMA.
846 * set to 1 - interrupt is sent to the driver
862 * Note that this register may be configured with non-dword aligned size.
873 /* Write index table - shadow registers */
902 * This status flag is set by the RFH when there is no active RBD fetch from
908 * This status flag is set by the RFH when there is no active transaction from
913 * This status flag is set by the RFH when there is no active transaction from
915 * Once the RXF-to-DRAM DMA is active, this flag is immediately turned off.
927 #define IWX_RFH_RXF_DMA_RB_SIZE_MASK (0x000F0000) /* bits 16-19 */
940 #define IWX_RFH_RXF_DMA_RBDCB_SIZE_MASK (0x00F00000) /* bits 20-23 */
951 #define IWX_RFH_RXF_DMA_MIN_RB_SIZE_MASK (0x03000000) /* bit 24-25 */
956 #define IWX_RFH_DMA_EN_MASK (0xC0000000) /* bits 30-31*/
979 * HBUS (Host-side Bus)
983 * may be powered-down.
1000 * data registers auto-increment the address by one dword.
1002 * 0-31: memory address within device
1014 * 0-15: register address (offset) within device
1015 * 24-25: (# bytes - 1) to read or write (e.g. 3 for dword)
1074 * Per-Tx-queue write pointer (index, really!)
1077 * 0-7: queue write index
1078 * 11-8: queue selector
1088 * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit
1167 #define IWX_CSR_ADDR_BASE(sc) ((sc)->mac_addr_from_csr)
1177 * @IWX_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behaviour on hidden SSID,
1183 * @IWX_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan
1191 * @IWX_UCODE_TLV_FLAGS_P2P_PS: P2P client power save is supported (only on a
1226 * longer than the passive one, which is essential for fragmented scan.
1232 * (command version 3) that supports per-chain limits
1233 * @IWX_UCODE_TLV_API_SCAN_TSF_REPORT: Scan start time reported in scan
1235 * received during scan, are reported in TSF of the mac specified in the
1236 * scan request.
1240 * @IWX_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
1291 * @IWX_UCODE_TLV_CAPA_UMAC_SCAN: supports UMAC scan.
1306 * @IWX_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG: Consolidated D3-D0 image
1312 * @IWX_UCODE_TLV_CAPA_P2P_STANDALONE_UAPSD: support p2p standalone U-APSD
1313 * @IWX_UCODE_TLV_CAPA_BT_COEX_PLCR: enabled BT Coex packet level co-running
1316 * IWX_UCODE_TLV_API_WIFI_MCC_UPDATE. When either is set, multi-source LAR
1322 * 0=no support)
1327 * @IWX_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT: supports bt-coex Multi-priority LUT
1328 * @IWX_UCODE_TLV_CAPA_BEACON_ANT_SELECTION: firmware will decide on what
1333 * @IWX_UCODE_TLV_CAPA_CT_KILL_BY_FW: firmware responsible for CT-kill
1343 * 0=no support)
1425 * For 16.0 uCode and above, there is no differentiation between sections,
1462 * struct iwx_fw_cipher_scheme - a cipher scheme supported by FW.
1488 * struct iwx_fw_cscheme_list - a cipher scheme list
1504 uint32_t init_size; /* bytes of init code */
1505 uint32_t init_data_size; /* bytes of init data */
1513 uint32_t init_size; /* bytes of init code */
1514 uint32_t init_data_size; /* bytes of init data */
1652 * struct iwx_rb_status - receive buffer status
1654 * @closed_rb_num [0:11] - Indicates the index of the RB which was closed
1655 * @closed_fr_num [0:11] - Indicates the index of the RX Frame which was closed
1656 * @finished_rb_num [0:11] - Indicates the index of the current RB
1658 * @finished_fr_num [0:11] - Indicates the index of the RX Frame
1672 /* cb size is the exponent - 3 */
1673 #define IWX_TFD_QUEUE_CB_SIZE(x) (IWX_RX_QUEUE_CB_SIZE(x) - 3)
1698 * For pre 22000 HW it is 256 x 128 bytes-per-TFD = 32 KBytes
1699 * For 22000 HW and on it is 256 x 256 bytes-per-TFD = 65 KBytes
1705 * of (4K - 4). The concatenates all of a TFD's buffers into a single
1708 * A maximum of 255 (not 256!) TFDs may be on a queue waiting for Tx.
1712 * struct iwx_tfh_tfd - Transmit Frame Descriptor (TFD)
1713 * @ num_tbs 0-4 number of active tbs
1714 * 5 -15 reserved
1724 /* Fixed (non-configurable) rx data from phy */
1729 * @tfd_offset 0-11 - tx command byte count
1730 * 12-13 - number of 64 byte chunks
1731 * 14-15 - reserved
1739 * For AX210 and up, the table no longer needs to be contiguous in memory.
1740 * @tfd_offset: 0-13 - tx command byte count
1741 * 14-15 - number of 64 byte chunks
1748 * DQA - Dynamic Queue Allocation -introduction
1751 * to allow dynamic allocation of queues on-demand, rather than allocate them
1753 * per RA/TID, thus allowing an AP - for example - to send BE traffic to STA2
1759 * TXQ #0 - command queue
1760 * TXQ #1 - aux frames
1773 #define IWX_LAST_AGG_TX_QUEUE (IWX_FIRST_AGG_TX_QUEUE + IWX_MAX_TID_COUNT - 1)
1778 * can keep track of at one time when creating block-ack chains of frames.
1779 * Note that "64" matches the number of ack bits in a block-ack packet.
1813 * struct iwx_tx_queue_cfg_cmd - txq hw scheduler config command
1817 * @cb_size: size of TFD cyclic buffer. Value is exponent - 3.
1832 * struct iwx_tx_queue_cfg_rsp - response to txq hw scheduler config
1833 * @queue_number: queue number assigned to this RA -TID
1834 * @flags: set on failure
1857 /* UMAC scan commands */
1898 /* Power - legacy power table command */
1916 /* RF-KILL commands and notifications */
1924 /* Power - new power table command */
2034 * struct iwx_cmd_response - generic response struct for most commands
2063 * init ucode and runtime ucode through IWX_CALIBRATION_CFG_CMD.
2107 * struct iwx_ct_kill_notif - CT-kill entry notification
2118 * struct iwx_temp_report_ths_cmd - set temperature thresholds
2137 * on same channel on 2.4 or same UNII band on 5.2
2159 * struct iwx_nvm_access_complete_cmd - NVM_ACCESS commands are completed
2167 * struct iwx_nvm_get_info - request to get NVM data
2174 * enum iwx_nvm_info_general_flags - flags in NVM_GET_INFO resp
2180 * struct iwx_nvm_get_info_general - general NVM data
2181 * @flags: bit 0: 1 - empty, 0 - non-empty
2194 * iwx_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku
2216 * struct iwx_nvm_get_info_sku - mac information
2224 * struct iwx_nvm_get_info_phy - phy information
2237 * struct iwx_nvm_get_info_regulatory - regulatory information
2249 * struct iwx_nvm_get_info_regulatory - regulatory information
2261 * struct iwx_nvm_get_info_rsp_v3 - response to get NVM data
2275 * struct iwx_nvm_get_info_rsp - response to get NVM data
2370 * struct iwx_soc_configuration_cmd - Set device stabilization latency
2386 * commands driver may send before finishing init flow
2394 * struct iwx_extended_cfg_cmd - mark what commands ucode should wait for
2395 * before finishing init flows
2416 * struct iwx_error_resp - FW error indication
2451 * struct iwx_fw_dbg_reg_op - an operation on a register
2465 * enum iwx_fw_dbg_monitor_mode - available monitor recording modes
2480 * struct iwx_fw_dbg_mem_seg_tlv - configures the debug data memory segments
2495 * struct iwx_fw_dbg_dest_tlv_v1 - configures the destination of the debug data
2497 * @version: version of the TLV - currently 0
2552 * enum iwx_fw_dbg_trigger_mode - triggers functionalities
2554 * @IWX_FW_DBG_TRIGGER_START: when trigger occurs re-conf the dbg mechanism
2566 * enum iwx_fw_dbg_trigger_flags - the flags supported by wrt triggers
2574 * enum iwx_fw_dbg_trigger_vif_type - define the VIF type for a trigger
2596 * enum iwl_fw_dbg_trigger - triggers available
2654 * struct iwx_fw_dbg_trigger_tlv - a TLV that describes the trigger
2663 * @mode: &enum iwx_fw_dbg_trigger_mode - can be stop / start of both
2691 * struct iwx_fw_dbg_trigger_missed_bcon - configures trigger for missed beacons
2709 * struct iwx_fw_dbg_trigger_cmd - configures trigger for messages from FW.
2710 * cmds: the list of commands to trigger the collection on
2720 * iwx_fw_dbg_trigger_stats - configures trigger for statistics
2734 * struct iwx_fw_dbg_trigger_low_rssi - trigger for low beacon RSSI
2742 * struct iwx_fw_dbg_trigger_mlme - configures trigger for mlme events
2781 * struct iwx_fw_dbg_trigger_txq_timer - configures the Tx queue's timer
2804 * struct iwx_fw_dbg_trigger_time_event - configures a time event trigger
2808 * BIT(notif->status) is set in status_bitmap.
2820 * struct iwx_fw_dbg_trigger_ba - configures BlockAck related trigger
2821 * rx_ba_start: tid bitmap to configure on what tid the trigger should occur
2823 * rx_ba_stop: tid bitmap to configure on what tid the trigger should occur
2825 * tx_ba_start: tid bitmap to configure on what tid the trigger should occur
2827 * tx_ba_stop: tid bitmap to configure on what tid the trigger should occur
2829 * rx_bar: tid bitmap to configure on what tid the trigger should occur
2831 * tx_bar: tid bitmap to configure on what tid the trigger should occur
2833 * frame_timeout: tid bitmap to configure on what tid the trigger should occur
2847 * struct iwx_fw_dbg_trigger_tx_latency - configures tx latency related trigger
2849 * @tid_bitmap: the tid to apply the threshold on
2863 * struct iwx_fw_dbg_trigger_tdls - configures trigger for TDLS events.
2865 * @peer_mode: trigger on specific peer or all
2866 * @peer: the TDLS peer to trigger the collection on
2876 * struct iwx_fw_dbg_trigger_tx_status - configures trigger for tx response
2878 * @statuses: the list of statuses to trigger the collection on
2889 * struct iwx_fw_dbg_conf_tlv - a TLV that describes a debug configuration.
2896 * This parses IWX_UCODE_TLV_FW_DBG_CONF. The user can add up-to
2910 * struct iwx_fw_cmd_version - firmware command version entry
2940 /* Possible actions on PHYs, MACs and Bindings */
2977 /* Time event - defines for command API */
2980 * DOC: Time Events - what is it?
2983 * of the device on the channel. Since the fw supports multiple channels
2985 * In order to make sure that the fw is on a specific channel at a certain time
3009 * Is there an end-time for the event?
3046 * notification the status is always success. There is no start/end fragment
3050 * @IWX_TE_V2_NOTIF_HOST_EVENT_START: request/receive notification on event start
3051 * @IWX_TE_V2_NOTIF_HOST_EVENT_END:request/receive notification on event end
3054 * @IWX_TE_V2_NOTIF_HOST_FRAG_START: request/receive notification on frag start
3055 * @IWX_TE_V2_NOTIF_HOST_FRAG_END:request/receive notification on frag end
3058 * @IWX_TE_V2_DEP_OTHER: depends on another time event
3059 * @IWX_TE_V2_DEP_TSF: depends on a specific time
3060 * @IWX_TE_V2_EVENT_SOCIOPATHIC: can't co-exist with other events of the same MAC
3088 * struct iwx_time_event_cmd_api - configuring Time Events
3094 * @id: this field has two meanings, depending on the action:
3100 * @depends_on: the unique ID of the event we depend on (if any)
3106 * on event and/or fragment start and/or end
3128 * struct iwx_time_event_resp - response structure to iwx_time_event_cmd
3142 * struct iwx_time_event_notif - notifications of time event start/stop
3161 * enum iwx_session_prot_conf_id - session protection's configurations
3168 * that event, no other activity will happen in the firmware,
3170 * The length of this event is hard-coded in the firmware: 300TUs.
3181 * listen mode. Will be fragmented. Valid only on the P2P Device MAC.
3182 * Valid only on the P2P Device MAC. The firmware will take into account
3186 * repetitive. Valid only on the P2P Device MAC. Only the duration will
3199 * struct iwx_session_prot_cmd - configure a session protection
3224 * struct iwx_session_prot_notif - session protection started / ended
3244 * struct iwx_binding_cmd - configuring bindings
3269 * struct iwx_time_quota_data - configuration of time quota per binding
3282 * struct iwx_time_quota_cmd - configuration of time quota between bindings
3306 * For VHT - bit-2 marks if the control is lower/upper relative to center-freq
3307 * bits-1:0 mark the distance from the center freq. for 20Mhz, offset is 0.
3338 * struct iwx_fw_channel_info - channel information
3376 /* TODO: fix the value, make it depend on firmware at runtime? */
3380 * struct iwl_phy_context_cmd - config of the PHY context
3415 * struct iwx_phy_context_cmd - config of the PHY context
3492 * struct iwx_rx_phy_info - phy info
3498 * @system_timestamp: GP2 at on air rise
3499 * @timestamp: TSF at on air rise
3500 * @beacon_time_stamp: beacon at on-air rise
3505 * @byte_count: frame's byte-count
3506 * @frame_time: frame's time on the air, based on byte count and frame rate
3538 * @IWX_RX_RES_PHY_FLAGS_BAND_24: true if the packet was received on 2.4 band
3542 * @IWX_RX_RES_PHY_FLAGS_ANTENNA: antenna on which the packet was received
3543 * @IWX_RX_RES_PHY_FLAGS_AGG: set if the packet was part of an A-MPDU
3562 * @IWX_RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow
3656 * TSF value on air rise (INA), only valid if
3735 #define IWX_RX_DESC_SIZE_V1 ((sizeof(struct iwx_rx_mpdu_desc) - \
3745 * enum iwx_bar_frame_release_sta_tid - STA/TID information for BAR release
3754 * enum iwx_bar_frame_release_ba_info - BA information for BAR release
3766 * struct iwx_bar_frame_release - frame release from BAR info
3776 * struct iwx_radio_version_notif - information on the radio version
3797 * struct iwx_radio_version_notif - information on the radio version
3806 * struct iwx_missed_beacons_notif - information on missed beacons
3824 * struct iwx_mfuart_load_notif - mfuart image version & status
3839 * struct iwx_set_calib_default_cmd - set default value for calibration.
3855 * struct iwx_mcast_filter_cmd - configure multicast filter.
3858 * to identify network interface adopted in host-device IF.
3915 * count the number of times we have to re-tune
3940 uint32_t non_channel_beacons; /* beacons with our bss id but not on
4065 uint8_t reserved[8 - IWX_MAC_INDEX_AUX];
4092 * struct iwx_statistics_load - RX statistics for multi-queue devices
4131 * struct iwx_statistics_cmd - statistics config command
4201 * @full_on_timeouts: timer values for each scenario in full on state.
4238 * @IWX_FW_MAC_TYPE_PIBSS: Pseudo-IBSS
4276 * struct iwx_mac_data_ap - configuration data for AP MAC context
4284 * NOTE: obsolete from VER2 and on
4299 * struct iwx_mac_data_ibss - configuration data for IBSS MAC context
4315 * enum iwx_mac_data_policy - policy of the data path for this MAC
4324 * during 802.1X negotiation (and allowed during 4-way-HS)
4334 * struct iwx_mac_data_sta - configuration data for station MAC context
4358 * struct iwx_mac_data_go - configuration data for P2P GO MAC context
4361 * 0 indicates that there is no CT window.
4371 * struct iwx_mac_data_p2p_sta - configuration data for P2P client MAC context
4374 * 0 indicates that there is no CT window.
4382 * struct iwx_mac_data_pibss - Pseudo IBSS config data
4390 * struct iwx_mac_data_p2p_dev - configuration data for the P2P Device MAC
4392 * @is_disc_extended: if set to true, P2P Device discoverability is enabled on
4396 * effect on the platform power, as this setting opens the Rx filters on
4439 * struct iwx_ac_qos - QOS timing params for IWX_MAC_CONTEXT_CMD
4441 * Should be a power-of-2, minus 1. Device's default is 0x0f.
4443 * Should be a power-of-2, minus 1. Device's default is 0x3f.
4465 * struct iwx_mac_ctx_cmd - command structure to configure MAC contexts
4527 * @IWX_LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS: allow LTR change on shadow
4529 * @IWX_LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH: allow LTR msg send on ANY LTR
4531 * @IWX_LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3: allow LTR msg send on transition from
4535 * @IWX_LTR_CFG_FLAG_DENIE_C10_ON_PD: allow going into C10 on PD
4548 * struct iwx_ltr_config_cmd - configures the LTR
4571 * receiver and transmitter. '0' - does not allow.
4610 * struct iwx_device_power_cmd - device wide power command.
4622 * struct iwx_mac_power_cmd - New power command containing uAPSD support
4626 * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec.
4627 * Minimum allowed:- 3 * DTIM. Keep alive period must be
4631 * PSM transition - legacy PM
4633 * PSM transition - legacy PM
4639 * PSM transition - uAPSD
4641 * PSM transition - uAPSD
4653 * @uapsd_ac_flags: Set trigger-enabled and delivery-enabled indication for
4695 * struct iwx_uapsd_misbehaving_ap_notif - FW sends this notification when
4698 * @sta_id: index of station in uCode's station table - associated AP ID in
4725 * Threshold. Typical energy threshold is -72dBm.
4728 * If the current temperature is above this threshold - Fast filter
4729 * will be used, If the current temperature is below this threshold -
4742 * @bf_escape_timer: Send beacons to driver if no beacons were passed
4744 * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed
4745 * for a longer period of time then this escape-timeout. Units: Beacons.
4933 * The 32-bit value has different layouts in the low 8 bites depending on the
4937 * High-throughput (HT) rate format
4939 * Very High-throughput (VHT) rate format
4961 * High-throughput (HT) rate format for bits 7:0
4963 * 2-0: MCS rate base
4972 * 4-3: 0) Single stream (SISO)
4976 * (bits 7-6 are zero)
4979 * support MCSes above 15/23, and 0-7 have one stream, 8-15 have two
4980 * streams and 16-23 have three streams. We could also support MCS 32
4995 * Very High-throughput (VHT) rate format for bits 7:0
4997 * 3-0: VHT MCS (0-9)
4998 * 5-4: number of streams - 1:
5004 /* Bit 4-5: (0) SISO, (1) MIMO2 (2) MIMO3 */
5013 * 3-0: 0xD) 6 Mbps
5021 * (bits 7-4 are 0)
5026 * 6-0: 10) 1 Mbps
5034 /* Bit 10 - OFDM HE */
5039 * Bit 11-12: (0) 20MHz, (1) 40MHz, (2) 80MHz, (3) 160MHz
5053 /* Bit 14-16: Antenna selection (1) Ant A, (2) Ant B, (4) Ant C (unused) */
5066 /* Bit 18: OFDM-HE dual carrier mode */
5070 /* Bit 19: (0) Beamforming is off, (1) Beamforming is on */
5075 * Bit 20-21: HE LTF type and guard interval
5096 /* Bit 22-23: HE type. (0) SU, (1) SU_EXT, (2) MU, (3) trigger based */
5104 /* Bit 24-25: (0) 20MHz (no dup), (1) 2x20MHz, (2) 4x20MHz, 3 8x20MHz */
5112 /* Bit 28: (1) 106-tone RX (8 MHz RU), (0) normal bandwidth */
5116 /* Bit 30-31: (1) RTS, (2) CTS */
5125 * The 32-bit value has different layouts in the low 8 bits depending on the
5131 /* Bits 10-8: rate format
5132 * (0) Legacy CCK (1) Legacy OFDM (2) High-throughput (HT)
5133 * (3) Very High-throughput (VHT) (4) High-efficiency (HE)
5134 * (5) Extremely High-throughput (EHT)
5148 * (0) 0xa - 1 Mbps
5149 * (1) 0x14 - 2 Mbps
5150 * (2) 0x37 - 5.5 Mbps
5151 * (3) 0x6e - 11 nbps
5169 * 3-0: MCS
5183 /* Bits 7-5: reserved */
5186 * Bits 13-11: (0) 20MHz, (1) 40MHz, (2) 80MHz, (3) 160MHz, (4) 320MHz
5195 /* Bit 15-14: Antenna selection:
5208 /* Bit 18: OFDM-HE dual carrier mode (same as v1) */
5210 /* Bit 19: (0) Beamforming is off, (1) Beamforming is on (same as v1) */
5213 * Bit 22-20: HE LTF type and guard interval
5242 /* Bit 24-23: HE type. (0) SU, (1) SU_EXT, (2) MU, (3) trigger based */
5252 * if this bit is set, duplicate is according to BW (bits 11-13):
5256 * EHT: 2 x BW/2, (80 - 2x40, 160 - 2x80, 320 - 2x160)
5261 /* Bit 26: (1) 106-tone RX (8 MHz RU), (0) normal bandwidth */
5271 /* Bit 31-28: reserved */
5285 /* Bit 1-3: LQ command color. Used to match responses to LQ commands */
5289 /* Bit 4-5: Tx RTS BW Signalling
5290 * (0) No RTS BW signalling
5299 /* Bit 6: (0) No dynamic BW selection (1) Allow dynamic BW selection
5313 * struct iwx_rlc_properties - RLC properties
5329 * struct iwx_sad_properties - SAD properties
5343 * struct iwx_rlc_config_cmd - RLC configuration
5373 * struct iwx_rx_baid_cfg_cmd_alloc - BAID allocation data
5389 * struct iwx_rx_baid_cfg_cmd_modify - BAID modification data
5401 * struct iwx_rx_baid_cfg_cmd_remove_v1 - BAID removal data
5409 * struct iwx_rx_baid_cfg_cmd_remove - BAID removal data
5419 * struct iwx_rx_baid_cfg_cmd - BAID allocation/config command
5433 * struct iwx_rx_baid_cfg_resp - BAID allocation response
5451 * struct iwx_scd_queue_cfg_cmd - scheduler queue allocation command
5459 * @u.add.bc_dram_addr: byte-count table IOVA
5512 * enum iwx_tlc_mng_cfg_cw - channel width options
5535 * enum iwx_tlc_mng_cfg_mode - supported modes
5591 * IWX_TLC_MCS_PER_BW - mcs index per BW
5592 * @IWX_TLC_MCS_PER_BW_80: mcs for bw - 20Hhz, 40Hhz, 80Hhz
5593 * @IWX_TLC_MCS_PER_BW_160: mcs for bw - 160Mhz
5594 * @IWX_TLC_MCS_PER_BW_320: mcs for bw - 320Mhz
5605 * struct iwx_tlc_config_cmd_v3 - TLC configuration version 3
5614 * @ht_rates: MCS index 0 - 11, per <nss, channel-width>
5615 * pair (0 - 80mhz width and below, 1 - 160mhz).
5621 * set zero for no limit.
5640 * struct iwx_tlc_config_cmd_v4 - TLC configuration
5650 * @ht_rates: MCS index 0 - 11, per <nss, channel-width>
5651 * pair (0 - 80mhz width and below, 1 - 160mhz, 2 - 320mhz).
5654 * set zero for no limit.
5678 * struct iwx_tlc_update_notif - TLC notification from FW
5683 * version is < 3 at run-time, else rate_n_flags version 2
5685 * @amsdu_enabled: bitmap for per-TID AMSDU enablement
5721 * bits 0:2 - security control (IWX_TX_CMD_SEC_*)
5722 * bit 3 - immediate ACK required
5723 * bit 4 - rate is taken from STA table
5724 * bit 5 - frame belongs to BA stream
5725 * bit 6 - immediate BA response expected
5726 * bit 7 - unused
5727 * bits 8:15 - Station ID
5728 * bits 16:31 - rate
5741 * TX command Frame life time in us - to be written in pm_frame_timeout
5749 * TID for non QoS frames - to be written in tid_tspec
5754 * Limits on the retransmissions - to be written in {data,rts}_retry_limit
5772 #define IWX_FIRST_TB_SIZE_ALIGN ((IWX_FIRST_TB_SIZE + (64 - 1)) & ~(64 - 1))
5787 * @TX_CMD_OFFLD_PAD: mark 2-byte pad was inserted after the mac header for
5789 * @TX_CMD_OFFLD_AMSDU: mark TX command is A-MSDU
5811 * @IWX_TX_FLAGS_HIGH_PRI: high priority frame (like EAPOL) - can affect rate
5824 * struct iwx_tx_cmd_gen2 - TX command struct to FW for 22000 devices
5845 * struct iwx_tx_cmd_gen3 - TX command struct to FW for AX210+ devices
5960 * 1) No aggregation (frame_count == 1). This reports Tx results for a single
5965 * frames that used block-acknowledge. All frames were transmitted at
5969 * Note that, for aggregation, ACK (block-ack) status is not delivered
5970 * here; block-ack has not been received by the time the device records
5978 * struct iwx_agg_tx_status - per packet TX aggregation status
5991 * bit-7 invalid rate indication
6001 * struct iwx_tx_resp_v3 - notifies that fw is TXing a packet
6003 * @frame_count: 1 no aggregation, >1 aggregation
6006 * @failure_frame: num failures due to no ACK (unused for agg)
6007 * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
6009 * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
6010 * for agg: RTS + CTS + aggregation tx time + block-ack time.
6023 * @status: for non-agg: frame status IWX_TX_STATUS_*
6056 * struct iwx_tx_resp - notifies that fw is TXing a packet
6058 * @frame_count: 1 no aggregation, >1 aggregation
6061 * @failure_frame: num failures due to no ACK (unused for agg)
6062 * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
6064 * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
6065 * for agg: RTS + CTS + aggregation tx time + block-ack time.
6082 * @status: for non-agg: frame status TX_STATUS_*
6116 * struct iwx_compressed_ba_tfd - progress of a TFD queue
6118 * @tfd_index: Index of first un-acked frame in the TFD queue
6119 * @scd_queue: For debug only - the physical queue the TFD queue is bound to
6120 * @tid: TID of the queue (0-7)
6132 * struct iwx_compressed_ba_ratid - progress of a RA TID queue
6144 * enum iwx_ba_resp_flags - TX aggregation status
6149 * @IWX_MVM_BA_RESP_TX_BT_KILL: aggregation got BT-kill
6163 * struct iwx_compressed_ba_notif - notifies about reception of BA
6166 * @sta_id: Index of recipient (BA-sending) station in fw's station table
6169 * for Tx-ing then this value will be set to 0 by FW.
6174 * @txed: number of frames sent in the aggregation (all-TIDs)
6175 * @done: number of frames that were Acked by the BA (all-TIDs)
6177 * @wireless_time: Wireless-media time
6179 * @tfd_cnt: number of TFD-Q elements
6180 * @ra_tid_cnt: number of RATID-Q elements
6183 * @ra_tid: array of RA-TID queue status updates. For debug purposes only. See
6220 * struct iwx_tx_path_flush_cmd -- queue/FIFO flush command
6232 * struct iwl_tx_path_flush_cmd -- queue/FIFO flush command
6246 * struct iwx_flush_queue_info - virtual flush queue info
6259 * struct iwx_tx_path_flush_cmd_rsp -- queue/FIFO flush command response
6271 * iwx_get_scd_ssn - returns the SSN of the SCD
6272 * @tx_resp: the Tx response from the fw (agg or non-agg)
6285 return le32_to_cpup((uint32_t *)&tx_resp->status + in iwx_get_scd_ssn()
6286 tx_resp->frame_count) & 0xfff; in iwx_get_scd_ssn()
6290 * struct iwx_scd_txq_cfg_cmd - New txq hw scheduler config command
6329 /* Scan Commands, Responses, Notifications */
6335 * struct iwx_ssid_ie - directed scan network information element
6348 /* scan offload */
6354 /* Default watchdog (in MS) for scheduled scan iteration */
6365 * iwx_scan_schedule_lmac - schedule of scan offload
6367 * @iterations: num of scan iterations
6368 * @full_scan_mul: number of partial scans before each full scan
6377 * iwx_scan_req_tx_cmd - SCAN_REQ_TX_CMD_API_S
6395 * iwx_scan_channel_cfg_lmac - SCAN_CHANNEL_CFG_S_VER2
6396 * @flags: bits 1-20: directed scan to i'th ssid
6398 * @channel_number: channel number 1-13 etc
6399 * @iter_count: scan iteration on this channel
6400 * @iter_interval: interval in seconds between iterations on one channel
6410 * iwx_scan_probe_segment - PROBE_SEGMENT_API_S_VER_1
6419 /* iwx_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_2
6432 /* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
6454 /* iwx_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
6456 * @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
6458 * 1 - EBS is disabled.
6459 * 2 - every second scan will be full scan(and so on).
6482 * iwx_scan_offload_complete - PERIODIC_SCAN_COMPLETE_NTF_API_S_VER_2
6484 * @last_schedule_iteration: last scan iteration executed before scan abort
6499 * struct iwx_scan_results_notif - scan results for one channel -
6520 * iwx_scan_offload_blacklist - IWX_SCAN_OFFLOAD_BLACKLIST_S
6523 * @client_bitmap: clients ignore this entry - enum scan_framework_client
6540 * iwx_scan_offload_profile - IWX_SCAN_OFFLOAD_PROFILE_S
6542 * @unicast_cipher: encryption algorithm to match - bitmap
6543 * @aut_alg: authentication algorithm to match - bitmap
6546 * @client_bitmap: clients waiting for match - enum scan_framework_client
6559 * iwx_scan_offload_profile_cfg - IWX_SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1
6560 * @blacklist: AP list to filter off from scan results
6566 * @active_clients: active clients bitmap - enum scan_framework_client
6583 /* UMAC Scan API */
6604 /* Bits 26-31 are for num of channels in channel_array */
6622 /* Bits 16-27 are for supported rates */
6632 * @active: default dwell time for active scan
6633 * @passive: default dwell time for passive scan
6634 * @fragmented: default dwell time for fragmented scan
6646 #define IWX_SCAN_LB_LMAC_IDX 0 /* low-band */
6647 #define IWX_SCAN_HB_LMAC_IDX 1 /* high-band */
6656 * @tx_chains: valid_tx antenna - ANT_* definitions
6657 * @rx_chains: valid_rx antenna - ANT_* definitions
6671 * @tx_chains: valid_tx antenna - ANT_* definitions
6672 * @rx_chains: valid_rx antenna - ANT_* definitions
6673 * @legacy_rates: default legacy rates - enum scan_config_rates
6676 * @dwell_active: default dwell time for active scan
6677 * @dwell_passive: default dwell time for passive scan
6678 * @dwell_fragmented: default dwell time for fragmented scan
6682 * @channel_flags: default channel flags - enum iwx_channel_flags
6702 *@IWX_UMAC_SCAN_FLAG_PREEMPTIVE: scan process triggered by this scan request
6703 * can be preempted by other scan requests with higher priority.
6704 * The low priority scan will be resumed when the higher priority scan is
6707 * when scan starts.
6736 * UMAC scan general flags #2
6746 * UMAC scan general flags version 2
6752 * during scan iterations
6754 * on every iteration instead of only once after the last iteration
6755 * @IWX_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1: fragmented scan LMAC1
6756 * @IWX_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2: fragmented scan LMAC2
6757 * @IWX_UMAC_SCAN_GEN_FLAGS_V2_MATCH: does this scan check for profile matching
6762 * @IWX_UMAC_SCAN_GEN_FLAGS_V2_NTF_START: send notification of scan start
6763 * @IWX_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID: matching on multiple SSIDs
6767 * 5.2Ghz bands scan, trigger scan on 6GHz band to discover
6786 * @flags: bitmap - 0-19: directed scan to i'th ssid.
6787 * @channel_num: channel number 1-13 etc.
6789 * @iter_interval: interval between two scan iterations on one channel.
6810 * @interval: interval in seconds between scan iterations
6811 * @iter_count: num of scan iterations for schedule plan, 0xff for infinite loop
6821 * struct iwx_scan_req_umac_tail - the rest of the UMAC scan request command
6824 * @delay: delay in TUs before starting the first scan iteration
6827 * @direct_scan: list of SSIDs for directed active scan
6840 * struct iwx_scan_req_umac_tail - the rest of the UMAC scan request command
6843 * @delay: delay in TUs before starting the first scan iteration
6846 * @direct_scan: list of SSIDs for directed active scan
6861 * @count: num of channels in scan request
6876 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
6877 * @ooc_priority: out of channel priority - &enum iwl_scan_priority
6879 * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
6881 * @active_dwell: dwell time for active scan per LMAC
6882 * @passive_dwell: dwell time for passive scan per LMAC
6883 * @fragmented_dwell: dwell time for fragmented passive scan
6890 * to total scan time
6891 * @max_out_time: max out of serving channel time, per LMAC - for CDB there
6893 * @suspend_time: max suspend time, per LMAC - for CDB there are 2 LMACs
6894 * @scan_priority: scan internal prioritization &enum iwl_scan_priority
6896 * Relevant only for fragmented scan.
6990 * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
6991 * @active_dwell: dwell time for active scan per LMAC
7000 * can add to the total scan time
7007 * scan coverage.
7029 * @count: num of channels in scan request
7047 * @delay: initial delay of the periodic scan in seconds
7061 * @preq: scan probe request params
7095 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
7096 * @ooc_priority: out of channel priority - &enum iwx_scan_priority
7097 * @scan_params: scan parameters
7107 * @uid: scan id, &enum iwx_umac_scan_uid_offsets
7117 * @uid: scan id, &enum iwx_umac_scan_uid_offsets
7119 * @last_iter: last scan iteration number
7120 * @scan status: &enum iwx_scan_offload_complete_status
7137 * struct iwx_scan_offload_profile_match - match information
7143 * the channels passed in tue scan offload request
7155 * struct iwx_scan_offload_profiles_query - match results query response
7157 * matches passed in the scan offload request
7158 * @last_scan_age: age of the last offloaded scan
7161 * @gp2_invoked: GP2 when scan offload was invoked
7180 * struct iwx_umac_scan_iter_complete_notif - notifies end of scanning iteration
7181 * @uid: scan id, &enum iwx_umac_scan_uid_offsets
7185 * @bt_status: BT on/off status
7189 * @results: array of scan results, only "scanned_channels" of them are valid
7228 * @IWX_STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU
7283 * @IWX_STA_KEY_FLG_NO_ENC: no encryption
7287 * @IWX_STA_KEY_FLG_EXT: extended cipher algorithm (depends on the FW support)
7291 * @IWX_STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
7292 * station info array (1 - n 1X mode)
7342 * @IWX_STA_SLEEP_STATE_MOREDATA: set more-data bit on
7372 * struct iwx_keyinfo - key information
7375 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
7377 * @key: 16-byte unicast decryption key
7379 * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only
7380 * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only
7401 * struct iwx_add_sta_cmd - Add/modify a station in the fw's sta table.
7404 * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
7413 * alone. 1 - modify, 0 - don't change.
7418 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
7421 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
7423 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
7426 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
7430 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
7431 * mac-addr.
7440 * The device contains an internal table of per-station information, with info
7441 * on security keys, aggregation parameters, and Tx rates for initial Tx
7445 * entry, or modifying a pre-existing one.
7476 * @IWX_STA_LINK: Link station - normal RX and TX traffic.
7481 * @IWX_STA_AUX_ACTIVITY: auxiliary station (scan, ROC and so on).
7490 * struct iwx_add_sta_key_common - add/modify sta key common part
7507 * struct iwx_add_sta_key_cmd_v1 - add/modify sta key
7511 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
7521 * struct iwx_add_sta_key_cmd - add/modify sta key
7537 * @IWX_ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
7548 * struct iwx_rm_sta_cmd - Add / modify a station in the fw's station table
7622 * struct iwx_bt_coex_cmd - bt coex configuration command
7635 * Location Aware Regulatory (LAR) API - MCC updates
7639 * struct iwx_mcc_update_cmd - Request the device to update geographic
7641 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
7659 * iwx_mcc_update_resp_v3 - response to MCC_UPDATE_CMD.
7670 * channels, depending on platform)
7687 * @GEO_NO_INFO: no special info for this geo profile.
7695 * struct iwx_mcc_update_resp - response to MCC_UPDATE_CMD.
7724 * struct iwx_mcc_chub_notif - chub notifies of mcc change
7731 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
7774 * former flags field, since that's always 0 on commands and thus can
7830 #define IWX_MAX_CMD_PAYLOAD_SIZE (4096 - sizeof(struct iwx_cmd_header_wide))
7848 uint8_t data_wide[IWX_DEF_CMD_PAYLOAD_SIZE -
7863 * 28-26: Reserved
7868 * 21-16: RX queue
7869 * 15-14: Reserved
7870 * 13-00: RX frame size
7889 return le32toh(pkt->len_n_flags) & IWX_FH_RSCSR_FRAME_SIZE_MSK; in iwx_rx_packet_len()
7893 #pragma clang diagnostic ignored "-Wunused-function"
7898 return iwx_rx_packet_len(pkt) - sizeof(pkt->hdr); in iwx_rx_packet_payload_len()
7902 #define IWX_MIN_DBM -100
7903 #define IWX_MAX_DBM -33 /* realistic guess */
7906 bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg))
7909 bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (reg), (val))
7912 bus_space_write_1((sc)->sc_st, (sc)->sc_sh, (reg), (val))
7921 bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \
7925 bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \