Lines Matching +full:dynamic +full:- +full:power +full:- +full:switching

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
71 * enum iwx_context_info_flags - Context information control flags
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
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
361 * @base_addr: reduce power table address
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))
498 * whenever platform supplies power to device, even when device is in
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.
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.
576 /* GIO Chicken Bits (PCI Express bus link power management) */
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
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
708 * Host sets this to put device into fully operational D0 power mode.
709 * Host resets this after SW_RESET to put device into low power mode.
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)
772 * unassociated mode, and power down.
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
792 /* GIO Chicken Bits (PCI Express bus link power management) */
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 */
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)
1191 * @IWX_UCODE_TLV_FLAGS_P2P_PS: P2P client power save is supported (only on a
1195 * @IWX_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save
1231 * @IWX_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size
1232 * (command version 3) that supports per-chain limits
1240 * @IWX_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
1296 * tx power value into TPC Report action frame and Link Measurement Report
1303 * @IWX_UCODE_TLV_CAPA_DQA_SUPPORT: supports dynamic queue allocation (DQA),
1305 * @IWX_UCODE_TLV_CAPA_TDLS_CHANNEL_SWITCH: supports TDLS channel switching
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
1327 * @IWX_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT: supports bt-coex Multi-priority LUT
1333 * @IWX_UCODE_TLV_CAPA_CT_KILL_BY_FW: firmware responsible for CT-kill
1462 * struct iwx_fw_cipher_scheme - a cipher scheme supported by FW.
1488 * struct iwx_fw_cscheme_list - a cipher scheme list
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
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
1740 * @tfd_offset: 0-13 - tx command byte count
1741 * 14-15 - number of 64 byte chunks
1748 * DQA - Dynamic Queue Allocation -introduction
1750 * Dynamic Queue Allocation (AKA "DQA") is a feature implemented in iwlwifi
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
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
2107 * struct iwx_ct_kill_notif - CT-kill entry notification
2118 * struct iwx_temp_report_ths_cmd - set temperature thresholds
2138 * @IWX_NVM_CHANNEL_DFS: dynamic freq selection candidate
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
2375 * @latency: time for SOC to ensure stable power & XTAL
2394 * struct iwx_extended_cfg_cmd - mark what commands ucode should wait for
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.
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
2847 * struct iwx_fw_dbg_trigger_tx_latency - configures tx latency related trigger
2863 * struct iwx_fw_dbg_trigger_tdls - configures trigger for TDLS events.
2876 * struct iwx_fw_dbg_trigger_tx_status - configures trigger for tx response
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
2977 /* Time event - defines for command API */
2980 * DOC: Time Events - what is it?
3009 * Is there an end-time for the event?
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
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
3170 * The length of this event is hard-coded in the firmware: 300TUs.
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
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
3500 * @beacon_time_stamp: beacon at on-air rise
3505 * @byte_count: frame's byte-count
3543 * @IWX_RX_RES_PHY_FLAGS_AGG: set if the packet was part of an A-MPDU
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
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
4238 * @IWX_FW_MAC_TYPE_PIBSS: Pseudo-IBSS
4276 * struct iwx_mac_data_ap - configuration data for AP MAC context
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
4371 * struct iwx_mac_data_p2p_sta - configuration data for P2P client MAC context
4382 * struct iwx_mac_data_pibss - Pseudo IBSS config data
4390 * struct iwx_mac_data_p2p_dev - configuration data for the P2P Device MAC
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
4522 /* Power Management Commands, Responses, Notifications */
4548 * struct iwx_ltr_config_cmd - configures the LTR
4570 * @IWX_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
4571 * receiver and transmitter. '0' - does not allow.
4572 * @IWX_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management,
4581 * @IWX_POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable.
4597 * Masks for device power command flags
4599 * '1' Allow to save power by turning off receiver and transmitter.
4601 * one needs to disable actual power down for debug purposes.
4603 * '1' CAM (Continuous Active Mode) is set, power management is disabled.
4604 * '0' Power management is enabled, one of the power schemes is applied.
4610 * struct iwx_device_power_cmd - device wide power command.
4613 * @flags: Power table command flags from IWX_DEVICE_POWER_FLAGS_*
4622 * struct iwx_mac_power_cmd - New power command containing uAPSD support
4625 * @flags: Power table command flags from POWER_FLAGS_*
4626 * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec.
4627 * Minimum allowed:- 3 * DTIM. Keep alive period must be
4628 * set regardless of power scheme or current power state.
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 -
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 */
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
5179 /* Bits 7-5: reserved */
5182 * Bits 13-11: (0) 20MHz, (1) 40MHz, (2) 80MHz, (3) 160MHz, (4) 320MHz
5191 /* Bit 15-14: Antenna selection:
5204 /* Bit 18: OFDM-HE dual carrier mode (same as v1) */
5209 * Bit 22-20: HE LTF type and guard interval
5238 /* Bit 24-23: HE type. (0) SU, (1) SU_EXT, (2) MU, (3) trigger based */
5248 * if this bit is set, duplicate is according to BW (bits 11-13):
5252 * EHT: 2 x BW/2, (80 - 2x40, 160 - 2x80, 320 - 2x160)
5257 /* Bit 26: (1) 106-tone RX (8 MHz RU), (0) normal bandwidth */
5267 /* Bit 31-28: reserved */
5281 /* Bit 1-3: LQ command color. Used to match responses to LQ commands */
5285 /* Bit 4-5: Tx RTS BW Signalling
5288 * (2) Dynamic BW signalling
5295 /* Bit 6: (0) No dynamic BW selection (1) Allow dynamic BW selection
5296 * Dynamic BW selection allows Tx with narrower BW then requested in rates
5309 * struct iwx_rlc_properties - RLC properties
5325 * struct iwx_sad_properties - SAD properties
5339 * struct iwx_rlc_config_cmd - RLC configuration
5369 * struct iwx_rx_baid_cfg_cmd_alloc - BAID allocation data
5385 * struct iwx_rx_baid_cfg_cmd_modify - BAID modification data
5397 * struct iwx_rx_baid_cfg_cmd_remove_v1 - BAID removal data
5405 * struct iwx_rx_baid_cfg_cmd_remove - BAID removal data
5415 * struct iwx_rx_baid_cfg_cmd - BAID allocation/config command
5429 * struct iwx_rx_baid_cfg_resp - BAID allocation response
5447 * struct iwx_scd_queue_cfg_cmd - scheduler queue allocation command
5455 * @u.add.bc_dram_addr: byte-count table IOVA
5508 * enum iwx_tlc_mng_cfg_cw - channel width options
5531 * enum iwx_tlc_mng_cfg_mode - supported modes
5587 * IWX_TLC_MCS_PER_BW - mcs index per BW
5588 * @IWX_TLC_MCS_PER_BW_80: mcs for bw - 20Hhz, 40Hhz, 80Hhz
5589 * @IWX_TLC_MCS_PER_BW_160: mcs for bw - 160Mhz
5590 * @IWX_TLC_MCS_PER_BW_320: mcs for bw - 320Mhz
5601 * struct iwx_tlc_config_cmd_v3 - TLC configuration version 3
5610 * @ht_rates: MCS index 0 - 11, per <nss, channel-width>
5611 * pair (0 - 80mhz width and below, 1 - 160mhz).
5636 * struct iwx_tlc_config_cmd_v4 - TLC configuration
5646 * @ht_rates: MCS index 0 - 11, per <nss, channel-width>
5647 * pair (0 - 80mhz width and below, 1 - 160mhz, 2 - 320mhz).
5674 * struct iwx_tlc_update_notif - TLC notification from FW
5679 * version is < 3 at run-time, else rate_n_flags version 2
5681 * @amsdu_enabled: bitmap for per-TID AMSDU enablement
5717 * bits 0:2 - security control (IWX_TX_CMD_SEC_*)
5718 * bit 3 - immediate ACK required
5719 * bit 4 - rate is taken from STA table
5720 * bit 5 - frame belongs to BA stream
5721 * bit 6 - immediate BA response expected
5722 * bit 7 - unused
5723 * bits 8:15 - Station ID
5724 * bits 16:31 - rate
5737 * TX command Frame life time in us - to be written in pm_frame_timeout
5745 * TID for non QoS frames - to be written in tid_tspec
5750 * Limits on the retransmissions - to be written in {data,rts}_retry_limit
5768 #define IWX_FIRST_TB_SIZE_ALIGN ((IWX_FIRST_TB_SIZE + (64 - 1)) & ~(64 - 1))
5783 * @TX_CMD_OFFLD_PAD: mark 2-byte pad was inserted after the mac header for
5785 * @TX_CMD_OFFLD_AMSDU: mark TX command is A-MSDU
5807 * @IWX_TX_FLAGS_HIGH_PRI: high priority frame (like EAPOL) - can affect rate
5820 * struct iwx_tx_cmd_gen2 - TX command struct to FW for 22000 devices
5841 * struct iwx_tx_cmd_gen3 - TX command struct to FW for AX210+ devices
5961 * frames that used block-acknowledge. All frames were transmitted at
5965 * Note that, for aggregation, ACK (block-ack) status is not delivered
5966 * here; block-ack has not been received by the time the device records
5974 * struct iwx_agg_tx_status - per packet TX aggregation status
5987 * bit-7 invalid rate indication
5997 * struct iwx_tx_resp_v3 - notifies that fw is TXing a packet
6003 * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
6005 * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
6006 * for agg: RTS + CTS + aggregation tx time + block-ack time.
6008 * @pa_status: tx power info
6009 * @pa_integ_res_a: tx power info
6010 * @pa_integ_res_b: tx power info
6011 * @pa_integ_res_c: tx power info
6012 * @measurement_req_id: tx power info
6019 * @status: for non-agg: frame status IWX_TX_STATUS_*
6052 * struct iwx_tx_resp - notifies that fw is TXing a packet
6058 * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
6060 * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
6061 * for agg: RTS + CTS + aggregation tx time + block-ack time.
6063 * @pa_status: tx power info
6064 * @pa_integ_res_a: tx power info
6065 * @pa_integ_res_b: tx power info
6066 * @pa_integ_res_c: tx power info
6067 * @measurement_req_id: tx power info
6068 * @reduced_tpc: transmit power reduction used
6078 * @status: for non-agg: frame status TX_STATUS_*
6112 * struct iwx_compressed_ba_tfd - progress of a TFD queue
6114 * @tfd_index: Index of first un-acked frame in the TFD queue
6115 * @scd_queue: For debug only - the physical queue the TFD queue is bound to
6116 * @tid: TID of the queue (0-7)
6128 * struct iwx_compressed_ba_ratid - progress of a RA TID queue
6140 * enum iwx_ba_resp_flags - TX aggregation status
6145 * @IWX_MVM_BA_RESP_TX_BT_KILL: aggregation got BT-kill
6159 * struct iwx_compressed_ba_notif - notifies about reception of BA
6162 * @sta_id: Index of recipient (BA-sending) station in fw's station table
6163 * @reduced_txp: power reduced according to TPC. This is the actual value and
6165 * for Tx-ing then this value will be set to 0 by FW.
6170 * @txed: number of frames sent in the aggregation (all-TIDs)
6171 * @done: number of frames that were Acked by the BA (all-TIDs)
6173 * @wireless_time: Wireless-media time
6175 * @tfd_cnt: number of TFD-Q elements
6176 * @ra_tid_cnt: number of RATID-Q elements
6179 * @ra_tid: array of RA-TID queue status updates. For debug purposes only. See
6216 * struct iwx_tx_path_flush_cmd -- queue/FIFO flush command
6228 * struct iwl_tx_path_flush_cmd -- queue/FIFO flush command
6242 * struct iwx_flush_queue_info - virtual flush queue info
6255 * struct iwx_tx_path_flush_cmd_rsp -- queue/FIFO flush command response
6267 * iwx_get_scd_ssn - returns the SSN of the SCD
6268 * @tx_resp: the Tx response from the fw (agg or non-agg)
6281 return le32_to_cpup((uint32_t *)&tx_resp->status + in iwx_get_scd_ssn()
6282 tx_resp->frame_count) & 0xfff; in iwx_get_scd_ssn()
6286 * struct iwx_scd_txq_cfg_cmd - New txq hw scheduler config command
6331 * struct iwx_ssid_ie - directed scan network information element
6361 * iwx_scan_schedule_lmac - schedule of scan offload
6373 * iwx_scan_req_tx_cmd - SCAN_REQ_TX_CMD_API_S
6391 * iwx_scan_channel_cfg_lmac - SCAN_CHANNEL_CFG_S_VER2
6392 * @flags: bits 1-20: directed scan to i'th ssid
6394 * @channel_number: channel number 1-13 etc
6406 * iwx_scan_probe_segment - PROBE_SEGMENT_API_S_VER_1
6415 /* iwx_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_2
6428 /* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
6450 /* iwx_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
6454 * 1 - EBS is disabled.
6455 * 2 - every second scan will be full scan(and so on).
6478 * iwx_scan_offload_complete - PERIODIC_SCAN_COMPLETE_NTF_API_S_VER_2
6495 * struct iwx_scan_results_notif - scan results for one channel -
6516 * iwx_scan_offload_blacklist - IWX_SCAN_OFFLOAD_BLACKLIST_S
6519 * @client_bitmap: clients ignore this entry - enum scan_framework_client
6536 * iwx_scan_offload_profile - IWX_SCAN_OFFLOAD_PROFILE_S
6538 * @unicast_cipher: encryption algorithm to match - bitmap
6539 * @aut_alg: authentication algorithm to match - bitmap
6542 * @client_bitmap: clients waiting for match - enum scan_framework_client
6555 * iwx_scan_offload_profile_cfg - IWX_SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1
6562 * @active_clients: active clients bitmap - enum scan_framework_client
6600 /* Bits 26-31 are for num of channels in channel_array */
6618 /* Bits 16-27 are for supported rates */
6642 #define IWX_SCAN_LB_LMAC_IDX 0 /* low-band */
6643 #define IWX_SCAN_HB_LMAC_IDX 1 /* high-band */
6652 * @tx_chains: valid_tx antenna - ANT_* definitions
6653 * @rx_chains: valid_rx antenna - ANT_* definitions
6667 * @tx_chains: valid_tx antenna - ANT_* definitions
6668 * @rx_chains: valid_rx antenna - ANT_* definitions
6669 * @legacy_rates: default legacy rates - enum scan_config_rates
6678 * @channel_flags: default channel flags - enum iwx_channel_flags
6782 * @flags: bitmap - 0-19: directed scan to i'th ssid.
6783 * @channel_num: channel number 1-13 etc.
6817 * struct iwx_scan_req_umac_tail - the rest of the UMAC scan request command
6836 * struct iwx_scan_req_umac_tail - the rest of the UMAC scan request command
6873 * @ooc_priority: out of channel priority - &enum iwl_scan_priority
6887 * @max_out_time: max out of serving channel time, per LMAC - for CDB there
6889 * @suspend_time: max suspend time, per LMAC - for CDB there are 2 LMACs
7092 * @ooc_priority: out of channel priority - &enum iwx_scan_priority
7133 * struct iwx_scan_offload_profile_match - match information
7151 * struct iwx_scan_offload_profiles_query - match results query response
7176 * struct iwx_umac_scan_iter_complete_notif - notifies end of scanning iteration
7215 * @IWX_STA_FLG_PS: set if STA is in Power Save
7224 * @IWX_STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU
7287 * @IWX_STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
7288 * station info array (1 - n 1X mode)
7338 * @IWX_STA_SLEEP_STATE_MOREDATA: set more-data bit on
7368 * struct iwx_keyinfo - key information
7371 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
7373 * @key: 16-byte unicast decryption key
7375 * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only
7376 * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only
7397 * struct iwx_add_sta_cmd - Add/modify a station in the fw's sta table.
7400 * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
7409 * alone. 1 - modify, 0 - don't change.
7414 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
7417 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
7419 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
7422 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
7426 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
7427 * mac-addr.
7436 * The device contains an internal table of per-station information, with info
7441 * entry, or modifying a pre-existing one.
7472 * @IWX_STA_LINK: Link station - normal RX and TX traffic.
7486 * struct iwx_add_sta_key_common - add/modify sta key common part
7503 * struct iwx_add_sta_key_cmd_v1 - add/modify sta key
7507 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
7517 * struct iwx_add_sta_key_cmd - add/modify sta key
7544 * struct iwx_rm_sta_cmd - Add / modify a station in the fw's station table
7618 * struct iwx_bt_coex_cmd - bt coex configuration command
7631 * Location Aware Regulatory (LAR) API - MCC updates
7635 * struct iwx_mcc_update_cmd - Request the device to update geographic
7637 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
7655 * iwx_mcc_update_resp_v3 - response to MCC_UPDATE_CMD.
7691 * struct iwx_mcc_update_resp - response to MCC_UPDATE_CMD.
7720 * struct iwx_mcc_chub_notif - chub notifies of mcc change
7727 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
7826 #define IWX_MAX_CMD_PAYLOAD_SIZE (4096 - sizeof(struct iwx_cmd_header_wide))
7844 uint8_t data_wide[IWX_DEF_CMD_PAYLOAD_SIZE -
7859 * 28-26: Reserved
7864 * 21-16: RX queue
7865 * 15-14: Reserved
7866 * 13-00: RX frame size
7885 return le32toh(pkt->len_n_flags) & IWX_FH_RSCSR_FRAME_SIZE_MSK; in iwx_rx_packet_len()
7889 #pragma clang diagnostic ignored "-Wunused-function"
7894 return iwx_rx_packet_len(pkt) - sizeof(pkt->hdr); in iwx_rx_packet_payload_len()
7898 #define IWX_MIN_DBM -100
7899 #define IWX_MAX_DBM -33 /* realistic guess */
7902 bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg))
7905 bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (reg), (val))
7908 bus_space_write_1((sc)->sc_st, (sc)->sc_sh, (reg), (val))
7917 bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \
7921 bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \